未找到

未发布 DevExpress v17.2新版亮点—WPF篇(四)
by AABBbaby keys 分享 1514257228014

DevExpress年终击穿底价,单套授权低至67折!仅剩最后6天!查看详情>>>

用户界面套包DevExpress v17.2终于正式发布,本站将以连载的形式为大家介绍各版本新增内容。本文将介绍了DevExpress WPF v17.2 新的Hamburger Menu、Scheduler Control、Dialogs (CTP)、Data Grid Control等,快来下载试用新版本!

未发布 【示例教程】如何使用LEADTOOLS图像标注控件在界面上对图像进行标注
by Harriet666 keys 分享 1511343290477
leadtools对图像和文档提供了多种类型的标注,允许用户通过图形界面或者后台代码进行插入。本教程将按照步骤分享如何使用图像标注控件在界面上对图像进行标注。
 
Leadtools 19总套包下载>>>

1.创建VS项目

在VS中创建winform项目,创建完成后需要确认使用的.NET版本以及编译的目标平台。本例采用.NET4.0和X86平台进行编译。

 
2.引用接口dll

需要引用的dll列表如下,可以在C:\LEADTOOLS 19\Bin\Dotnet4\Win32找到。
主界面Form1代码中添加引用
using System.Windows.Forms;
using Leadtools;
using Leadtools.Codecs;
using Leadtools.WinForms;
using Leadtools.Annotations;

3.主界面添加相关控件

在设计界面添加一个MenuStrip菜单
添加按钮用以打开文件;
添加下拉框,包括2个选项:标注模式和浏览模式

 
4.后台代码编写

4.1控件初始化相关代码
添加相关对象
        RasterImageViewer viewer = new RasterImageViewer();
        RasterImage img;
        AnnAutomationManager annger;
        AnnAutomation automation;

添加initControl()方法,用于初始化图片浏览控件以及标注相关控件,在Form1()构造函数中调用该方法
private void initControl() {
            Support.SetLicense();
            viewer.Dock = DockStyle.Fill;
            panel1.Controls.Add(viewer);
            viewer.HorizontalAlignMode = RasterPaintAlignMode.Center;
            viewer.VerticalAlignMode = RasterPaintAlignMode.Center;
            loadImage("qwe.jpg");
            if (viewer.Image != null)
            {
                // create and setup the automation manager 
                annger = new AnnAutomationManager();

                // Instruct the manager to create the default (all) automation objects. 
                annger.CreateDefaultObjects();

                // create the toolbar and add it to the form 
                annger.CreateToolBar();
                Controls.Add(annger.ToolBar);

                // setup the automation (will create the container as well) 
                automation = new AnnAutomation(annger, viewer);

                // add an event handler for changes to the current designer 
                automation.CurrentDesignerChanged += new EventHandler(automation_CurrentDesignerChanged);

                // setup this automation as the active one 
                automation.Active = true;
            }
            toolStripComboBox1.SelectedIndex = 0;
        }
 
4.2添加加载图像方法
private void loadImage(string filename)
        {
            img = new RasterCodecs().Load(filename);
            viewer.Image = img;
        }
4.3添加automation_CurrentDesignerChanged方法
private void automation_CurrentDesignerChanged(object sender, EventArgs e)
        {
            AnnAutomation automation = sender as AnnAutomation;
            AnnButtonRunDesigner buttonRunDesigner = automation.CurrentDesigner as AnnButtonRunDesigner;
            if (buttonRunDesigner != null)
                buttonRunDesigner.Run += new EventHandler(buttonRunDesigner_Run);
        }
4.4添加buttonRunDesigner_Run方法
private void buttonRunDesigner_Run(object sender, AnnRunDesignerEventArgs e)
        {
            if (e.OperationStatus == AnnDesignerOperationStatus.End)
            {
                AnnButtonObject btn = e.Object as AnnButtonObject;
                MessageBox.Show(string.Format("Button with text = {0} was clicked!", btn.Text));
            }
        }
4.5添加打开文件按钮事件方法
private void loadImage(string filename)
        {
            img = new RasterCodecs().Load(filename);
            viewer.Image = img;
        }
4.6添加模式下拉框选项改变事件方法
private void toolStripComboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            annger.UserMode = (toolStripComboBox1.SelectedIndex == 0) ? AnnUserMode.Design : AnnUserMode.Run;
        }

5.编译运行

演示程序界面如下图所示
未发布 DevExpress v17.2新版亮点—WPF篇(二)
by AABBbaby keys 分享 1513221694946

