Commit 4dadab67 刘韬

1

1 个父辈 79b9e98d
正在显示 76 个修改的文件 包含 714 行增加353 行删除
......@@ -9,9 +9,10 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BLL</RootNamespace>
<AssemblyName>BLL</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
......@@ -60,6 +61,9 @@
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="TcpKPIO">
<HintPath>..\..\..\DllLibrary\第三方\泥人科技-网络继电器\TcpKPIO.dll</HintPath>
</Reference>
<Reference Include="zxing, Version=0.16.6.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL">
<HintPath>..\packages\ZXing.Net.0.16.6\lib\net461\zxing.dll</HintPath>
</Reference>
......@@ -78,7 +82,10 @@
<Compile Include="Extension\Item_NanRui.cs" />
<Compile Include="Extension\Item_KaiFa.cs" />
<Compile Include="Extension\Item_PanaCIM.cs" />
<Compile Include="KND.cs" />
<Compile Include="IO\IOManage.cs" />
<Compile Include="IO\IO_Interface.cs" />
<Compile Include="IO\KND.cs" />
<Compile Include="IO\NirenIO.cs" />
<Compile Include="MonitorMouseKeyboard.cs" />
<Compile Include="PrinterHelper.cs" />
<Compile Include="PrintLabelEdit.cs" />
......
......@@ -303,6 +303,11 @@ namespace BLL
get => config.Read<string>(ClientID);
set => config.Write(ClientID, value);
}
public string iomodule
{
get => config.Read<string>(IOModule);
set => config.Write(IOModule, value);
}
public void Save()
{
config.Save();
......@@ -315,6 +320,7 @@ namespace BLL
private const string LANGUAGE = "Language";
private const string Smf_Server = "SmfServer";
private const string ClientID = "CID";
private const string IOModule = "IOModule";
private const string ENABLED_USER_LOGIN = "EnabledUserLogin";
private const string OPERATE_TIMEOUT = "OperateTimeout";
private const string CHECK_SHORTCUT = "CheckShortcut";
......
......@@ -29,9 +29,11 @@ namespace BLL
private int pnlWidth;
private FacePanel panel;
private System.Drawing.Point startPoint;
private Config config;
public Extension(Config config)
{
this.config = config;
LogNet.log.Info("加载扩展:" + config.ExtensionName);
alcoelectro = new(config);
......@@ -136,6 +138,30 @@ namespace BLL
};
listrow.Add(new object[] { L, R });
}
Dictionary<string, object> A = new()
{
{ "Type", "Button" },
{
"Attribute",
new Dictionary<string, object>()
{
{ "Name", "BtnGetReelID"},
{ "Font", "Arial,14,B,"},
//{"BorderWidth", 0},
{"Width", -1},
{"Height", 50},
{"Text", "Get ReelID"},
}
},
{
"Event",
new Dictionary<string, object>()
{
{ "Click", "GetHttpReelID"}
}
}
};
Dictionary<string, object> B = new()
{
{ "Type", "Button" },
......@@ -160,6 +186,8 @@ namespace BLL
}
}
};
if (!string.IsNullOrEmpty(config.HttpReelID))
listrow.Add(new object[] { A });
listrow.Add(new object[] { B });
rows = listrow.ToArray();
}
......
......@@ -51,46 +51,54 @@ namespace BLL
ReadReelID();
}
static bool mesResult = false;
Dictionary<string, string> lastkey = null;
//读码后第一步
public void SetKey(string[] originalCode, Dictionary<string, string> key, bool hasMatch)
{
mesResult = false;
SaveAddReelID();
var now = DateTime.Now;
var Reelidstr =GetReelid();
if (key.ContainsKey(config.ReelIDKeyWord))
lastkey = key;
mesResult = false;
var now = DateTime.Now;
if (!string.IsNullOrEmpty(config.ReelIDKeyWord))
{
key[config.ReelIDKeyWord] = Reelidstr;
var Reelidstr = GetReelid();
if (key.ContainsKey(config.ReelIDKeyWord))
key[config.ReelIDKeyWord] = Reelidstr;
else
key.Add(config.ReelIDKeyWord, Reelidstr);
}
else
key.Add(config.ReelIDKeyWord, Reelidstr);
//第一次刷新界面
for (int i = 0; i < extensions.Count; i++)
{
if (key.ContainsKey(extensions[i].Key))
extensions[i].Control.Text = key[extensions[i].Key];
}
if (!updatereelid(key))
return;
Application.DoEvents();
//mesResult = GetMESInfo(key);
//for (int i = 0; i < extensions.Count; i++)
//{
// if (key.ContainsKey(extensions[i].Key))
// extensions[i].Control.Text = key[extensions[i].Key];
//}
//if (!mesResult)
//{
// return;
//}
if (config.AutoPrint && hasMatch)
{
//if (CanPrint())
PrintLabel(null, EventArgs.Empty);
}
}
bool updatereelid(Dictionary<string, string> key) {
if (!string.IsNullOrEmpty(config.HttpReelID))
{
var newid = GetHttpReelID(key);
if (string.IsNullOrEmpty(newid))
return false;
key["ReelID"] = newid;
}
for (int i = 0; i < extensions.Count; i++)
{
if (extensions[i].Key.ToLower() == "reelid")
extensions[i].Control.Text = key["reelid"];
}
return true;
}
public void Update()
{
......@@ -131,19 +139,6 @@ namespace BLL
return text;
}
private bool CanPrint()
{
int index = extensions.FindIndex(match => match.Control.Name == "TxtPart");
if (index == -1) return false;
if (extensions[index].Control.Text == "") return false;
index = extensions.FindIndex(match => match.Control.Name == "TxtQty");
if (index == -1) return false;
if (extensions[index].Control.Text == "") return false;
return true;
}
private void ReadReelID()
{
try
......@@ -184,10 +179,11 @@ namespace BLL
}
}
private void GetHttpReelID(object sender, EventArgs e) {
updatereelid(lastkey);
}
private void PrintLabel(object sender, EventArgs e)
{
LogNet.log.Debug("Enter PrintLabel Method");
Dictionary<string, string> key = new();
......@@ -199,137 +195,50 @@ namespace BLL
else
key.Add(extensions[i].Key, extensions[i].Control.Text);
}
var keys =new List<string>(key.Keys);
//foreach (var kk in keys)
//{
// if (string.IsNullOrEmpty(key[kk]))
// key[kk] = "NA";
//}
Printing?.Invoke(key);
}
private bool GetMESInfo(Dictionary<string, string> keyv)
private string GetHttpReelID(Dictionary<string, string> key)
{
string url = config.HttpServer;
if (string.IsNullOrWhiteSpace(url))
return false;
if (TryGetDictValue(keyv, "PART")=="" && TryGetDictValue(keyv, "MPN") == "")
{
var fm = new FaceMessageBox("MES MSG", "CPN,MPN均为空,无法继续", System.Windows.Forms.MessageBoxButtons.OK);
fm.TopMost = true;
fm.ShowDialog();
return false;
//return "test";
string url = config.HttpReelID;
string json = Http.PostJson(url,null, key);
if (json == "") {
new FaceMessageBox("BoxReelIDInfoMaintain", "Api error", System.Windows.Forms.MessageBoxButtons.OK, true).ShowDialog();
return "";
}
//PART=C02-07129-01,QTY=10000,LOT=20211215,ASL=YAGEO,VEN=004284,DCODE=202150,TRACE=38K4420537,Reelid=KF2135800000212
int qty = 0;
int.TryParse(TryGetDictValue(keyv, "QTY"), out qty);
InitPPID_Request_DPS initPPID_Request_DPS = new InitPPID_Request_DPS()
JavaScriptSerializer serializer = new();
Dictionary<string, object> dic;
try
{
ReelID = TryGetDictValue(keyv,"Reelid"),
CPN = TryGetDictValue(keyv, "PART"),
QTY = qty,
LOT = TryGetDictValue(keyv, "LOT"),
ToLoc = TryGetDictValue(keyv, "ToLoc"),
FromLoc = TryGetDictValue(keyv, "FromLoc"),
DCODE = TryGetDictValue(keyv, "DCODE"),
PN = TryGetDictValue(keyv, "PN"),
LotNo = TryGetDictValue(keyv, "LotNo"),
UserId = TryGetDictValue(keyv, "UserId"),
PRODATE = TryGetDictValue(keyv, "PRODATE"),
BATCH = TryGetDictValue(keyv, "BATCH"),
MPN = TryGetDictValue(keyv, "MPN"),
SiteCode = TryGetDictValue(keyv, "SiteCode"),
VEN = TryGetDictValue(keyv, "VEN"),
TraceCode = TryGetDictValue(keyv, "Trace"),
};
if (string.IsNullOrWhiteSpace(initPPID_Request_DPS.ToLoc))
initPPID_Request_DPS.ToLoc = "CP30";
Dictionary<string, string> heads = new Dictionary<string, string>();
heads.Add("Token", "0001A156-7283-402F-895F-D3AE435CBA40");
LogNet.log.Info("Send:" + JsonConvert.SerializeObject(initPPID_Request_DPS));
string json = Http.PostJson(url, heads, initPPID_Request_DPS);
if (json == "") return false;
var respjson = JsonConvert.DeserializeObject<APIResponse>(json);
dic = (Dictionary<string, object>)serializer.DeserializeObject(json);
}
catch {
new FaceMessageBox("BoxReelIDInfoMaintain", "Api parse error:\r\n" + json, System.Windows.Forms.MessageBoxButtons.OK, true).ShowDialog();
return "";
}
if (!respjson.Success)
if (!dic.TryGetValue("CODE", out object value))
{
var fm = new FaceMessageBox("MES MSG", respjson.Error, System.Windows.Forms.MessageBoxButtons.OK);
fm.TopMost = true;
fm.ShowDialog();
return false;
new FaceMessageBox("BoxReelIDInfoMaintain", "Api return data error:\r\n" + json, System.Windows.Forms.MessageBoxButtons.OK, true).ShowDialog();
return "";
}
keyv["PART"] = respjson.Data.ToString();
//LogNet.log.Info(json);
return true;
}
string TryGetDictValue(Dictionary<string, string> dic, string key)
{
if (dic.ContainsKey(key))
if (Convert.ToInt32(value)!=0)
{
return dic[key];
new FaceMessageBox("BoxReelIDInfoMaintain", dic["MSG"].ToString(), System.Windows.Forms.MessageBoxButtons.OK, true).ShowDialog();
return "";
}
if (dic.TryGetValue("ReelID", out value))
return value.ToString();
else
return "";
}
public class InitPPID_Request_DPS
{
/*
* {
"ReelID":"A000001",
"PN":"RC0603FR-0710KL",
"LOT":"38G15508220018",
"QTY":"5000",
"PRODATE":"1719",
"BATCH":"RS000212"
*/
//PPID
public string ReelID { get; set; }
public string PN { get; set; }
public string LOT { get; set; }
public decimal QTY { get; set; }
public string PRODATE { get; set; }
public string BATCH { get; set; }
public string MPN { get; set; }
public string CPN { get; set; }
//工厂代码
public string SiteCode { get; set; }
//转出库位
public string FromLoc { get; set; }
//转入库位
public string ToLoc { get; set; }
//操作员工号
public string UserId { get; set; }
public string LotNo { get; set; }
public string DCODE { get; set; }
public string TraceCode { get; set; }
public string VEN { get; set; }
}
public class APIResponse
{
//错误消息
public string Error { get; set; }
public string Msg { get; set; }
//是否处理成功
public bool Success { get; set; }
//业务数据
public object Data { get; set; }
}
}
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
public class IOManage : IO_Interface
{
IO_Interface iom;
public IOManage(string ip,string iomodule="") {
if (string.IsNullOrWhiteSpace(iomodule))
iom = new KND_IO(ip);
else
iom = new NirenIO(ip);
iom.DI_Changed_Event += Iom_DI_Changed_Event;
}
private void Iom_DI_Changed_Event(Status[] sta)
{
DI_Changed_Event?.Invoke(sta);
}
/// <summary>
/// 自动读取DI委托
/// </summary>
/// <param name="sta">状态</param>
public delegate void DI_Changed(Status[] sta);
public string IP { get=>iom.IP; set=>iom.IP=value; }
public bool IsConn { get => iom.IsConn;}
public int Port { get => iom.Port; set => iom.Port = value; }
public event DI_Changed DI_Changed_Event;
public void Close()
{
iom.Close();
}
public bool Connect()
{
return iom.Connect();
}
public bool ReadDI(Addr add, out Status sta)
{
return iom.ReadDI(add, out sta);
}
public bool ReadDO(Addr add, out Status sta)
{
return iom.ReadDO(add, out sta);
}
public bool WriteDO(int add, Status sta)
{
return iom.WriteDO(add, sta);
}
}
}
namespace BLL
{
public interface IO_Interface
{
//string ErrInfo { get; }
//string Gateway { get; set; }
string IP { get; set; }
bool IsConn { get; }
//string Mask { get; set; }
int Port { get; set; }
event IOManage.DI_Changed DI_Changed_Event;
void Close();
bool Connect();
//bool ReadDI(Addr add, int count, out Status[] sta);
bool ReadDI(Addr add, out Status sta);
bool ReadDO(Addr add, out Status sta);
//bool ReadDO(Addr add, uint count, out Status[] sta);
//Status ReverseStatus(Status sta);
//bool WriteDO(Addr add, Status sta);
//bool WriteDO(Addr add, Status[] sta);
bool WriteDO(int add, Status sta);
//bool WriteDO_Reverse(Addr add, ref Status sta);
}
}
\ No newline at end of file
......@@ -12,7 +12,7 @@ namespace BLL
/// <summary>
/// 康奈德 IO
/// </summary>
public class KND_IO
public class KND_IO : IO_Interface
{
private bool loop;
private ushort _flag; //ModBus TCP 标识
......@@ -23,15 +23,11 @@ namespace BLL
private Thread tTrigger; //触发DI改变事件
private Status[] staTrigger;
/// <summary>
/// 自动读取DI委托
/// </summary>
/// <param name="sta">状态</param>
public delegate void DI_Changed(Status[] sta);
/// <summary>
/// 自动读取DI事件触发
/// </summary>
public event DI_Changed DI_Changed_Event;
public event IOManage.DI_Changed DI_Changed_Event;
/// <summary>
/// 康奈德
......@@ -46,7 +42,7 @@ namespace BLL
Gateway = "192.168.1.1";
Port = 502;
}
/// <summary>
/// IP地址
/// </summary>
......@@ -86,7 +82,8 @@ namespace BLL
Model.LogNet.log.Info("IO断开了,重新连接:" + client.Connected);
return client.Connected;
}
else {
else
{
return true;
}
}
......@@ -234,7 +231,7 @@ namespace BLL
n++;
}
}
Model.LogNet.log.Info(String.Format("WriteDO:"+ add.ToString()+ ":"+ sta.ToString()+ ",{0}", BitConverter.ToString(_buff)));
Model.LogNet.log.Info(String.Format("WriteDO:" + add.ToString() + ":" + sta.ToString() + ",{0}", BitConverter.ToString(_buff)));
return true;
}
catch (Exception ex)
......@@ -480,7 +477,7 @@ namespace BLL
else
n++;
}
// Model.LogNet.log.Info(String.Format("ReadDI:" + add.ToString() + ":" + sta.ToString() + ",recv:{0}", BitConverter.ToString(_buff)));
// Model.LogNet.log.Info(String.Format("ReadDI:" + add.ToString() + ":" + sta.ToString() + ",recv:{0}", BitConverter.ToString(_buff)));
if (_buff[7] != 2)
return false;
sta = new Status[count];
......@@ -537,19 +534,20 @@ namespace BLL
{
//lock (client)
//{
if (client.Available > 0)
{
Thread.Sleep(10);
if (!client.Connected)
continue;
int len = client.Receive(bb);
_buff = new byte[len];
Array.Copy(bb, _buff, len);
}
if (client.Available > 0)
{
Thread.Sleep(10);
if (!client.Connected)
continue;
int len = client.Receive(bb);
_buff = new byte[len];
Array.Copy(bb, _buff, len);
}
//}
Thread.Sleep(50);
}
catch(Exception e) {
catch (Exception e)
{
Model.LogNet.log.Info("Receive err:" + e.ToString());
}
finally
......@@ -569,7 +567,7 @@ namespace BLL
{
ReadDI(Addr.DI_1, 4, out staTrigger);
//Model.LogNet.log.Info("ErrInfo:" + ErrInfo);
Thread.Sleep(100);
}
}
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using TcpKPIO;
namespace BLL
{
public class NirenIO : IO_Interface
{
static int diCount = 2;
public event IOManage.DI_Changed DI_Changed_Event;
public string IP { get; set; }
public bool IsConn
{
get
{
var i= 0;
while (i < 5)
{
var isonline = KPIOServer.DeviceIsOnline(IP);
if (isonline)
return true;
i++;
Thread.Sleep(1000);
}
return false;
}
}
public int Port { get; set; }
public NirenIO(string ip)
{
IP = ip;
Port = 6000;
bool rtn = KPIOServer.StartServer(Port);
KPIOServer.DeviceDIChangeEvent += KPIOServer_DeviceDIChangeEvent;
IOLogUtil.info($"开启IO模块:{rtn}");
}
private void KPIOServer_DeviceDIChangeEvent(string ip, int[] diStatus)
{
Status[] statuses = new Status[diStatus.Length];
for (int i = 0; i < diStatus.Length; i++)
{
statuses[i] = diStatus[i] == 0 ? Status.On : Status.Off;
}
DI_Changed_Event?.Invoke(statuses);
}
public void Close()
{
KPIOServer.StopServer();
}
public bool Connect()
{
//throw new NotImplementedException();
return true;
}
public bool ReadDI(Addr add, out Status sta)
{
sta = Status.Off;
try
{
int index = ((int)add) - 10200;
var onoff = KPIOServer.GetDI(IP, index);
sta = onoff == 0 ? Status.Off : Status.On;
return true;
}
catch
{
return false;
}
}
public bool ReadDO(Addr add, out Status sta)
{
sta = KPIOServer.GetDO(IP, (int)add - 100) == 0 ? Status.Off : Status.On;
return true;
}
public bool WriteDO(int add, Status sta)
{
return KPIOServer.WriteDO(IP, add, sta== Status.On ?1:0);
}
}
}
......@@ -135,6 +135,10 @@ namespace BLL
keyword = null;
isCodeUsed = null;
code.ForEach((c)=> {
LogNet.log.Info($"扫描到 {c.CodeType},{c.Text}");
});
//优先匹配
int firstIndex = mateTemp.FindIndex(math => math.Name == firstMaterial);
if (firstIndex > -1)
......@@ -475,7 +479,6 @@ namespace BLL
return null;
}
//开头
if (codeMatch[i].MatchStart)
{
......@@ -506,7 +509,13 @@ namespace BLL
count++;
index += text.Length;
}
if (count == 0 || count > codeMatch[i].MiddleTextCount)
if (count == 0)
return null;
if (codeMatch[i].MatchMiddleType == -1 && count > codeMatch[i].MiddleTextCount)
return null;
if (codeMatch[i].MatchMiddleType == 0 && count != codeMatch[i].MiddleTextCount)
return null;
if (codeMatch[i].MatchMiddleType == 1 && count < codeMatch[i].MiddleTextCount)
return null;
}
......@@ -541,7 +550,7 @@ namespace BLL
}
//截取
if (matchCount == 0) continue;
if (matchCount == 0 && !codeMatch[i].MatchISNumber) continue;
int startIndex = codeMatch[i].SubstringStart;
int length = codeMatch[i].SubstringLength;
if (startIndex >= code.Length)
......@@ -557,10 +566,17 @@ namespace BLL
length = code.Length - startIndex;
}
var filtercode = code.Substring(startIndex, length);
if (codeMatch[i].MatchISNumber) {
if (!int.TryParse(filtercode, out _))
return null;
}
if (key.ContainsKey(codeMatch[i].Keyword))
key[codeMatch[i].Keyword] = code.Substring(startIndex, length);
key[codeMatch[i].Keyword] = filtercode;
else
key.Add(codeMatch[i].Keyword, code.Substring(startIndex, length));
key.Add(codeMatch[i].Keyword, filtercode);
}
return key;
}
......
......@@ -112,9 +112,17 @@ namespace BLL
if (dlg.ShowDialog() != DialogResult.OK) return;
using System.Drawing.Printing.PrintDocument print = new() { PrinterSettings = dlg.PrinterSettings };
print.PrintPage += PrintTest_PrintPage;
print.DefaultPageSettings.Landscape = dlg.PrinterSettings.DefaultPageSettings.Landscape;
interimLabel = label;
PrintPreviewDialog ppd = new PrintPreviewDialog();
ppd.Document = print;
ppd.WindowState = FormWindowState.Maximized;
ppd.ShowDialog();
print.Print();
}
......@@ -221,6 +229,11 @@ namespace BLL
private void PrintTest_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
var brect = new RectangleF(0, 0, interimLabel.Size.Width, interimLabel.Size.Height);
brect = ObjConversion.MmToPx(brect);
Bitmap bmp = new Bitmap((int)brect.Width, (int)brect.Height);
Graphics gg = Graphics.FromImage(bmp);
for (int i = 0; i < interimLabel.Field.Count; i++)
{
PrintLabelField field = interimLabel.Field[i];
......@@ -229,21 +242,34 @@ namespace BLL
if (field.Type == PrintLabelFieldType.Text)
{
if (interimLabel.FieldShowKey)
{
e.Graphics.DrawString(field.Text, field.Font, Brushes.Black, rect);
gg.DrawString(field.Text, field.Font, Brushes.Black, rect);
}
else
{
e.Graphics.DrawString(ObjConversion.StrRemoveKey(field.Text), field.Font, Brushes.Black, rect);
gg.DrawString(ObjConversion.StrRemoveKey(field.Text), field.Font, Brushes.Black, rect);
}
}
else
{
if (field.Image != null)
e.Graphics.DrawImage(field.Image, rect);
{ e.Graphics.DrawImage(field.Image, rect);
gg.DrawImage(field.Image, rect);
}
}
e.Graphics.DrawRectangle(Pens.LightGray, rect.X, rect.Y, rect.Width, rect.Height);
//e.Graphics.DrawRectangle(Pens.LightGray, rect.X, rect.Y, rect.Width, rect.Height);
}
gg.Save();
bmp.Save("printlabel.bmp");
}
private void PrintLast_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.NearestNeighbor;
e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.None;
for (int i = 0; i < interimLabel.Field.Count; i++)
{
PrintLabelField field = interimLabel.Field[i];
......
20fc287a1dca9a6cc2353ee6cd4335c8f8b0ea0f
f08182a8667a0d04a12b18635a66f3406a72ff45
......@@ -93,3 +93,6 @@ D:\rick\vs\SmartScan\BLL\bin\Debug\halcondotnet.dll
D:\rick\vs\SmartScan\BLL\bin\Debug\Asa.Camera.VisionLib.pdb
D:\rick\vs\SmartScan\BLL\bin\Debug\Asa.Camera.VisionLib.xml
D:\rick\vs\SmartScan\BLL\bin\Debug\MvCameraControl.Net.xml
D:\rick\vs\SmartScan\BLL\bin\Debug\TcpKPIO.dll
D:\rick\vs\SmartScan\BLL\bin\Debug\TcpKPIO.pdb
D:\rick\vs\SmartScan\BLL\bin\Debug\TcpKPIO.xml
......@@ -2,5 +2,5 @@
<packages>
<package id="log4net" version="2.0.12" targetFramework="net461" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net461" />
<package id="ZXing.Net" version="0.16.6" targetFramework="net461" />
<package id="ZXing.Net" version="0.16.6" targetFramework="net461" requireReinstallation="true" />
</packages>
\ No newline at end of file
......@@ -55,7 +55,7 @@ namespace Model
LogNet.log.Info("Return:" + s);
return FormatContent(s);
}
public static string PostJson<T>(string url,Dictionary<string,string> headers, T jsonobject,int timeout = 10000)
public static string PostJson<T>(string url, Dictionary<string, string> headers, T jsonobject, int timeout = 10000, bool wlog=true)
{
RestClient client = new(url) { Timeout = timeout };
client.UseSerializer(new CustSerialize());
......@@ -71,7 +71,8 @@ namespace Model
request.AddJsonBody(jsonobject);
IRestResponse response = client.Execute(request);
string s = response.Content;
LogNet.log.Info("Return:" + s);
if (wlog)
LogNet.log.Info("Return:" + s);
return s;
}
private static string FormatContent(string s)
......
......@@ -17,6 +17,7 @@ namespace Model
public string CodeType { get; set; } = "";
public string StartText { get; set; } = "";
public string MiddleText { get; set; } = "";
public int MatchMiddleType { get; set; } = -1;
public int MiddleTextCount { get; set; } = 1;
public string EndText { get; set; } = "";
public string SplitText { get; set; } = "";
......@@ -28,7 +29,7 @@ namespace Model
public int SubstringStart { get; set; } = 0;
public int SubstringLength { get; set; } = 1;
public int SplitPart { get; set; } = 1;
public bool MatchISNumber { get; set; } = false;
public MaterialCodeMatch Clone()
{
......
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>
</configuration>
\ No newline at end of file
<appSettings>
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
</appSettings>
</configuration>
......@@ -13,7 +13,7 @@ namespace SmartScan
public static BLL.MaterialEdit mateEdit;
public static Model.OCR ocr;
public static Asa.Camera.VisionLib cameraVision;
public static BLL.KND_IO ioModule;
public static BLL.IO_Interface ioModule;
public static LightSource lightSource;
public static ServerCommunication SCMM;
......
......@@ -61,7 +61,7 @@ namespace SmartScan
this.BtnOK.BorderWidth = 2;
this.BtnOK.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnOK.HoldPress = false;
this.BtnOK.Location = new System.Drawing.Point(508, 656);
this.BtnOK.Location = new System.Drawing.Point(508, 766);
this.BtnOK.Name = "BtnOK";
this.BtnOK.Padding = new System.Windows.Forms.Padding(3);
this.BtnOK.Size = new System.Drawing.Size(120, 40);
......@@ -77,7 +77,7 @@ namespace SmartScan
this.BtnCancel.BorderWidth = 2;
this.BtnCancel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnCancel.HoldPress = false;
this.BtnCancel.Location = new System.Drawing.Point(634, 656);
this.BtnCancel.Location = new System.Drawing.Point(634, 766);
this.BtnCancel.Name = "BtnCancel";
this.BtnCancel.Padding = new System.Windows.Forms.Padding(3);
this.BtnCancel.Size = new System.Drawing.Size(120, 40);
......@@ -112,7 +112,7 @@ namespace SmartScan
this.PnlTemp.Location = new System.Drawing.Point(11, 184);
this.PnlTemp.Name = "PnlTemp";
this.PnlTemp.Padding = new System.Windows.Forms.Padding(3);
this.PnlTemp.Size = new System.Drawing.Size(743, 466);
this.PnlTemp.Size = new System.Drawing.Size(743, 576);
this.PnlTemp.TabIndex = 28;
this.PnlTemp.Text = "facePanel1";
this.PnlTemp.TitleFont = new System.Drawing.Font("宋体", 12F);
......@@ -131,7 +131,7 @@ namespace SmartScan
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(765, 707);
this.ClientSize = new System.Drawing.Size(765, 817);
this.Controls.Add(this.PnlTemp);
this.Controls.Add(this.BtnAddMatch);
this.Controls.Add(this.BtnCancel);
......
......@@ -143,11 +143,27 @@ namespace SmartScan
foreach (FaceButton btn in matchButton.Keys)
{
string key = matchButton[btn].GetMatchKey();
if (string.IsNullOrWhiteSpace(key)) {
string text = Language.Dialog("KeyEmpty");
new FaceMessageBox("", text, MessageBoxButtons.OK).ShowDialog();
Btn_Click(btn, null);
return;
}
if (keyTemp.ContainsKey(key))
keyTemp[key]++;
else
keyTemp.Add(key, 1);
}
if (matchButton.Keys.Count == 0) {
var mateCopy = Common.mateEdit.ToCopy();
var findocrm = mateCopy.Find(m => m.Ocr.Find(o => o.CodeID == this.codeID) != null);
if (findocrm != null) {
string text = Language.Dialog("ThisMatchHasOcrCantdelete");
new FaceMessageBox("", text, MessageBoxButtons.OK).ShowDialog();
return;
}
}
foreach (string key in keyTemp.Keys)
{
......@@ -165,6 +181,15 @@ namespace SmartScan
{
MaterialCodeMatch match = matchButton[btn].GetMatch();
match.CodeID = codeID;
var hasmatchselect = match.MatchISNumber || match.CheckCodeType || match.MatchEnd || match.MatchMaxLength || match.MatchMiddle || match.MatchMinLength || match.MatchSplit || match.MatchStart;
if (!hasmatchselect)
{
string text = Language.Dialog("NoMatchSelect");
new FaceMessageBox("", text, MessageBoxButtons.OK).ShowDialog();
Btn_Click(btn, null);
return;
}
CodeMatch.Add(match);
}
DialogResult = DialogResult.OK;
......
......@@ -35,9 +35,9 @@ namespace SmartScan
if (Common.config.EnabledIO)
{
string ip = Common.config.IOIPAddress;
Common.ioModule = new BLL.KND_IO(ip);
Common.ioModule = new BLL.IOManage(ip,Common.config.iomodule);
Common.ioModule.Connect();
LogNet.log.Info($"加载IO模块,IP地址:{ip}");
LogNet.log.Info($"加载IO模块,IP地址:{ip},iomodule:{Common.config.iomodule}");
}
if (Common.config.EnabledOCR)
......
......@@ -257,8 +257,7 @@ namespace SmartScan
//
// FrmMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(1096, 815);
this.Controls.Add(this.LblUserName);
this.Controls.Add(this.LblVersion);
......
......@@ -323,10 +323,10 @@ namespace SmartScan
private void BtnTriggerIO_Click(object sender, EventArgs e)
{
LogNet.log.Info("按钮点击触发Work");
//Task.Run(()=>{
Task.Run(()=>{
scanWork.Scan();
//scanWork.TouchOff();
//});
});
}
......@@ -342,14 +342,18 @@ namespace SmartScan
return Common.frmWaitting.ShowDialog();
}
public void CloseWaittingDialog() {
if (this.InvokeRequired)
if (Common.frmMain.InvokeRequired)
{
if (Common.frmWaitting.Created)
{
this.Invoke(delegate ()
try
{
CloseWaittingDialog();
});
Common.frmMain.Invoke(delegate ()
{
CloseWaittingDialog();
});
}
catch { }
};
return;
}
......@@ -358,9 +362,9 @@ namespace SmartScan
public void SetWaittingMsg(string msg)
{
if (this.InvokeRequired)
if (Common.frmMain.InvokeRequired)
{
this.Invoke(delegate ()
Common.frmMain.Invoke(delegate ()
{
SetWaittingMsg(msg);
});
......@@ -368,6 +372,7 @@ namespace SmartScan
}
Common.SCMM.ShowMsg(msg, 3, msgType.INFO);
Common.frmWaitting.SetMessage(msg);
Application.DoEvents();
}
}
}
......@@ -123,7 +123,7 @@ namespace SmartScan
this.BtnOK.BorderWidth = 2;
this.BtnOK.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnOK.HoldPress = false;
this.BtnOK.Location = new System.Drawing.Point(782, 707);
this.BtnOK.Location = new System.Drawing.Point(891, 827);
this.BtnOK.Name = "BtnOK";
this.BtnOK.Padding = new System.Windows.Forms.Padding(3);
this.BtnOK.Size = new System.Drawing.Size(120, 40);
......@@ -139,7 +139,7 @@ namespace SmartScan
this.BtnCancel.BorderWidth = 2;
this.BtnCancel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnCancel.HoldPress = false;
this.BtnCancel.Location = new System.Drawing.Point(908, 707);
this.BtnCancel.Location = new System.Drawing.Point(1017, 827);
this.BtnCancel.Name = "BtnCancel";
this.BtnCancel.Padding = new System.Windows.Forms.Padding(3);
this.BtnCancel.Size = new System.Drawing.Size(120, 40);
......@@ -159,10 +159,10 @@ namespace SmartScan
this.PnlTemp.Location = new System.Drawing.Point(177, 55);
this.PnlTemp.Name = "PnlTemp";
this.PnlTemp.Padding = new System.Windows.Forms.Padding(3);
this.PnlTemp.Size = new System.Drawing.Size(977, 646);
this.PnlTemp.Size = new System.Drawing.Size(1086, 766);
this.PnlTemp.TabIndex = 11;
this.PnlTemp.Text = "facePanel1";
this.PnlTemp.TitleFont = new System.Drawing.Font("宋体", 12F);
this.PnlTemp.TitleFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.PnlTemp.Visible = false;
//
// BtnApply
......@@ -173,7 +173,7 @@ namespace SmartScan
this.BtnApply.BorderWidth = 2;
this.BtnApply.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnApply.HoldPress = false;
this.BtnApply.Location = new System.Drawing.Point(1034, 707);
this.BtnApply.Location = new System.Drawing.Point(1143, 827);
this.BtnApply.Name = "BtnApply";
this.BtnApply.Padding = new System.Windows.Forms.Padding(3);
this.BtnApply.Size = new System.Drawing.Size(120, 40);
......@@ -183,9 +183,8 @@ namespace SmartScan
//
// FrmSet
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1165, 758);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(1274, 878);
this.Controls.Add(this.BtnApply);
this.Controls.Add(this.PnlTemp);
this.Controls.Add(this.BtnCancel);
......
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace SmartScan.Properties
{
namespace SmartScan.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
public static Settings Default {
get {
return defaultInstance;
}
}
......
......@@ -67,15 +67,18 @@ namespace SmartScan
if (!isRun) return;
if (isTouch) return;
isTouch = true;
if (!Common.config.Backgrounder)
btnMatchedName.Visible = false;
Common.extension.Clear();
btnMatchedName.Invoke(delegate() {
if (!Common.config.Backgrounder)
btnMatchedName.Visible = false;
Common.extension.Clear();
});
var t = Task.Run(() =>
{
try
{
workCodeInfo = new();
workCodeKeyword = new();
workCodeKeyword = new(StringComparer.OrdinalIgnoreCase);
originalCodeText = null;
originalCodeIsUsed = null;
......@@ -111,7 +114,11 @@ namespace SmartScan
Common.frmMain.CloseWaittingDialog();
}
});
Common.frmMain.ShowWaittingDialog();
Common.frmMain.Invoke(delegate ()
{
Common.frmMain.ShowWaittingDialog();
});
}
......@@ -127,7 +134,7 @@ namespace SmartScan
btnMatchedName.Visible = false;
Common.extension.Clear();
workCodeInfo = new();
workCodeKeyword = new();
workCodeKeyword = new(StringComparer.OrdinalIgnoreCase);
originalCodeText = code;
originalCodeIsUsed = null;
......
......@@ -37,11 +37,14 @@ namespace SmartScan
server = Common.config.SmfServer;
CID = Common.config.CID;
//Common.config.Save();
serverConnectTimer.Interval = 1000;
serverConnectTimer.AutoReset = true;
serverConnectTimer.Enabled = true;
serverConnectTimer.Elapsed += ServerConnectTimer_Elapsed;
GC.KeepAlive(serverConnectTimer);
if (server.ToLower().StartsWith("http"))
{
serverConnectTimer.Interval = 1000;
serverConnectTimer.AutoReset = true;
serverConnectTimer.Enabled = true;
serverConnectTimer.Elapsed += ServerConnectTimer_Elapsed;
GC.KeepAlive(serverConnectTimer);
}
}
~ServerCommunication()
{
......@@ -124,7 +127,7 @@ namespace SmartScan
DateTime time = DateTime.Now;
//构建发送给服务器的对象
Operation lineOperation = getStatus();
var returntxt = Http.PostJson(GetPostApi(), new Dictionary<string, string>(), lineOperation,900);
var returntxt = Http.PostJson(GetPostApi(), new Dictionary<string, string>(), lineOperation,900,false);
Operation resultOperation = JsonConvert.DeserializeObject<Operation>(returntxt);
if (resultOperation==null)
{
......
......@@ -34,7 +34,6 @@ namespace SmartScan
this.LblCodeType = new Asa.FaceControl.FaceLabel();
this.ChkCheckCodeType = new Asa.FaceControl.FaceCheckBox();
this.NudMiddleTextCount = new Asa.FaceControl.FaceNumericUpDown();
this.LblMiddleTextCount = new Asa.FaceControl.FaceLabel();
this.NudSplitPart = new Asa.FaceControl.FaceNumericUpDown();
this.LblSplitPart = new Asa.FaceControl.FaceLabel();
this.CboMatchingSplit = new Asa.FaceControl.FaceComboBox();
......@@ -59,6 +58,8 @@ namespace SmartScan
this.NudMaxLength = new Asa.FaceControl.FaceNumericUpDown();
this.BtnDel = new Asa.FaceControl.FaceButton();
this.faceTextBox1 = new Asa.FaceControl.FaceTextBox();
this.ChkMatchisnumber = new Asa.FaceControl.FaceCheckBox();
this.ChoMatchMiddleType = new Asa.FaceControl.FaceComboBox();
this.facePanel1.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
......@@ -86,10 +87,11 @@ namespace SmartScan
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 22F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 28F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 22F));
this.tableLayoutPanel1.Controls.Add(this.ChoMatchMiddleType, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.ChkMatchisnumber, 0, 7);
this.tableLayoutPanel1.Controls.Add(this.LblCodeType, 3, 7);
this.tableLayoutPanel1.Controls.Add(this.ChkCheckCodeType, 2, 7);
this.tableLayoutPanel1.Controls.Add(this.NudMiddleTextCount, 1, 4);
this.tableLayoutPanel1.Controls.Add(this.LblMiddleTextCount, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.NudSplitPart, 1, 6);
this.tableLayoutPanel1.Controls.Add(this.LblSplitPart, 0, 6);
this.tableLayoutPanel1.Controls.Add(this.CboMatchingSplit, 1, 5);
......@@ -107,27 +109,27 @@ namespace SmartScan
this.tableLayoutPanel1.Controls.Add(this.TxtMatchingMiddleText, 1, 3);
this.tableLayoutPanel1.Controls.Add(this.LblStart, 2, 2);
this.tableLayoutPanel1.Controls.Add(this.LblKeyword, 2, 1);
this.tableLayoutPanel1.Controls.Add(this.ChkCaseSensitivity, 0, 7);
this.tableLayoutPanel1.Controls.Add(this.ChkCaseSensitivity, 0, 8);
this.tableLayoutPanel1.Controls.Add(this.ChkMinLength, 2, 5);
this.tableLayoutPanel1.Controls.Add(this.NudMinLength, 3, 5);
this.tableLayoutPanel1.Controls.Add(this.ChkMaxLength, 2, 6);
this.tableLayoutPanel1.Controls.Add(this.NudMaxLength, 3, 6);
this.tableLayoutPanel1.Controls.Add(this.BtnDel, 0, 8);
this.tableLayoutPanel1.Controls.Add(this.BtnDel, 0, 9);
this.tableLayoutPanel1.Controls.Add(this.faceTextBox1, 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 10;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 45F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 45F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 45F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 45F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 45F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 45F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 45F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 45F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 45F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 45F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(508, 461);
this.tableLayoutPanel1.TabIndex = 43;
//
......@@ -138,10 +140,10 @@ namespace SmartScan
this.LblCodeType.BorderWidth = 0;
this.LblCodeType.Dock = System.Windows.Forms.DockStyle.Fill;
this.LblCodeType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblCodeType.Location = new System.Drawing.Point(398, 353);
this.LblCodeType.Location = new System.Drawing.Point(398, 318);
this.LblCodeType.Name = "LblCodeType";
this.LblCodeType.Padding = new System.Windows.Forms.Padding(3);
this.LblCodeType.Size = new System.Drawing.Size(107, 44);
this.LblCodeType.Size = new System.Drawing.Size(107, 39);
this.LblCodeType.TabIndex = 52;
this.LblCodeType.Text = "-";
this.LblCodeType.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
......@@ -153,10 +155,10 @@ namespace SmartScan
this.ChkCheckCodeType.BorderWidth = 0;
this.ChkCheckCodeType.Dock = System.Windows.Forms.DockStyle.Fill;
this.ChkCheckCodeType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChkCheckCodeType.Location = new System.Drawing.Point(256, 353);
this.ChkCheckCodeType.Location = new System.Drawing.Point(256, 318);
this.ChkCheckCodeType.Name = "ChkCheckCodeType";
this.ChkCheckCodeType.Padding = new System.Windows.Forms.Padding(3);
this.ChkCheckCodeType.Size = new System.Drawing.Size(136, 44);
this.ChkCheckCodeType.Size = new System.Drawing.Size(136, 39);
this.ChkCheckCodeType.TabIndex = 51;
this.ChkCheckCodeType.Text = "CheckCodeType";
this.ChkCheckCodeType.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
......@@ -170,32 +172,17 @@ namespace SmartScan
this.NudMiddleTextCount.Dock = System.Windows.Forms.DockStyle.Fill;
this.NudMiddleTextCount.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.NudMiddleTextCount.Increment = 1F;
this.NudMiddleTextCount.Location = new System.Drawing.Point(145, 203);
this.NudMiddleTextCount.Location = new System.Drawing.Point(145, 183);
this.NudMiddleTextCount.Maximum = 100F;
this.NudMiddleTextCount.Minimum = 1F;
this.NudMiddleTextCount.Name = "NudMiddleTextCount";
this.NudMiddleTextCount.Padding = new System.Windows.Forms.Padding(3);
this.NudMiddleTextCount.Size = new System.Drawing.Size(105, 44);
this.NudMiddleTextCount.Size = new System.Drawing.Size(105, 39);
this.NudMiddleTextCount.TabIndex = 50;
this.NudMiddleTextCount.Text = "1";
this.NudMiddleTextCount.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.NudMiddleTextCount.Value = 1F;
//
// LblMiddleTextCount
//
this.LblMiddleTextCount.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.LblMiddleTextCount.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.LblMiddleTextCount.BorderWidth = 0;
this.LblMiddleTextCount.Dock = System.Windows.Forms.DockStyle.Fill;
this.LblMiddleTextCount.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblMiddleTextCount.Location = new System.Drawing.Point(3, 203);
this.LblMiddleTextCount.Name = "LblMiddleTextCount";
this.LblMiddleTextCount.Padding = new System.Windows.Forms.Padding(3);
this.LblMiddleTextCount.Size = new System.Drawing.Size(136, 44);
this.LblMiddleTextCount.TabIndex = 49;
this.LblMiddleTextCount.Text = "Count";
this.LblMiddleTextCount.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// NudSplitPart
//
this.NudSplitPart.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
......@@ -205,12 +192,12 @@ namespace SmartScan
this.NudSplitPart.Dock = System.Windows.Forms.DockStyle.Fill;
this.NudSplitPart.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.NudSplitPart.Increment = 1F;
this.NudSplitPart.Location = new System.Drawing.Point(145, 303);
this.NudSplitPart.Location = new System.Drawing.Point(145, 273);
this.NudSplitPart.Maximum = 100F;
this.NudSplitPart.Minimum = 1F;
this.NudSplitPart.Name = "NudSplitPart";
this.NudSplitPart.Padding = new System.Windows.Forms.Padding(3);
this.NudSplitPart.Size = new System.Drawing.Size(105, 44);
this.NudSplitPart.Size = new System.Drawing.Size(105, 39);
this.NudSplitPart.TabIndex = 47;
this.NudSplitPart.Text = "1";
this.NudSplitPart.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
......@@ -224,10 +211,10 @@ namespace SmartScan
this.LblSplitPart.BorderWidth = 0;
this.LblSplitPart.Dock = System.Windows.Forms.DockStyle.Fill;
this.LblSplitPart.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblSplitPart.Location = new System.Drawing.Point(3, 303);
this.LblSplitPart.Location = new System.Drawing.Point(3, 273);
this.LblSplitPart.Name = "LblSplitPart";
this.LblSplitPart.Padding = new System.Windows.Forms.Padding(3);
this.LblSplitPart.Size = new System.Drawing.Size(136, 44);
this.LblSplitPart.Size = new System.Drawing.Size(136, 39);
this.LblSplitPart.TabIndex = 46;
this.LblSplitPart.Text = "Field";
this.LblSplitPart.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
......@@ -239,12 +226,12 @@ namespace SmartScan
this.CboMatchingSplit.BorderWidth = 2;
this.CboMatchingSplit.Dock = System.Windows.Forms.DockStyle.Fill;
this.CboMatchingSplit.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.CboMatchingSplit.Location = new System.Drawing.Point(145, 253);
this.CboMatchingSplit.Location = new System.Drawing.Point(145, 228);
this.CboMatchingSplit.Name = "CboMatchingSplit";
this.CboMatchingSplit.Padding = new System.Windows.Forms.Padding(3);
this.CboMatchingSplit.SelectedIndex = -1;
this.CboMatchingSplit.SelectedText = "";
this.CboMatchingSplit.Size = new System.Drawing.Size(105, 44);
this.CboMatchingSplit.Size = new System.Drawing.Size(105, 39);
this.CboMatchingSplit.TabIndex = 45;
this.CboMatchingSplit.Text = "faceComboBox1";
this.CboMatchingSplit.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
......@@ -259,10 +246,10 @@ namespace SmartScan
this.ChkMatchingSplit.BorderWidth = 0;
this.ChkMatchingSplit.Dock = System.Windows.Forms.DockStyle.Fill;
this.ChkMatchingSplit.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChkMatchingSplit.Location = new System.Drawing.Point(3, 253);
this.ChkMatchingSplit.Location = new System.Drawing.Point(3, 228);
this.ChkMatchingSplit.Name = "ChkMatchingSplit";
this.ChkMatchingSplit.Padding = new System.Windows.Forms.Padding(3);
this.ChkMatchingSplit.Size = new System.Drawing.Size(136, 44);
this.ChkMatchingSplit.Size = new System.Drawing.Size(136, 39);
this.ChkMatchingSplit.TabIndex = 44;
this.ChkMatchingSplit.Text = "Split";
this.ChkMatchingSplit.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
......@@ -275,10 +262,10 @@ namespace SmartScan
this.ChkMatchingStart.BorderWidth = 0;
this.ChkMatchingStart.Dock = System.Windows.Forms.DockStyle.Fill;
this.ChkMatchingStart.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChkMatchingStart.Location = new System.Drawing.Point(3, 53);
this.ChkMatchingStart.Location = new System.Drawing.Point(3, 48);
this.ChkMatchingStart.Name = "ChkMatchingStart";
this.ChkMatchingStart.Padding = new System.Windows.Forms.Padding(3);
this.ChkMatchingStart.Size = new System.Drawing.Size(136, 44);
this.ChkMatchingStart.Size = new System.Drawing.Size(136, 39);
this.ChkMatchingStart.TabIndex = 25;
this.ChkMatchingStart.Text = "Start";
this.ChkMatchingStart.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
......@@ -291,10 +278,10 @@ namespace SmartScan
this.tableLayoutPanel1.SetColumnSpan(this.ChkLengthEnd, 2);
this.ChkLengthEnd.Dock = System.Windows.Forms.DockStyle.Fill;
this.ChkLengthEnd.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChkLengthEnd.Location = new System.Drawing.Point(256, 203);
this.ChkLengthEnd.Location = new System.Drawing.Point(256, 183);
this.ChkLengthEnd.Name = "ChkLengthEnd";
this.ChkLengthEnd.Padding = new System.Windows.Forms.Padding(3);
this.ChkLengthEnd.Size = new System.Drawing.Size(249, 44);
this.ChkLengthEnd.Size = new System.Drawing.Size(249, 39);
this.ChkLengthEnd.TabIndex = 42;
this.ChkLengthEnd.Text = "faceCheckBox7";
this.ChkLengthEnd.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
......@@ -307,10 +294,10 @@ namespace SmartScan
this.ChkMatchingEnd.BorderWidth = 0;
this.ChkMatchingEnd.Dock = System.Windows.Forms.DockStyle.Fill;
this.ChkMatchingEnd.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChkMatchingEnd.Location = new System.Drawing.Point(3, 103);
this.ChkMatchingEnd.Location = new System.Drawing.Point(3, 93);
this.ChkMatchingEnd.Name = "ChkMatchingEnd";
this.ChkMatchingEnd.Padding = new System.Windows.Forms.Padding(3);
this.ChkMatchingEnd.Size = new System.Drawing.Size(136, 44);
this.ChkMatchingEnd.Size = new System.Drawing.Size(136, 39);
this.ChkMatchingEnd.TabIndex = 26;
this.ChkMatchingEnd.Text = "End";
this.ChkMatchingEnd.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
......@@ -324,12 +311,12 @@ namespace SmartScan
this.NudLength.Dock = System.Windows.Forms.DockStyle.Fill;
this.NudLength.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.NudLength.Increment = 1F;
this.NudLength.Location = new System.Drawing.Point(398, 153);
this.NudLength.Location = new System.Drawing.Point(398, 138);
this.NudLength.Maximum = 100F;
this.NudLength.Minimum = 1F;
this.NudLength.Name = "NudLength";
this.NudLength.Padding = new System.Windows.Forms.Padding(3);
this.NudLength.Size = new System.Drawing.Size(107, 44);
this.NudLength.Size = new System.Drawing.Size(107, 39);
this.NudLength.TabIndex = 41;
this.NudLength.Text = "1";
this.NudLength.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
......@@ -343,10 +330,10 @@ namespace SmartScan
this.ChkMatchingMiddle.BorderWidth = 0;
this.ChkMatchingMiddle.Dock = System.Windows.Forms.DockStyle.Fill;
this.ChkMatchingMiddle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChkMatchingMiddle.Location = new System.Drawing.Point(3, 153);
this.ChkMatchingMiddle.Location = new System.Drawing.Point(3, 138);
this.ChkMatchingMiddle.Name = "ChkMatchingMiddle";
this.ChkMatchingMiddle.Padding = new System.Windows.Forms.Padding(3);
this.ChkMatchingMiddle.Size = new System.Drawing.Size(136, 44);
this.ChkMatchingMiddle.Size = new System.Drawing.Size(136, 39);
this.ChkMatchingMiddle.TabIndex = 27;
this.ChkMatchingMiddle.Text = "Middle";
this.ChkMatchingMiddle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
......@@ -360,12 +347,12 @@ namespace SmartScan
this.NudStart.Dock = System.Windows.Forms.DockStyle.Fill;
this.NudStart.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.NudStart.Increment = 1F;
this.NudStart.Location = new System.Drawing.Point(398, 103);
this.NudStart.Location = new System.Drawing.Point(398, 93);
this.NudStart.Maximum = 100F;
this.NudStart.Minimum = 0F;
this.NudStart.Name = "NudStart";
this.NudStart.Padding = new System.Windows.Forms.Padding(3);
this.NudStart.Size = new System.Drawing.Size(107, 44);
this.NudStart.Size = new System.Drawing.Size(107, 39);
this.NudStart.TabIndex = 40;
this.NudStart.Text = "0";
this.NudStart.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
......@@ -378,7 +365,7 @@ namespace SmartScan
this.TxtMatchingStartText.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.TxtMatchingStartText.BorderWidth = 2;
this.TxtMatchingStartText.Dock = System.Windows.Forms.DockStyle.Fill;
this.TxtMatchingStartText.Location = new System.Drawing.Point(145, 53);
this.TxtMatchingStartText.Location = new System.Drawing.Point(145, 48);
this.TxtMatchingStartText.MaxLength = 32767;
this.TxtMatchingStartText.Name = "TxtMatchingStartText";
this.TxtMatchingStartText.Padding = new System.Windows.Forms.Padding(3);
......@@ -387,7 +374,7 @@ namespace SmartScan
this.TxtMatchingStartText.SelectionStart = 0;
this.TxtMatchingStartText.ShowDel = true;
this.TxtMatchingStartText.ShowQuery = false;
this.TxtMatchingStartText.Size = new System.Drawing.Size(105, 44);
this.TxtMatchingStartText.Size = new System.Drawing.Size(105, 39);
this.TxtMatchingStartText.TabIndex = 31;
this.TxtMatchingStartText.Text = "faceTextBox1";
//
......@@ -398,12 +385,12 @@ namespace SmartScan
this.CboKeyword.BorderWidth = 2;
this.CboKeyword.Dock = System.Windows.Forms.DockStyle.Fill;
this.CboKeyword.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.CboKeyword.Location = new System.Drawing.Point(398, 53);
this.CboKeyword.Location = new System.Drawing.Point(398, 48);
this.CboKeyword.Name = "CboKeyword";
this.CboKeyword.Padding = new System.Windows.Forms.Padding(3);
this.CboKeyword.SelectedIndex = -1;
this.CboKeyword.SelectedText = "";
this.CboKeyword.Size = new System.Drawing.Size(107, 44);
this.CboKeyword.Size = new System.Drawing.Size(107, 39);
this.CboKeyword.TabIndex = 39;
this.CboKeyword.Text = "faceComboBox1";
this.CboKeyword.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
......@@ -415,7 +402,7 @@ namespace SmartScan
this.TxtMatchingEndText.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.TxtMatchingEndText.BorderWidth = 2;
this.TxtMatchingEndText.Dock = System.Windows.Forms.DockStyle.Fill;
this.TxtMatchingEndText.Location = new System.Drawing.Point(145, 103);
this.TxtMatchingEndText.Location = new System.Drawing.Point(145, 93);
this.TxtMatchingEndText.MaxLength = 32767;
this.TxtMatchingEndText.Name = "TxtMatchingEndText";
this.TxtMatchingEndText.Padding = new System.Windows.Forms.Padding(3);
......@@ -424,7 +411,7 @@ namespace SmartScan
this.TxtMatchingEndText.SelectionStart = 0;
this.TxtMatchingEndText.ShowDel = true;
this.TxtMatchingEndText.ShowQuery = false;
this.TxtMatchingEndText.Size = new System.Drawing.Size(105, 44);
this.TxtMatchingEndText.Size = new System.Drawing.Size(105, 39);
this.TxtMatchingEndText.TabIndex = 32;
this.TxtMatchingEndText.Text = "faceTextBox2";
//
......@@ -435,10 +422,10 @@ namespace SmartScan
this.LblLength.BorderWidth = 0;
this.LblLength.Dock = System.Windows.Forms.DockStyle.Fill;
this.LblLength.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblLength.Location = new System.Drawing.Point(256, 153);
this.LblLength.Location = new System.Drawing.Point(256, 138);
this.LblLength.Name = "LblLength";
this.LblLength.Padding = new System.Windows.Forms.Padding(3);
this.LblLength.Size = new System.Drawing.Size(136, 44);
this.LblLength.Size = new System.Drawing.Size(136, 39);
this.LblLength.TabIndex = 38;
this.LblLength.Text = "长度";
this.LblLength.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
......@@ -449,7 +436,7 @@ namespace SmartScan
this.TxtMatchingMiddleText.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.TxtMatchingMiddleText.BorderWidth = 2;
this.TxtMatchingMiddleText.Dock = System.Windows.Forms.DockStyle.Fill;
this.TxtMatchingMiddleText.Location = new System.Drawing.Point(145, 153);
this.TxtMatchingMiddleText.Location = new System.Drawing.Point(145, 138);
this.TxtMatchingMiddleText.MaxLength = 32767;
this.TxtMatchingMiddleText.Name = "TxtMatchingMiddleText";
this.TxtMatchingMiddleText.Padding = new System.Windows.Forms.Padding(3);
......@@ -458,7 +445,7 @@ namespace SmartScan
this.TxtMatchingMiddleText.SelectionStart = 0;
this.TxtMatchingMiddleText.ShowDel = true;
this.TxtMatchingMiddleText.ShowQuery = false;
this.TxtMatchingMiddleText.Size = new System.Drawing.Size(105, 44);
this.TxtMatchingMiddleText.Size = new System.Drawing.Size(105, 39);
this.TxtMatchingMiddleText.TabIndex = 33;
this.TxtMatchingMiddleText.Text = "faceTextBox3";
//
......@@ -469,10 +456,10 @@ namespace SmartScan
this.LblStart.BorderWidth = 0;
this.LblStart.Dock = System.Windows.Forms.DockStyle.Fill;
this.LblStart.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblStart.Location = new System.Drawing.Point(256, 103);
this.LblStart.Location = new System.Drawing.Point(256, 93);
this.LblStart.Name = "LblStart";
this.LblStart.Padding = new System.Windows.Forms.Padding(3);
this.LblStart.Size = new System.Drawing.Size(136, 44);
this.LblStart.Size = new System.Drawing.Size(136, 39);
this.LblStart.TabIndex = 37;
this.LblStart.Text = "起始";
this.LblStart.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
......@@ -484,10 +471,10 @@ namespace SmartScan
this.LblKeyword.BorderWidth = 0;
this.LblKeyword.Dock = System.Windows.Forms.DockStyle.Fill;
this.LblKeyword.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblKeyword.Location = new System.Drawing.Point(256, 53);
this.LblKeyword.Location = new System.Drawing.Point(256, 48);
this.LblKeyword.Name = "LblKeyword";
this.LblKeyword.Padding = new System.Windows.Forms.Padding(3);
this.LblKeyword.Size = new System.Drawing.Size(136, 44);
this.LblKeyword.Size = new System.Drawing.Size(136, 39);
this.LblKeyword.TabIndex = 36;
this.LblKeyword.Text = "key";
this.LblKeyword.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
......@@ -500,10 +487,10 @@ namespace SmartScan
this.tableLayoutPanel1.SetColumnSpan(this.ChkCaseSensitivity, 2);
this.ChkCaseSensitivity.Dock = System.Windows.Forms.DockStyle.Fill;
this.ChkCaseSensitivity.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChkCaseSensitivity.Location = new System.Drawing.Point(3, 353);
this.ChkCaseSensitivity.Location = new System.Drawing.Point(3, 363);
this.ChkCaseSensitivity.Name = "ChkCaseSensitivity";
this.ChkCaseSensitivity.Padding = new System.Windows.Forms.Padding(3);
this.ChkCaseSensitivity.Size = new System.Drawing.Size(247, 44);
this.ChkCaseSensitivity.Size = new System.Drawing.Size(247, 39);
this.ChkCaseSensitivity.TabIndex = 28;
this.ChkCaseSensitivity.Text = "Sensitivity";
this.ChkCaseSensitivity.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
......@@ -515,10 +502,10 @@ namespace SmartScan
this.ChkMinLength.BorderWidth = 0;
this.ChkMinLength.Dock = System.Windows.Forms.DockStyle.Fill;
this.ChkMinLength.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChkMinLength.Location = new System.Drawing.Point(256, 253);
this.ChkMinLength.Location = new System.Drawing.Point(256, 228);
this.ChkMinLength.Name = "ChkMinLength";
this.ChkMinLength.Padding = new System.Windows.Forms.Padding(3);
this.ChkMinLength.Size = new System.Drawing.Size(136, 44);
this.ChkMinLength.Size = new System.Drawing.Size(136, 39);
this.ChkMinLength.TabIndex = 29;
this.ChkMinLength.Text = "Min";
this.ChkMinLength.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
......@@ -533,12 +520,12 @@ namespace SmartScan
this.NudMinLength.Dock = System.Windows.Forms.DockStyle.Fill;
this.NudMinLength.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.NudMinLength.Increment = 1F;
this.NudMinLength.Location = new System.Drawing.Point(398, 253);
this.NudMinLength.Location = new System.Drawing.Point(398, 228);
this.NudMinLength.Maximum = 100F;
this.NudMinLength.Minimum = 0F;
this.NudMinLength.Name = "NudMinLength";
this.NudMinLength.Padding = new System.Windows.Forms.Padding(3);
this.NudMinLength.Size = new System.Drawing.Size(107, 44);
this.NudMinLength.Size = new System.Drawing.Size(107, 39);
this.NudMinLength.TabIndex = 34;
this.NudMinLength.Text = "0";
this.NudMinLength.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
......@@ -552,10 +539,10 @@ namespace SmartScan
this.ChkMaxLength.BorderWidth = 0;
this.ChkMaxLength.Dock = System.Windows.Forms.DockStyle.Fill;
this.ChkMaxLength.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChkMaxLength.Location = new System.Drawing.Point(256, 303);
this.ChkMaxLength.Location = new System.Drawing.Point(256, 273);
this.ChkMaxLength.Name = "ChkMaxLength";
this.ChkMaxLength.Padding = new System.Windows.Forms.Padding(3);
this.ChkMaxLength.Size = new System.Drawing.Size(136, 44);
this.ChkMaxLength.Size = new System.Drawing.Size(136, 39);
this.ChkMaxLength.TabIndex = 30;
this.ChkMaxLength.Text = "Max";
this.ChkMaxLength.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
......@@ -570,12 +557,12 @@ namespace SmartScan
this.NudMaxLength.Dock = System.Windows.Forms.DockStyle.Fill;
this.NudMaxLength.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.NudMaxLength.Increment = 1F;
this.NudMaxLength.Location = new System.Drawing.Point(398, 303);
this.NudMaxLength.Location = new System.Drawing.Point(398, 273);
this.NudMaxLength.Maximum = 100F;
this.NudMaxLength.Minimum = 0F;
this.NudMaxLength.Name = "NudMaxLength";
this.NudMaxLength.Padding = new System.Windows.Forms.Padding(3);
this.NudMaxLength.Size = new System.Drawing.Size(107, 44);
this.NudMaxLength.Size = new System.Drawing.Size(107, 39);
this.NudMaxLength.TabIndex = 35;
this.NudMaxLength.Text = "0";
this.NudMaxLength.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
......@@ -590,10 +577,10 @@ namespace SmartScan
this.BtnDel.Dock = System.Windows.Forms.DockStyle.Fill;
this.BtnDel.ForeColor = System.Drawing.Color.Red;
this.BtnDel.HoldPress = false;
this.BtnDel.Location = new System.Drawing.Point(3, 403);
this.BtnDel.Location = new System.Drawing.Point(3, 408);
this.BtnDel.Name = "BtnDel";
this.BtnDel.Padding = new System.Windows.Forms.Padding(3);
this.BtnDel.Size = new System.Drawing.Size(136, 44);
this.BtnDel.Size = new System.Drawing.Size(136, 50);
this.BtnDel.TabIndex = 43;
this.BtnDel.Text = "Del";
this.BtnDel.Click += new System.EventHandler(this.BtnDel_Click);
......@@ -615,18 +602,50 @@ namespace SmartScan
this.faceTextBox1.SelectionStart = 0;
this.faceTextBox1.ShowDel = false;
this.faceTextBox1.ShowQuery = false;
this.faceTextBox1.Size = new System.Drawing.Size(502, 44);
this.faceTextBox1.Size = new System.Drawing.Size(502, 39);
this.faceTextBox1.TabIndex = 48;
this.faceTextBox1.Text = "faceTextBox1";
this.faceTextBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// ChkMatchisnumber
//
this.ChkMatchisnumber.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.ChkMatchisnumber.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.ChkMatchisnumber.BorderWidth = 0;
this.ChkMatchisnumber.Dock = System.Windows.Forms.DockStyle.Fill;
this.ChkMatchisnumber.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChkMatchisnumber.Location = new System.Drawing.Point(3, 318);
this.ChkMatchisnumber.Name = "ChkMatchisnumber";
this.ChkMatchisnumber.Padding = new System.Windows.Forms.Padding(3);
this.ChkMatchisnumber.Size = new System.Drawing.Size(136, 39);
this.ChkMatchisnumber.TabIndex = 53;
this.ChkMatchisnumber.Text = "AsNumber";
this.ChkMatchisnumber.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// ChoMatchMiddleType
//
this.ChoMatchMiddleType.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.ChoMatchMiddleType.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.ChoMatchMiddleType.BorderWidth = 2;
this.ChoMatchMiddleType.Dock = System.Windows.Forms.DockStyle.Fill;
this.ChoMatchMiddleType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChoMatchMiddleType.Location = new System.Drawing.Point(3, 183);
this.ChoMatchMiddleType.Name = "ChoMatchMiddleType";
this.ChoMatchMiddleType.Padding = new System.Windows.Forms.Padding(3);
this.ChoMatchMiddleType.SelectedIndex = -1;
this.ChoMatchMiddleType.SelectedText = "";
this.ChoMatchMiddleType.Size = new System.Drawing.Size(136, 39);
this.ChoMatchMiddleType.TabIndex = 54;
this.ChoMatchMiddleType.Text = "faceComboBox1";
this.ChoMatchMiddleType.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// UsrCodeExtractList
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.facePanel1);
this.Name = "UsrCodeExtractList";
this.Size = new System.Drawing.Size(566, 558);
this.Size = new System.Drawing.Size(523, 476);
this.facePanel1.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.ResumeLayout(false);
......@@ -662,8 +681,9 @@ namespace SmartScan
private Asa.FaceControl.FaceCheckBox ChkMatchingSplit;
private Asa.FaceControl.FaceTextBox faceTextBox1;
private Asa.FaceControl.FaceNumericUpDown NudMiddleTextCount;
private Asa.FaceControl.FaceLabel LblMiddleTextCount;
private Asa.FaceControl.FaceCheckBox ChkCheckCodeType;
private Asa.FaceControl.FaceLabel LblCodeType;
private Asa.FaceControl.FaceCheckBox ChkMatchisnumber;
private Asa.FaceControl.FaceComboBox ChoMatchMiddleType;
}
}
......@@ -19,6 +19,11 @@ namespace SmartScan
Language.SetLanguage(this);
changed = true;
ChoMatchMiddleType.Items.Add(Language.Dialog("MatchType_max"));
ChoMatchMiddleType.Items.Add(Language.Dialog("MatchType_equals"));
ChoMatchMiddleType.Items.Add(Language.Dialog("MatchType_min"));
this.codeText = codeText;
this.codeType = codeType;
CboKeyword.Items.AddRange(Common.macroKey.ToArray());
......@@ -43,7 +48,8 @@ namespace SmartScan
CboKeyword.SelectedText = match.Keyword;
NudStart.Value = match.SubstringStart;
match.CodeType = codeType;
ChoMatchMiddleType.SelectedIndex = match.MatchMiddleType+1;
ChkMatchisnumber.Checked = match.MatchISNumber;
ChkCheckCodeType.Checked = match.CheckCodeType;
LblCodeType.Text = codeType;
......@@ -87,8 +93,10 @@ namespace SmartScan
SubstringStart = Convert.ToInt32(NudStart.Value),
SubstringLength = ChkLengthEnd.Checked ? -1 : Convert.ToInt32(NudLength.Value),
CheckCodeType = ChkCheckCodeType.Checked,
CodeType = LblCodeType.Text
};
CodeType = LblCodeType.Text,
MatchMiddleType = ChoMatchMiddleType.SelectedIndex - 1,
MatchISNumber = ChkMatchisnumber.Checked
};
return match;
}
......
......@@ -54,7 +54,8 @@ namespace SmartScan
private void LstKey_SelectedIndexChanged(object sender, EventArgs e)
{
TxtKey.Text = keyCopy[LstKey.SelectedIndex];
if(LstKey.SelectedIndex>=0)
TxtKey.Text = keyCopy[LstKey.SelectedIndex];
}
private void BtnAddKey_Click(object sender, EventArgs e)
......
......@@ -269,6 +269,13 @@ namespace SmartScan
private void BtnOcrCode_Click(object sender, EventArgs e)
{
if (codeIndex == -1) return;
var m = mateCopy[mateIndex].Match.Find(m=>m.CodeID==codeIndex);
if (m == null) {
string text = Language.Dialog("OcrNeedCodeSetKey");
new FaceMessageBox("", text, MessageBoxButtons.OK).ShowDialog();
return;
}
List<MaterialCodeOCR> codeOcr = mateCopy[mateIndex].Ocr.FindAll(s => s.CodeID == mateCopy[mateIndex].Code[codeIndex].ID);
FrmCodeOCR frm = new(mateCopy[mateIndex].Code[codeIndex], codeOcr, mateCopy[mateIndex].Match, mateCopy[mateIndex].Image);
......@@ -281,12 +288,8 @@ namespace SmartScan
mateCopy[mateIndex].Ocr.AddRange(frm.codeOcr);
mateCopy[mateIndex].Match.AddRange(frm.codeMatch);
//for (int i = 0; i < frm.codeOcr.Count; i++)
//{
// MaterialCodeMatch match = frm.codeMatch.Find(s => s.CodeID == frm.codeOcr[i].ID);
// mateCopy[mateIndex].Match.Add(match);
//}
mateCopy[mateIndex].State = TemplateState.Unsaved;
LstCode.Items[codeIndex] = FormatCode(codeIndex);
}
}
......
......@@ -8,10 +8,11 @@
<OutputType>WinExe</OutputType>
<RootNamespace>SmartScan</RootNamespace>
<AssemblyName>SmartScan</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>false</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
......@@ -39,6 +40,9 @@
<PropertyGroup>
<ApplicationIcon>App.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="Asa.Camera.VisionLib, Version=1.3.7940.26720, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
......@@ -254,6 +258,7 @@
<EmbeddedResource Include="SetControl\UsrCodeExtractList.resx">
<DependentUpon>UsrCodeExtractList.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.manifest" />
<None Include="log4net.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
......
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC 清单选项
如果想要更改 Windows 用户帐户控制级别,请使用
以下节点之一替换 requestedExecutionLevel 节点。n
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
指定 requestedExecutionLevel 元素将禁用文件和注册表虚拟化。
如果你的应用程序需要此虚拟化来实现向后兼容性,则删除此
元素。
-->
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- 设计此应用程序与其一起工作且已针对此应用程序进行测试的
Windows 版本的列表。取消评论适当的元素,
Windows 将自动选择最兼容的环境。 -->
<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
<!-- Windows 10 -->
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
</application>
</compatibility>
<!-- 指示该应用程序可感知 DPI 且 Windows 在 DPI 较高时将不会对其进行
自动缩放。Windows Presentation Foundation (WPF)应用程序自动感知 DPI,无需
选择加入。选择加入此设置的 Windows 窗体应用程序(面向 .NET Framework 4.6)还应
在其 app.config 中将 "EnableWindowsFormsHighDpiAutoResizing" 设置设置为 "true"。
将应用程序设为感知长路径。请参阅 https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
<!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly>
Reelid
PN
QTY
PRODATE
BATCH
Description
SP
Memo
h1
*h2
1473
\ No newline at end of file
1529
\ No newline at end of file
......@@ -9,7 +9,7 @@
<PrintCompletedClear>False</PrintCompletedClear>
<OpenStartWork>True</OpenStartWork>
<OpenMaximize>True</OpenMaximize>
<DefaultPrintLabel>ALCOELECTRO 60x30mm</DefaultPrintLabel>
<DefaultPrintLabel>test2</DefaultPrintLabel>
<EnabledIO>False</EnabledIO>
<EnabledCamera>False</EnabledCamera>
<IOIP>192.168.0.101</IOIP>
......@@ -25,15 +25,18 @@
</ReelIDPostfix>
<LockPassword>12345</LockPassword>
<ExtensionGroup>General</ExtensionGroup>
<HttpServer>http://localhost/smdbox/rest/api/v2/mes/listPnBySupplierPn?supplierPn=</HttpServer>
<HttpReelID>http://localhost/ScopeCVSService/BoxReelIDInfoMaintain</HttpReelID>
<HttpServer>
</HttpServer>
<HttpReelID>http://127.0.0.1:8888/test</HttpReelID>
<DefaultMaterialName>test</DefaultMaterialName>
<TriggerOpenLight>True</TriggerOpenLight>
<WebService>
</WebService>
<PromptAfterPrinting>False</PromptAfterPrinting>
<AutoPrint>True</AutoPrint>
<ReelIDKeyWord>Reelid</ReelIDKeyWord>
<SmfServer>http://192.168.11.243/smf-core/</SmfServer>
<ReelIDKeyWord>
</ReelIDKeyWord>
<SmfServer>http://192.168.1.243/smf-core/</SmfServer>
<CID>NeoScan01</CID>
<iomodule>NiRen</iomodule>
</appSettings>
\ No newline at end of file
......@@ -18,12 +18,19 @@
<LabelEmpty>Print label content is empty, do you want to continue printing?</LabelEmpty>
<KeyExists>[name], Key already exists</KeyExists>
<KeyRepeat>Repeat keyword</KeyRepeat>
<KeyEmpty>Keyword can't be empty</KeyEmpty>
<NoMatchSelect>A matching pattern must be selected</NoMatchSelect>
<UnlockWrong>Wrong unlock password</UnlockWrong>
<RepeatPrint>The tray label has been printed</RepeatPrint>
<MaterialScanning>In recognition...</MaterialScanning>
<MaterialTemplateMatching>Template matching...</MaterialTemplateMatching>
<MaterialProcessing>Processing results...</MaterialProcessing>
<PleaseWaiting>Please Waiting...</PleaseWaiting>
<MatchType_max>Match at most</MatchType_max>
<MatchType_equals>Match equals</MatchType_equals>
<MatchType_min>Match at least</MatchType_min>
<OcrNeedCodeSetKey>Ocr's based barcode must first match the keyword</OcrNeedCodeSetKey>
<ThisMatchHasOcrCantdelete>There are Ocr rules under this matching rule, and all keywords cannot be deleted</ThisMatchHasOcrCantdelete>
</Dialog>
<FrmUsersLogin Text="Login" Font="Arial,24,B,">
<LblUser Text="User name" Font="Arial,11,," />
......@@ -117,18 +124,19 @@
<BtnDelKey Text="Delete key" Font="Arial,12,," />
<BtnUpdateKey Text="Update key" Font="Arial,12,," />
<BtnAppendKey Text="Append conditions" Font="Arial,12,," />
<btn_setriid Text="Toggle Auto RI" Font="Arial,12,," />
<PnlReelid Text="Reel ID" Font="Arial,12,," />
<LblContent Text="Build conditions" Font="Arial,12,B," />
<LblPrefix Text="Start characters" Font="Arial,12,," />
<LblPostfix Text="End characters" Font="Arial,12,," />
<LblPlaces Text="Sereial number length" Font="Arial,12,," />
<LblPrefix Text="Prefix" Font="Arial,10,," />
<LblPostfix Text="Suffix" Font="Arial,10,," />
<LblPlaces Text="Field length" Font="Arial,10,," />
<ChkReelIDFillZero Text="Fill zero" Font="Arial,12,," />
</UsrMacro>
<UsrCodeExtractList>
<ChkMatchingStart Text="Match starting characters" Font="Arial,12,," />
<ChkMatchingEnd Text="Match ending characters" Font="Arial,12,," />
<ChkMatchingMiddle Text="Contains characters" Font="Arial,12,," />
<LblMiddleTextCount Text="Maximum number" Font="Arial,12,," />
<ChkMatchisnumber Text="Must be a number" Font="Arial,12,," />
<ChkMatchingSplit Text="Barcode split character" Font="Arial,12,," />
<LblSplitPart Text="Get the split part" Font="Arial,12,," />
<ChkCaseSensitivity Text="Case sensitivity" Font="Arial,12,," />
......
......@@ -18,12 +18,19 @@
<LabelEmpty>打印标签内容有空内容,是否继续打印?</LabelEmpty>
<KeyExists>[name],关键字已存在</KeyExists>
<KeyRepeat>重复关键字</KeyRepeat>
<NoMatchSelect>必须选择一个匹配模式</NoMatchSelect>
<KeyEmpty>关键字为空</KeyEmpty>
<UnlockWrong>解锁密码错误</UnlockWrong>
<RepeatPrint>该料盘标签已打印</RepeatPrint>
<MaterialScanning>拍照识别...</MaterialScanning>
<MaterialTemplateMatching>模版匹配...</MaterialTemplateMatching>
<MaterialProcessing>计算结果...</MaterialProcessing>
<PleaseWaiting>请稍后...</PleaseWaiting>
<MatchType_max>匹配数量至多</MatchType_max>
<MatchType_equals>匹配数量等于</MatchType_equals>
<MatchType_min>匹配数量至少</MatchType_min>
<OcrNeedCodeSetKey>Ocr的基准条码必须先匹配关键字</OcrNeedCodeSetKey>
<ThisMatchHasOcrCantdelete>该匹配规则下有Ocr规则,不能删除全部关键字</ThisMatchHasOcrCantdelete>
</Dialog>
<FrmUsersLogin Text="登录" Font="微软雅黑,24,B,">
<LblUser Text="用户名:" Font="微软雅黑,11,," />
......@@ -117,6 +124,7 @@
<BtnDelKey Text="删除" Font="微软雅黑,12,," />
<BtnUpdateKey Text="更新" Font="微软雅黑,12,," />
<BtnAppendKey Text="添加到生成条件" Font="微软雅黑,12,," />
<btn_setriid Text="切换自动RI" Font="微软雅黑,12,," />
<PnlReelid Text="Reel ID" Font="微软雅黑,12,," />
<LblContent Text="生成条件" Font="微软雅黑,12,B," />
<LblPrefix Text="开头字符串" Font="微软雅黑,12,," />
......@@ -128,7 +136,7 @@
<ChkMatchingStart Text="匹配开头字符" Font="微软雅黑,12,," />
<ChkMatchingEnd Text="匹配结尾字符" Font="微软雅黑,12,," />
<ChkMatchingMiddle Text="匹配任意位置字符" Font="微软雅黑,12,," />
<LblMiddleTextCount Text="字符出现最多次数" Font="微软雅黑,12,," />
<ChkMatchisnumber Text="必须为数字" Font="微软雅黑,12,," />
<ChkMatchingSplit Text="条码分割字符" Font="微软雅黑,12,," />
<LblSplitPart Text="获取分割部分" Font="微软雅黑,12,," />
<ChkCaseSensitivity Text="区分大小写" Font="微软雅黑,12,," />
......
此文件的差异太大,无法显示。
此文件的差异太大,无法显示。
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>
</configuration>
\ No newline at end of file
<appSettings>
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
</appSettings>
</configuration>
1f6f52a2c9a538c951873afd08ee8e13e86993e5
7b63aa4ffa34bf61a68afae14d5eecc716e25843
......@@ -163,3 +163,6 @@ D:\rick\vs\SmartScan\SmartScan\bin\Debug\Asa.Camera.VisionLib.pdb
D:\rick\vs\SmartScan\SmartScan\bin\Debug\Asa.Camera.VisionLib.xml
D:\rick\vs\SmartScan\SmartScan\bin\Debug\MvCameraControl.Net.xml
D:\rick\vs\SmartScan\SmartScan\bin\Debug\Asa.Face.dll
D:\rick\vs\SmartScan\SmartScan\bin\Debug\TcpKPIO.dll
D:\rick\vs\SmartScan\SmartScan\bin\Debug\TcpKPIO.pdb
D:\rick\vs\SmartScan\SmartScan\bin\Debug\TcpKPIO.xml
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!