2017慧都十四周年狂欢搞事情!砸金蛋100%抽现金红包、满额豪送iPhone X、iPhone 8、DevExpress汉化免费送、团队升级培训套包劲省10万元......更多惊喜等您来探索!











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


应用于Web应用程序的TWAIN扫描识别工具 支持所有主流浏览器。 | |
更快速、更安全的远程获取 和跨平台VSS插件 兼容所有的网络技术,平台和设备 | 为桌面应用程序设计的.NET控件 适用于C#和VB.NET 能让你从任何TWAIN设备中获取图像的托管代码SDK |
![]() 一款多功能的条码读取控件 只需要几行代码就可以将条码读取功能 嵌入到Web或桌面应用程序 | 快速、轻松地为您的web应用程序 启用图像和视频捕捉 |
![]() 一个用以替代VSS的独立版本控制软件 | ![]() 一款基于SQL Server的本地/网络版本控制软件 |
2017慧都十四周年狂欢搞事情!砸金蛋100%抽现金红包、满额豪送iPhone X、iPhone 8、DevExpress汉化免费送、团队升级培训套包劲省10万元......更多惊喜等您来探索!
C# // Create a MailMessage object. MailMessage msg = new MailMessage(); // Add a header. msg.Headers.Add("MyHeader", "Some value for my own header", false); VB.NET ' Create a MailMessage object. Dim msg As New MailMessage() ' Add a header. msg.Headers.Add("MyHeader", "Some value for my own header", False)
C# // Remove the non-standard headers from the message. msg.Headers.RemoveCustomHeaders(); VB.NET ' Remove the non-standard headers from the message. msg.Headers.RemoveCustomHeaders()
C# // Remove the specified header. msg.Headers.Remove("X-Special-Header"); // Remove the first header. msg.Headers.RemoveAt(0); VB.NET ' Remove the specified header. msg.Headers.Remove("X-Special-Header") ' Remove the first header. msg.Headers.RemoveAt(0)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | DWObject.SelectSource();/* You should customize the settings after opening a source */DWObject.OpenSource(); /* Hide the User Interface of the scanner */ DWObject.IfShowUI = false; /* Use the document feeder to scan in batches */ DWObject.IfFeederEnabled = true; /* Scan in Simplex mode (only 1 side of the page) */ DWObject.IfDuplexEnabled = false; /* Scan pages in GRAY */ DWObject.PixelType = EnumDWT_PixelType.TWPT_GRAY;/* Scan pages in 200 DPI */DWObject.Resolution = 200; /* Start scanning */ DWObject.AcquireImage(); |
本次教程到此结束,希望能对Dynamic Web TWAIN的用户带来帮助,接下来还会有更多的相关教程,敬请期待!
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();
}
