C#: Smtp mailer = new Smtp(); SmtpServer server = new SmtpServer("smtp.company.com", "jdoe", "secret"); mailer.SmtpServers.Add(server); ... mailer.Send(); |
VB.NET: Dim mailer As New Smtp() Dim server As New SmtpServer("smtp.company.com","jdoe","secret") mailer.SmtpServers.Add(server) ... mailer.Send() |
C#: Smtp mailer = new Smtp(); SmtpServer server = new SmtpServer("mail.domain.com", "user@domain.com", "pass"); mailer.SmtpServers.Add(server); mailer.Connect(); mailer.Hello(); mailer.Login(); |
VB.NET: Dim mailer As New Smtp() Dim server As New SmtpServer("mail.domain.com", "user@domain.com", "pass") mailer.SmtpServers.Add(server) mailer.Connect() mailer.Hello() mailer.Login() |
C#: Smtp mailer = new Smtp(); SmtpServer server = new SmtpServer("smtp.company.com", "jdoe", "secret"); server.AuthMethods = AuthenticationMethods.SaslLogin | AuthenticationMethods.SaslPlain | AuthenticationMethods.SaslNtlm; server.AuthOptions = AuthenticationOptions.PreferSimpleMethods; mailer.SmtpServers.Add(server); ... mailer.Send(); |
VB.NET: Dim mailer As New Smtp() Dim server As New SmtpServer("smtp.company.com","jdoe","secret") server.AuthMethods = AuthenticationMethods.SaslLogin _ Or AuthenticationMethods.SaslPlain Or AuthenticationMethods.SaslNtlm server.AuthOptions = AuthenticationOptions.PreferSimpleMethods mailer.SmtpServers.Add(server) ... mailer.Send() |
C#: Smtp mailer = new Smtp(); mailer.SmtpServers.Add("mail.domain.com", "jdoe@domain.com", "secret").AuthPopBeforeSmtp = true; ... mailer.Send(); |
VB.NET: Dim mailer As New Smtp() mailer.SmtpServers.Add("mail.domain.com", "jdoe@domain.com", "secret").AuthPopBeforeSmtp = True ... mailer.Send() |
C#: Smtp mailer = new Smtp(); mailer.SmtpServers.Add("smtp.domain.com"); mailer.AuthPopBeforeSmtp("pop.domain.com", 110, "jdoe@domain.com", "secret"); ... mailer.Send(); |
VB.NET: Dim mailer As New Smtp() mailer.SmtpServers.Add("smtp.domain.com") mailer.AuthPopBeforeSmtp("pop.domain.com", 110, "jdoe@domain.com", "secret") ... mailer.Send() |
C#: Smtp mailer = new Smtp(); mailer.SmtpServers.Add("smtp.domain.com", null, null, AuthenticationMethods.SaslNtlm); |
VB.NET: Dim mailer As New Smtp() mailer.SmtpServers.Add("smtp.domain.com", Nothing, Nothing, AuthenticationMethods.SaslNtlm) |
using (RasterCodecs codecs = new RasterCodecs()) { codecs.Options.RasterizeDocument.Load.XResolution = 300; codecs.Options.RasterizeDocument.Load.YResolution = 300; RasterImage image = codecs.Load(inputFile); using (IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.Professional, false)) { ocrEngine.Startup(null, null, null, @"C:\LEADTOOLS 19\Bin\Common\OcrProfessionalRuntime64"); using (IOcrDocument document = ocrEngine.DocumentManager.CreateDocument()) { document.Pages.AddPage(image, null); document.Pages[0].Recognize(null); IOcrPageCharacters pageCharacters = document.Pages[0].GetRecognizedCharacters(); for (int i = 0; i < document.Pages[0].Zones.Count; i++) { IOcrZoneCharacters zoneCharacters = pageCharacters.FindZoneCharacters(i); if (zoneCharacters != null) { foreach (var ocrCharacter in zoneCharacters) { OcrCharacterPosition position; position = ocrCharacter.Position; if ((position & OcrCharacterPosition.EndOfLine) == OcrCharacterPosition.EndOfLine) { Console.Write(ocrCharacter.Code + "\n"); } else { Console.Write(ocrCharacter.Code); } } } } } } }
2017慧都十四周年狂欢搞事情!砸金蛋100%抽现金红包、满额豪送iPhone X、iPhone 8、DevExpress汉化免费送、团队升级培训套包劲省10万元......更多惊喜等您来探索!
慧都十四周年狂欢开启,Dynamic Web TWAIN终极让利7折特惠
限时一个月,马上咨询>>>
2017慧都十四周年狂欢搞事情!砸金蛋100%抽现金红包、满额豪送iPhone X、iPhone 8、DevExpress汉化免费送、团队升级培训套包劲省10万元......更多惊喜等您来探索!
VectorDraw Developer Framework点击下载>>>
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)
using Leadtools; using Leadtools.Dicom; using Leadtools.Dicom.Scu.Common; using Leadtools.Dicom.Scu; using Leadtools.MedicalViewer; using System.Net; using System.IO;
// CStore highlevel 客户端和服务端对象 private StoreScu _cstore; private DicomScp _server = new DicomScp();
private void initServer() { _server = new DicomScp(); _server.AETitle = "L19_PACS_SCP64"; _server.PeerAddress = IPAddress.Parse("10.32.1.75"); _server.Port = 534; _server.Timeout = 30; }
private void initCstore() { _cstore = new StoreScu(); _cstore.AETitle = "L19_CLIENT64"; _cstore.HostPort = 1030; //存储成功后 _cstore.AfterCStore += _cstore_AfterCStore; }
private void 存储ToolStripMenuItem_Click(object sender, EventArgs e) { string filename ="D:\\Xa.dcm"; _cstore.Store(_server, filename); }