WinForms注释图像查看器(AnnotationViewer类):
慧都十四周年狂欢开启,Dynamic Web TWAIN终极让利7折特惠
限时一个月,错过不再有,马上咨询>>>PrizmDoc是最快速、最有品质的HTML5文档查看器,提供安全的、全定制化的查看和协作功能。它通过一个简单部署的机制减少成本,降低安全风险和提高生产率。同时,它是基于服务器的查看器,消除了不必要的许可和下载。
PrizmDoc发布v12.2新版本,为Viewing客户端和PrizmDoc服务器添加了新功能。












| C#: MailBee.SmtpMail.Smtp.QuickSend("jdoe@domain.com", "bill@domain.com", "Subject", "Message Body"); |
| VB.NET: MailBee.SmtpMail.Smtp.QuickSend("jdoe@domain.com", "bill@domain.com", "Subject", "Message Body") |
| C#: mailer.DnsServers.Add("127.0.0.1"); |
VB.NET: mailer.DnsServers.Add("127.0.0.1") |
| C#: mailer.DnsServers.Autodetect(); |
VB.NET: mailer.DnsServers.Autodetect() |

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