DevExpress年终击穿底价,单套授权低至67折!查看详情>>>

用户界面套包DevExpress v17.2终于正式发布,本站将以连载的形式为大家介绍各版本新增内容。本文将介绍了DevExpress WPF v17.2 新的Hamburger Menu、Scheduler Control、Dialogs (CTP)、Data Grid Control等,快来下载试用新版本!

未发布 https://www.evget.com/article/2017/3/21/25952.html
by zoujiajun33 keys 分享 1490063642901
Jtest测试类可以被扩展,在运行测试之前初始化其他的类。本次教程就给大家讲解如何向测试用例中添加初始化信息。
https://www.evget.com/article/2017/3/21/25952.html

未发布 【重大更新】DevExpress v17.1新版亮点(XAF篇)
by AABBbaby keys 分享 1498530569283
用户界面套包DevExpress v17.1日前正式发布,本站以连载的形式为大家介绍各版本新增内容。本文为大家介绍DevExpress eXpressApp Framework(XAF) v17.1中核心功能的增强、移动平台增强的功能和UX的改进等。快来下载试用新版本!
未发布 DevExpress v17.2最新版帮助文档下载大全
by AABBbaby keys 分享 1515726189742
DevExpress v17.2.4帮助文档下载列表大全来啦!包含.NET、VCL、HTML/JS系列所有帮助文档,提供CHM和PDF两个版本。除已停止更新的Silverlight、Windows 8外,其余均为最新版本。
未发布 超赞!适用Mac OS X的7个最佳应用程序
by AABBbaby keys 分享 1417499797520
未发布 用数据说话——数据分析的基本思想
by chenjunji123456 keys 分享 1486543858823
未发布 五个超赞的字符艺术生成器!
by Caroline keys 分享 1405475383415
undefined
未发布 Kendo UI常用示例汇总(五)
by AABBbaby keys 分享 1460513059508

<Kendo UI Professional试用版下载>

Kendo UI Professional 提供开源和商业两个版本。开源版 Kendo UI Core,有40+个框架和组件;商业版整合了之前的Kendo UI WebKendo UI Mobile 和 Kendo UI DataViz ,一共有70+个框架和组件。作为Kendo UI的升级版,Kendo UI Professional既可以开发网页版应用程序,也可以开发移动版应用程序,并且在性能上也有显著的优化和提升。


 近期热门 - 点击最多
  1. python基于asyncio实现 Redis 的异步操作哈希数据写入 / 读取、发布订阅消息中间件
  2. Node.js 打印vite react+go项目目录树
  3. Angular入门:用Signals状态管理和Bootstrap基础样式实现的用户登录注册实例教程
  4. 用Gitea搭建免费Git服务器自定义Actions配置CI/CD自动化部署和测试流水线
  5. FastAPI+SQLModel+PostgreSQL+React+Vite全栈项目文件结构说明环境搭建与初始化指南
  6. React结合vite使用vue3,在纯typescript的react hooks中使用vue
  7. valtio基于Proxy代理比redux\zustand更简洁的react状态管理库
  8. React Native为http网络请求添加timeout超时异常处理: 用XMLHttpRequest替换fetch发送的区别
  9. React Native使用fetch发送http登陆验证请求失败:无法读取set-cookie并显示network request failed
  10. 克服Redux的缺点在React/Native中使用消息队列,pubsub-js更加简洁的组件间通信和状态传递方法

  全端社区 - 最新回复
  1. 在无管理员权限的情况下,使用安装Python补全 pip临时配置环境变量
  2. Python鉴权方法:Depends 依赖注入;装饰器;与基于Proxy模式的Session状态管理自动计算脏属性;将用户数据存储在Redis中
  3. python基于asyncio实现 Redis 的异步操作哈希数据写入 / 读取、发布订阅消息中间件
  4. Angular入门:用Signals状态管理和Bootstrap基础样式实现的用户登录注册实例教程
  5. 用Gitea搭建免费Git服务器自定义Actions配置CI/CD自动化部署和测试流水线
  6. FastAPI+SQLModel+PostgreSQL+React+Vite全栈项目文件结构说明环境搭建与初始化指南
  7. Node.js 打印vite react+go项目目录树
  8. valtio基于Proxy代理比redux\zustand更简洁的react状态管理库
  9. Windows与Mac通过git ssh和rsync实现文件共享互传
  10. Windows与Mac通过git ssh和scp实现文件共享互传

  开源的 OurJS
OurJS开源博客已经迁移到 OnceOA 平台。

  关注我们
扫一扫即可关注我们:
OnceJS

OnceOA