基于浏览器的客户端图像浏览器Prizm ActiveX Viewer在线订购专享8折!
C#: msg.Parser.PlainToHtmlMode = PlainToHtmlAutoConvert.IfNoHtml; |
| VB.NET: msg.Parser.PlainToHtmlMode = PlainToHtmlAutoConvert.IfNoHtml |
C#: msg.Parser.PlainToHtmlOptions = PlainToHtmlConvertOptions.UriToLink; |
| VB.NET: msg.Parser.PlainToHtmlOptions = PlainToHtmlConvertOptions.UriToLink |
C#: msg.Parser.Apply(); |
| VB.NET: msg.Parser.Apply() |
C#: webBrowser1.DocumentText = msg.BodyHtmlText; |
| VB.NET: webBrowser1.DocumentText = msg.BodyHtmlText |
C#: using System; using MailBee; using MailBee.Pop3Mail; |
| VB.NET: Imports System Imports MailBee Imports MailBee.Pop3Mail |
C#: Pop3 pop = new Pop3(); try { pop.Connect("mail.domain.com"); pop.Login("login", "password"); Console.WriteLine("Successfully logged in."); } catch(MailBeePop3LoginNegativeResponseException e) { Console.WriteLine("POP3 server replied with a negative response at login."); } MailMessage msg = pop.DownloadEntireMessage(pop.InboxMessageCount); msg.Parser.PlainToHtmlMode = PlainToHtmlAutoConvert.IfNoHtml; msg.Parser.PlainToHtmlOptions = PlainToHtmlConvertOptions.UriToLink; msg.Parser.Apply(); WebBrowser1.Text = msg.BodyHtmlText; try { pop.Disconnect(); Console.WriteLine("Disconnected successfully."); } catch { Console.WriteLine("Disconnection failed."); } |
| VB.NET: Dim pop As Pop3 = New Pop3() Try pop.Connect("mail.domain.com") pop.Login("login", "password") Console.WriteLine("Successfully logged in.") Catch e As MailBeePop3LoginNegativeResponseException Console.WriteLine("POP3 server replied with a negative response at login.") End Try Dim msg As MailMessage = pop.DownloadEntireMessage(pop.InboxMessageCount) msg.Parser.PlainToHtmlMode = PlainToHtmlAutoConvert.IfNoHtml msg.Parser.PlainToHtmlOptions = PlainToHtmlConvertOptions.UriToLink msg.Parser.Apply() WebBrowser1.Text = msg.BodyHtmlText Try pop.Disconnect() Console.WriteLine("Disconnected successfully.") Catch Console.WriteLine("Disconnection failed.") End Try |
VintaSoftImaging.NET SDK是一个为.NET开发人员开发的,强大而易于使用的图像工具包。它可以让你加载、查看、处理、打印和保存数字图像,可将它们转换为不同的图像格式,可用多种TIFF和动态GIF文件提高您的工作效率。
【VintaSoftImaging.NET SDK最新版点击下载>>>】
/* Show the 3rd image in the buffer */ DWObject.CurrentImageIndexInBuffer = 2;
/* Show images in buffer with 2 * 2 view */ DWObject.SetViewMode(2, 2);

DWObject.Mirror(0); DWObject.Flip(1); DWObject.RotateRight(2); DWObject.Crop(3,101,243,680,831); DWObject.RotateLeft(3);

C#
Pop3 pop = new Pop3();
pop.Connect("mail.domain.com");
pop.Login("jdoe", "secret");
VB.NET
Dim pop As New Pop3()
pop.Connect("mail.domain.com")
pop.Login("jdoe", "secret")C#
Pop3 pop = new Pop3();
pop.Connect("mail.domain.com");
pop.Login("jdoe", "secret", AuthenticationMethods.Apop);
VB.NET
Dim pop As New Pop3()
pop.Connect("mail.domain.com")
pop.Login("jdoe", "secret", AuthenticationMethods.Apop)C#
pop.Login("jdoe", "secret", AuthenticationMethods.Auto, AuthenticationOptions.PreferSimpleMethods, null);
VB.NET
pop.Login("jdoe", "secret", AuthenticationMethods.Auto, AuthenticationOptions.PreferSimpleMethods, Nothing)C# pop.Login(null, null, AuthenticationMethods.SaslNtlm); VB.NET pop.Login(Nothing, Nothing, AuthenticationMethods.SaslNtlm)
static void SimpleOCRCalculator(string filePath)
{
RasterCodecs codecs = new RasterCodecs();
RasterImage image = codecs.Load(filePath);
string[] calculations;
using (IOcrEngine engine = OcrEngineManager.CreateEngine(OcrEngineType.Advantage, false))
{
engine.Startup(null, null, null, null);
IOcrPage page = engine.CreatePage(image, OcrImageSharingMode.None);
page.AutoZone(null);
page.Recognize(null);
calculations = new string[page.Zones.Count];
for (int i = 0; i < page.Zones.Count; i++)
{
calculations[i] = page.GetText(i);
}
engine.Shutdown();
}
Dictionary<string, Action<double, double>> operands = new Dictionary<string, Action<double, double>>();
operands.Add("+", new Action<double, double>(delegate(double a, double b) { double ans = a + b; Console.WriteLine("{0} + {1} = {2}", a, b, ans); }));
operands.Add("-", new Action<double, double>(delegate(double a, double b) { double ans = a - b; Console.WriteLine("{0} - {1} = {2}", a, b, ans); }));
operands.Add("x", new Action<double, double>(delegate(double a, double b) { double ans = a * b; Console.WriteLine("{0} * {1} = {2}", a, b, ans); }));
operands.Add("/", new Action<double, double>(delegate(double a, double b) { double ans = a / b; Console.WriteLine("{0} / {1} = {2}", a, b, ans); }));
for (int i = 0; i < calculations.Length; i++)
{
string equation = Regex.Replace(calculations[i], @"\n|\r| ", "");
string[] ops = new string[] { "+", "-", "x", "/" };
for (int j = 0; j < ops.Length; j++)
{
int index = equation.IndexOf(ops[j]);
if (index > 0 && index < equation.Length)
{
string op1 = equation.Substring(0, index);
string op2 = equation.Substring(index + 1);
double arg1 = double.Parse(op1);
double arg2 = double.Parse(op2);
operands[ops[j]](arg1, arg2);
break;
}
}
}
codecs.Dispose();
image.Dispose();
}
