using System.Windows.Forms; using Leadtools; using Leadtools.Codecs; using Leadtools.WinForms; using Leadtools.Annotations;
RasterImageViewer viewer = new RasterImageViewer();
RasterImage img;
AnnAutomationManager annger;
AnnAutomation automation;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;
}
private void loadImage(string filename)
{
img = new RasterCodecs().Load(filename);
viewer.Image = img;
}
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);
}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));
}
}
private void loadImage(string filename)
{
img = new RasterCodecs().Load(filename);
viewer.Image = img;
}
private void toolStripComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
annger.UserMode = (toolStripComboBox1.SelectedIndex == 0) ? AnnUserMode.Design : AnnUserMode.Run;
}
试用、下载、了解更多产品信息请点击"咨询在线客服"

慧都十四周年狂欢开启,Dynamic Web TWAIN终极让利7折特惠
限时一个月,马上咨询>>>2017慧都十四周年狂欢搞事情!砸金蛋100%抽现金红包、满额豪送iPhone X、iPhone 8、DevExpress汉化免费送、团队升级培训套包劲省10万元......更多惊喜等您来探索!




| Private Sub Form_Load() EDOffice1.OpenFileDialog'EDOffice1.OpenWord “d:\ test.xlsx” 'EDOffice1.Open“d:\ test.xls”,“Excel.Application” End Sub |
| Private Sub EDOffice_DocumentOpened() EDOffice1.ProtectDoc 1'XlProtectTypeNormal End Sub |
| bool ExcelAddWorkSheet(long Index); bool ExcelDeleteWorkSheet(long Index); bool ExcelActivateWorkSheet(long Index); 长ExcelGetWorkSheetCount(); bool ExcelSetCellValue(long Column,long Row,BSTR Value); BSTR ExcelGetCellValue(长列,长行); bool ExcelSetRowHeight(long Row,double Height); bool ExcelSetColumnWidth(long Column,double Width); afx_msg bool ExcelDeleteRow(long Row); bool ExcelDeleteColumn(long Column); bool ExcelInsertRow(long Row); bool ExcelInsertColumn(long Column); bool ExcelInsertPageBreakInRow(long Row); bool ExcelInsertPageBreakInColumn(long Column); bool ExcelCopyToClipboard(); bool ExcelPasteStringToWorksheet(BSTR bstText); |
Private Sub Command1_Click() Dim oXL As Excel.Application Set oXL = EDOffice1.GetApplication() Dim oWB As Excel.Workbook Set oWB = EDOffice1.ActiveDocument() Dim oSheet As Excel.Worksheet Dim oRng As Excel.Range Set oSheet = oWB.ActiveSheet oSheet.Cells(1, 1).Value = "First Name" oSheet.Cells(1, 2).Value = "Last Name" oSheet.Cells(1, 3).Value = "Full Name" oSheet.Cells(1, 4).Value = "Salary" ' Format A1:D1 as bold, vertical alignment = center. With oSheet.Range("A1", "D1") .Font.Bold = True .VerticalAlignment = xlVAlignCenter End With ' Create an array to set multiple values at once. Dim saNames(5, 2) As String saNames(0, 0) = "John" saNames(0, 1) = "Smith" saNames(1, 0) = "Tom" saNames(1, 1) = "Brown" saNames(2, 0) = "Sue" saNames(2, 1) = "Thomas" saNames(3, 0) = "Jane" saNames(3, 1) = "Jones" saNames(4, 0) = "Adam" saNames(4, 1) = "Johnson" ' Fill A2:B6 with an array of values (First and Last Names). oSheet.Range("A2", "B6").Value = saNames ' Fill C2:C6 with a relative formula (=A2 & " " & B2). Set oRng = oSheet.Range("C2", "C6") oRng.Formula = "=A2 & "" "" & B2" ' Fill D2:D6 with a formula(=RAND()*100000) and apply format. Set oRng = oSheet.Range("D2", "D6") oRng.Formula = "=RAND()*100000" oRng.NumberFormat = "$0.00" ' AutoFit columns A:D. Set oRng = oSheet.Range("A1", "D1") oRng.EntireColumn.AutoFit oXL.UserControl = True End Sub |




Nevron Chart for .NET是一款业界领先的ASP.NET和Windows应用程序开发图表解决方案。该组件的设计从根本上满足您的绘图需求并将他们包装到一个良好的思想和一致的编程模型。不管您是否需要创建商业,科学,财经或演示图表应用程序,甚至是功能齐全,综合的商业智能解决方案, Nevron Chart将为您的Winforms和ASP.NET项目提供最终的数据可视化。

2017.1新版本在Nevron Chart for .NET中引入了很多新功能,以扩展最先进的.NET图表组件的数据可视化功能。
以下是2017.1版本引入的新功能的总结:













【慧都十四周年庆预热开启!全场满额送七级豪礼,AppleMac笔记本电脑、iwatch、iPad等您来拿!】
活动时间:10月1日-10月31日
很多企业都选择使用开源软件(OSS)构建更加灵活的产品,但其中也存在潜在的风险,软件供应商和IoT制造商都有必要去了解一下隐藏在软件供应链中的风险。
例如,犯罪分子就完全可以利用Apache Struts CVE-2017-5638漏洞来获取Equifax客户的个人资料。众所周知,Apache Struts是一种广泛使用的开源组件 – Web服务器的框架,它可以用于接收和提供公司内部系统中的商业数据。归根到底,还是因为这个开源组件所存在的漏洞以致于使其成为网络攻击的主要目标。
根据Flexera的一份最新报告显示,在商业和IoT软件产品中所发现的代码有百分之五十都是与开源软件有关的。但调查显示只有37%的受访者表示曾获取并使用开源软件。而63%的公司说,他们并没有获取或使用开源软件,或者说他们根本就不知道有这种情况的存在。
并且据了解,目前基本没有人对开源软件的安全性负责:39%的受访者表示,在他们公司内部没有人会对开源软件的安全性负责,或者可以说他们压根就不知道应该是由谁来负责。
除此之外,开源软件的贡献者也不是遵循最佳实践:33%的受访者表示自己的公司曾为开源项目做出了贡献。但是,又有63%的受访者表示他们的公司压根并没有开源采购或使用政策,当然也有43%的受访者表示自己本身对开源项目也有做出贡献。
不管怎样,我们都不能忽视开源确实是一个明显的捷径。 Flexera产品管理副总裁Jeff Luszcz表示:“完全开源可获取的代码可以快速获得产品,这对于软件开发的快速节奏来说非常重要。” “然而,大多数软件工程师并没有在私下里去跟踪开源的使用情况,而且有绝大部分的软件高管都没有意识到其安全/合规风险方面存在一定差距。”
事实上,对于开源软件使用过程中的安全合规、许可等流程可能远比简单的拿来用要方便的多,但这些流程毫无疑问是必不可少的。
“开源软件的安全合规流程能够很好的保护产品和品牌声誉。但大多数软件和IoT厂商都没有意识到存在的问题,所以他们并没有保护自己和户,”Luszcz说,“对于暴露产品合规性和漏洞风险的供应商,还有那些压根就不知道他们运行开放源代码和其他第三方软件的客户,甚至可能是包含软件漏洞的客户 ,这些都是会危及到整个软件供应链。”
2017慧都十四周年狂欢搞事情!砸金蛋100%抽现金红包、满额豪送iPhone X、iPhone 8、DevExpress汉化免费送、团队升级培训套包劲省10万元......更多惊喜等您来探索!

