包含示例 ![]() | 排除示例 ![]() | 包含+排除示例 ![]() |




.NET,C,C ++和C#OCR
将PDF文件转换成PDF/A文件C#
// Create SMTP object
Smtp mailer = new Smtp();
// Set the message fields.
mailer.From.AsString = "jdoe@domain.com";
mailer.To.AsString = "bill@domain2.com";
mailer.Subject = "Hi";
mailer.BodyPlainText = "This is test message";
// Starts logging SMTP activities into a file.
mailer.Log.Enabled = true;
mailer.Log.Filename = @"C:\log.txt";
mailer.Log.Clear();
// Specify the server to use. If your server does not require authentication,
// just omit both last parameters.
mailer.SmtpServers.Add("mail.domain.com", "jdoe", "secret");
// Attempt to connect.
mailer.Connect();
// Display the host name of the server the connection was established with.
Console.WriteLine("Connected to " + mailer.SmtpServers[mailer.GetCurrentSmtpServerIndex()].Name);
// Make sure all the recipients are ok.
if (mailer.TestSend(SendFailureThreshold.AllRecipientsFailed) != TestSendResult.OK)
{
Console.WriteLine("No recipients can receive the message.");
}// Show refused recipients if any
else if (mailer.GetRefusedRecipients().Count > 0)
{
Console.WriteLine("The following recipients failed: " + mailer.GetRefusedRecipients().ToString());
}
else
{
Console.WriteLine("All recipients are ok. Will send the message now.");
// Send e-mail. If it cannot be delivered, bounce will
// arrive to bounce@domain3.com, not to joe@domain1.com
mailer.Send("bounce@domain.com", (string)null);
Console.WriteLine("Sent to: " + mailer.GetAcceptedRecipients().ToString());
}
// Disconnect from the server
mailer.Disconnect();VB.NET
' Create SMTP object
Dim mailer As New Smtp
' Set the message fields.
mailer.From.AsString = "jdoe@domain.com"
mailer.To.AsString = "bill@domain2.com"
mailer.Subject = "Hi"
mailer.BodyPlainText = "This is test message"
' Starts logging SMTP activities into a file.
mailer.Log.Enabled = True
mailer.Log.Filename = "C:\log.txt"
mailer.Log.Clear()
' Specify the server to use. If your server does not require authentication,
' just remove last 2 parameters.
mailer.SmtpServers.Add("mail.domain.com", "jdoe", "secret")
' Attempt to connect.
mailer.Connect()
' Display the host name of the server the connection was established with.
Console.WriteLine("Connected to " + mailer.SmtpServers(mailer.GetCurrentSmtpServerIndex()).Name)
' Make sure all the recipients are ok.
If mailer.TestSend(SendFailureThreshold.AllRecipientsFailed) <> TestSendResult.OK Then
Console.WriteLine("No recipients can receive the message.")
Else
' Show refused recipients if any
If mailer.GetRefusedRecipients().Count > 0 Then
Console.WriteLine("The following recipients failed: " & mailer.GetRefusedRecipients().ToString())
Else
Console.WriteLine("All recipients are ok. Will send the message now.")
' Send e-mail. If it cannot be delivered, bounce will
' arrive to bounce@domain3.com, not to joe@domain1.com
mailer.Send("bounce@domain.com", CType(Nothing, String))
Console.WriteLine("Sent to: " + mailer.GetAcceptedRecipients().ToString())
End If
End If
' Disconnect from the server
mailer.Disconnect()DWObject.ShowImageEditor();

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;
}
今年5月在西雅图举行的 Build 2017 开发者大会上,微软公布了 Windows 10 下一个重要更新——Windows 10 Fall Creators Update。Windows 10 Fall Creators Update将在今年下半年为超过 5 亿台 Windows 10 设备带来创新体验:其中包括一套用以在不同类型 Windows设备上实现创新的设计体系;全新的开发工具将让开发者轻松自如地在Windows平台工作;Windows 应用商店将要迎来 iTunes、Spotify、SAP Digital Boardroom 等人气应用;贯穿 Windows、iOS 和 Android 设备的一致的用户体验;此外,还有全球首款 Windows Mixed Reality(Windows 混合现实)动作控制器——完全无需依赖任何定位标记即可工作。
全新的设计体系,让开发者在 Windows 设备上更好地发挥创意
微软流畅设计体系(Fluent Design System)将带来直观、和谐、响应迅速、兼容广泛的跨设备体验与互动操作。对于开发者来说,流畅设计能帮助他们设计出更具表现力和吸引力的应用程序,并且广泛支持各种类型的设备和多样化的输入方式。
让开发者在轻松自如地使用 Windows
微软致力于让所有开发者都可以轻松自如地使用 Windows 和 Visual Studio——不仅仅是 Windows 应用程序开发,也包括跨越各类平台和设备的应用体验——。微软宣布了多个针对 Windows 开发者的新开发工具。
Windows应用商店全面支持Windows、iOS和Android UWP应用,欢迎iTunes上线
今年下半年,Windows应用商店将加入更多人气应用:
为用户带来贯穿 Windows、iOS和Android的一致体验
Microsoft Graph构建起了一个智能网络,将人、会话、项目和微软云上的内容相互连接起来,并且能够构建起在Windows、iOS、Android 设备之间无缝衔接的一致体验。其提供的关键功能包括:
Windows Story Remix:用图片和视频讲故事的新方式
Windows Story Remix 是一项基于.Net 技术构建并通过 Windows 商店分发的通用Windows应用(UWP),可以利用人工智能和深度学习技术整理照片和视频并将其转变为叙事形态。它利用 Microsoft Graph 连接不同设备的用户。Story Remix 将记忆、照片、视频整合成一个故事,并加入音轨、主题和串场切换效果。通过在照片和视频中加入 3D 对象,用户还可以构建出混合现实的视角,以新的方式讲述故事,或是将照片和视频当作画布,利用 Windows 墨迹书写在上面涂鸦绘画。
全球首个Windows Mixed Reality运动控制器——无需依赖位置标签
微软还带来了全球首款完全无需依赖位置标签的 Windows Mixed Reality 运动控制器,利用 Windows Mixed Reality 头戴设备中内置的传感器,就能对视野内的动作进行定位准确、响应迅速的动作跟踪,并且完全不需要在周围墙壁上安装任何硬件设备。
微软正在将 Windows 塑造为帮助每一人开启创作之途的平台。在此诚挚邀请诸位开始这一旅程:











