Commit 4dadab67 刘韬

1

1 个父辈 79b9e98d
正在显示 76 个修改的文件 包含 678 行增加317 行删除
...@@ -9,9 +9,10 @@ ...@@ -9,9 +9,10 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BLL</RootNamespace> <RootNamespace>BLL</RootNamespace>
<AssemblyName>BLL</AssemblyName> <AssemblyName>BLL</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
...@@ -60,6 +61,9 @@ ...@@ -60,6 +61,9 @@
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Net.Http" /> <Reference Include="System.Net.Http" />
<Reference Include="System.Xml" /> <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"> <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> <HintPath>..\packages\ZXing.Net.0.16.6\lib\net461\zxing.dll</HintPath>
</Reference> </Reference>
...@@ -78,7 +82,10 @@ ...@@ -78,7 +82,10 @@
<Compile Include="Extension\Item_NanRui.cs" /> <Compile Include="Extension\Item_NanRui.cs" />
<Compile Include="Extension\Item_KaiFa.cs" /> <Compile Include="Extension\Item_KaiFa.cs" />
<Compile Include="Extension\Item_PanaCIM.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="MonitorMouseKeyboard.cs" />
<Compile Include="PrinterHelper.cs" /> <Compile Include="PrinterHelper.cs" />
<Compile Include="PrintLabelEdit.cs" /> <Compile Include="PrintLabelEdit.cs" />
......
...@@ -303,6 +303,11 @@ namespace BLL ...@@ -303,6 +303,11 @@ namespace BLL
get => config.Read<string>(ClientID); get => config.Read<string>(ClientID);
set => config.Write(ClientID, value); set => config.Write(ClientID, value);
} }
public string iomodule
{
get => config.Read<string>(IOModule);
set => config.Write(IOModule, value);
}
public void Save() public void Save()
{ {
config.Save(); config.Save();
...@@ -315,6 +320,7 @@ namespace BLL ...@@ -315,6 +320,7 @@ namespace BLL
private const string LANGUAGE = "Language"; private const string LANGUAGE = "Language";
private const string Smf_Server = "SmfServer"; private const string Smf_Server = "SmfServer";
private const string ClientID = "CID"; private const string ClientID = "CID";
private const string IOModule = "IOModule";
private const string ENABLED_USER_LOGIN = "EnabledUserLogin"; private const string ENABLED_USER_LOGIN = "EnabledUserLogin";
private const string OPERATE_TIMEOUT = "OperateTimeout"; private const string OPERATE_TIMEOUT = "OperateTimeout";
private const string CHECK_SHORTCUT = "CheckShortcut"; private const string CHECK_SHORTCUT = "CheckShortcut";
......
...@@ -29,9 +29,11 @@ namespace BLL ...@@ -29,9 +29,11 @@ namespace BLL
private int pnlWidth; private int pnlWidth;
private FacePanel panel; private FacePanel panel;
private System.Drawing.Point startPoint; private System.Drawing.Point startPoint;
private Config config;
public Extension(Config config) public Extension(Config config)
{ {
this.config = config;
LogNet.log.Info("加载扩展:" + config.ExtensionName); LogNet.log.Info("加载扩展:" + config.ExtensionName);
alcoelectro = new(config); alcoelectro = new(config);
...@@ -136,6 +138,30 @@ namespace BLL ...@@ -136,6 +138,30 @@ namespace BLL
}; };
listrow.Add(new object[] { L, R }); 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() Dictionary<string, object> B = new()
{ {
{ "Type", "Button" }, { "Type", "Button" },
...@@ -160,6 +186,8 @@ namespace BLL ...@@ -160,6 +186,8 @@ namespace BLL
} }
} }
}; };
if (!string.IsNullOrEmpty(config.HttpReelID))
listrow.Add(new object[] { A });
listrow.Add(new object[] { B }); listrow.Add(new object[] { B });
rows = listrow.ToArray(); rows = listrow.ToArray();
} }
......
...@@ -51,46 +51,54 @@ namespace BLL ...@@ -51,46 +51,54 @@ namespace BLL
ReadReelID(); ReadReelID();
} }
static bool mesResult = false; static bool mesResult = false;
Dictionary<string, string> lastkey = null;
//读码后第一步
public void SetKey(string[] originalCode, Dictionary<string, string> key, bool hasMatch) public void SetKey(string[] originalCode, Dictionary<string, string> key, bool hasMatch)
{ {
lastkey = key;
mesResult = false; mesResult = false;
SaveAddReelID();
var now = DateTime.Now; var now = DateTime.Now;
var Reelidstr =GetReelid(); if (!string.IsNullOrEmpty(config.ReelIDKeyWord))
if (key.ContainsKey(config.ReelIDKeyWord))
{ {
var Reelidstr = GetReelid();
if (key.ContainsKey(config.ReelIDKeyWord))
key[config.ReelIDKeyWord] = Reelidstr; key[config.ReelIDKeyWord] = Reelidstr;
}
else else
key.Add(config.ReelIDKeyWord, Reelidstr); key.Add(config.ReelIDKeyWord, Reelidstr);
}
//第一次刷新界面
for (int i = 0; i < extensions.Count; i++) for (int i = 0; i < extensions.Count; i++)
{ {
if (key.ContainsKey(extensions[i].Key)) if (key.ContainsKey(extensions[i].Key))
extensions[i].Control.Text = key[extensions[i].Key]; extensions[i].Control.Text = key[extensions[i].Key];
} }
if (!updatereelid(key))
return;
Application.DoEvents(); 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 (config.AutoPrint && hasMatch)
{ {
//if (CanPrint()) //if (CanPrint())
PrintLabel(null, EventArgs.Empty); 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() public void Update()
{ {
...@@ -131,19 +139,6 @@ namespace BLL ...@@ -131,19 +139,6 @@ namespace BLL
return text; 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() private void ReadReelID()
{ {
try try
...@@ -184,10 +179,11 @@ namespace BLL ...@@ -184,10 +179,11 @@ namespace BLL
} }
} }
private void GetHttpReelID(object sender, EventArgs e) {
updatereelid(lastkey);
}
private void PrintLabel(object sender, EventArgs e) private void PrintLabel(object sender, EventArgs e)
{ {
LogNet.log.Debug("Enter PrintLabel Method"); LogNet.log.Debug("Enter PrintLabel Method");
Dictionary<string, string> key = new(); Dictionary<string, string> key = new();
...@@ -199,137 +195,50 @@ namespace BLL ...@@ -199,137 +195,50 @@ namespace BLL
else else
key.Add(extensions[i].Key, extensions[i].Control.Text); key.Add(extensions[i].Key, extensions[i].Control.Text);
} }
var keys =new List<string>(key.Keys); var keys =new List<string>(key.Keys);
//foreach (var kk in keys)
//{
// if (string.IsNullOrEmpty(key[kk]))
// key[kk] = "NA";
//}
Printing?.Invoke(key); Printing?.Invoke(key);
} }
private string GetHttpReelID(Dictionary<string, string> key)
private bool GetMESInfo(Dictionary<string, string> keyv)
{
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); //return "test";
fm.TopMost = true; string url = config.HttpReelID;
fm.ShowDialog(); string json = Http.PostJson(url,null, key);
return false; if (json == "") {
new FaceMessageBox("BoxReelIDInfoMaintain", "Api error", System.Windows.Forms.MessageBoxButtons.OK, true).ShowDialog();
return "";
} }
JavaScriptSerializer serializer = new();
//PART=C02-07129-01,QTY=10000,LOT=20211215,ASL=YAGEO,VEN=004284,DCODE=202150,TRACE=38K4420537,Reelid=KF2135800000212 Dictionary<string, object> dic;
int qty = 0; try
int.TryParse(TryGetDictValue(keyv, "QTY"), out qty);
InitPPID_Request_DPS initPPID_Request_DPS = new InitPPID_Request_DPS()
{
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);
if (!respjson.Success)
{ {
var fm = new FaceMessageBox("MES MSG", respjson.Error, System.Windows.Forms.MessageBoxButtons.OK); dic = (Dictionary<string, object>)serializer.DeserializeObject(json);
fm.TopMost = true;
fm.ShowDialog();
return false;
} }
keyv["PART"] = respjson.Data.ToString(); catch {
//LogNet.log.Info(json); new FaceMessageBox("BoxReelIDInfoMaintain", "Api parse error:\r\n" + json, System.Windows.Forms.MessageBoxButtons.OK, true).ShowDialog();
return "";
return true;
} }
string TryGetDictValue(Dictionary<string, string> dic, string key) if (!dic.TryGetValue("CODE", out object value))
{
if (dic.ContainsKey(key))
{ {
return dic[key]; new FaceMessageBox("BoxReelIDInfoMaintain", "Api return data error:\r\n" + json, System.Windows.Forms.MessageBoxButtons.OK, true).ShowDialog();
}
else
return ""; return "";
} }
public class InitPPID_Request_DPS if (Convert.ToInt32(value)!=0)
{ {
/* new FaceMessageBox("BoxReelIDInfoMaintain", dic["MSG"].ToString(), System.Windows.Forms.MessageBoxButtons.OK, true).ShowDialog();
* { return "";
"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; } if (dic.TryGetValue("ReelID", out value))
return value.ToString();
else
return "";
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 \ No newline at end of file
...@@ -12,7 +12,7 @@ namespace BLL ...@@ -12,7 +12,7 @@ namespace BLL
/// <summary> /// <summary>
/// 康奈德 IO /// 康奈德 IO
/// </summary> /// </summary>
public class KND_IO public class KND_IO : IO_Interface
{ {
private bool loop; private bool loop;
private ushort _flag; //ModBus TCP 标识 private ushort _flag; //ModBus TCP 标识
...@@ -23,15 +23,11 @@ namespace BLL ...@@ -23,15 +23,11 @@ namespace BLL
private Thread tTrigger; //触发DI改变事件 private Thread tTrigger; //触发DI改变事件
private Status[] staTrigger; private Status[] staTrigger;
/// <summary>
/// 自动读取DI委托
/// </summary>
/// <param name="sta">状态</param>
public delegate void DI_Changed(Status[] sta);
/// <summary> /// <summary>
/// 自动读取DI事件触发 /// 自动读取DI事件触发
/// </summary> /// </summary>
public event DI_Changed DI_Changed_Event; public event IOManage.DI_Changed DI_Changed_Event;
/// <summary> /// <summary>
/// 康奈德 /// 康奈德
...@@ -86,7 +82,8 @@ namespace BLL ...@@ -86,7 +82,8 @@ namespace BLL
Model.LogNet.log.Info("IO断开了,重新连接:" + client.Connected); Model.LogNet.log.Info("IO断开了,重新连接:" + client.Connected);
return client.Connected; return client.Connected;
} }
else { else
{
return true; return true;
} }
} }
...@@ -234,7 +231,7 @@ namespace BLL ...@@ -234,7 +231,7 @@ namespace BLL
n++; 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; return true;
} }
catch (Exception ex) catch (Exception ex)
...@@ -549,7 +546,8 @@ namespace BLL ...@@ -549,7 +546,8 @@ namespace BLL
//} //}
Thread.Sleep(50); Thread.Sleep(50);
} }
catch(Exception e) { catch (Exception e)
{
Model.LogNet.log.Info("Receive err:" + e.ToString()); Model.LogNet.log.Info("Receive err:" + e.ToString());
} }
finally finally
......
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 ...@@ -135,6 +135,10 @@ namespace BLL
keyword = null; keyword = null;
isCodeUsed = null; isCodeUsed = null;
code.ForEach((c)=> {
LogNet.log.Info($"扫描到 {c.CodeType},{c.Text}");
});
//优先匹配 //优先匹配
int firstIndex = mateTemp.FindIndex(math => math.Name == firstMaterial); int firstIndex = mateTemp.FindIndex(math => math.Name == firstMaterial);
if (firstIndex > -1) if (firstIndex > -1)
...@@ -475,7 +479,6 @@ namespace BLL ...@@ -475,7 +479,6 @@ namespace BLL
return null; return null;
} }
//开头 //开头
if (codeMatch[i].MatchStart) if (codeMatch[i].MatchStart)
{ {
...@@ -506,7 +509,13 @@ namespace BLL ...@@ -506,7 +509,13 @@ namespace BLL
count++; count++;
index += text.Length; 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; return null;
} }
...@@ -541,7 +550,7 @@ namespace BLL ...@@ -541,7 +550,7 @@ namespace BLL
} }
//截取 //截取
if (matchCount == 0) continue; if (matchCount == 0 && !codeMatch[i].MatchISNumber) continue;
int startIndex = codeMatch[i].SubstringStart; int startIndex = codeMatch[i].SubstringStart;
int length = codeMatch[i].SubstringLength; int length = codeMatch[i].SubstringLength;
if (startIndex >= code.Length) if (startIndex >= code.Length)
...@@ -557,10 +566,17 @@ namespace BLL ...@@ -557,10 +566,17 @@ namespace BLL
length = code.Length - startIndex; 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)) if (key.ContainsKey(codeMatch[i].Keyword))
key[codeMatch[i].Keyword] = code.Substring(startIndex, length); key[codeMatch[i].Keyword] = filtercode;
else else
key.Add(codeMatch[i].Keyword, code.Substring(startIndex, length)); key.Add(codeMatch[i].Keyword, filtercode);
} }
return key; return key;
} }
......
...@@ -112,9 +112,17 @@ namespace BLL ...@@ -112,9 +112,17 @@ namespace BLL
if (dlg.ShowDialog() != DialogResult.OK) return; if (dlg.ShowDialog() != DialogResult.OK) return;
using System.Drawing.Printing.PrintDocument print = new() { PrinterSettings = dlg.PrinterSettings }; using System.Drawing.Printing.PrintDocument print = new() { PrinterSettings = dlg.PrinterSettings };
print.PrintPage += PrintTest_PrintPage; print.PrintPage += PrintTest_PrintPage;
print.DefaultPageSettings.Landscape = dlg.PrinterSettings.DefaultPageSettings.Landscape; print.DefaultPageSettings.Landscape = dlg.PrinterSettings.DefaultPageSettings.Landscape;
interimLabel = label; interimLabel = label;
PrintPreviewDialog ppd = new PrintPreviewDialog();
ppd.Document = print;
ppd.WindowState = FormWindowState.Maximized;
ppd.ShowDialog();
print.Print(); print.Print();
} }
...@@ -221,6 +229,11 @@ namespace BLL ...@@ -221,6 +229,11 @@ namespace BLL
private void PrintTest_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) 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++) for (int i = 0; i < interimLabel.Field.Count; i++)
{ {
PrintLabelField field = interimLabel.Field[i]; PrintLabelField field = interimLabel.Field[i];
...@@ -229,21 +242,34 @@ namespace BLL ...@@ -229,21 +242,34 @@ namespace BLL
if (field.Type == PrintLabelFieldType.Text) if (field.Type == PrintLabelFieldType.Text)
{ {
if (interimLabel.FieldShowKey) if (interimLabel.FieldShowKey)
{
e.Graphics.DrawString(field.Text, field.Font, Brushes.Black, rect); e.Graphics.DrawString(field.Text, field.Font, Brushes.Black, rect);
gg.DrawString(field.Text, field.Font, Brushes.Black, rect);
}
else else
{
e.Graphics.DrawString(ObjConversion.StrRemoveKey(field.Text), field.Font, Brushes.Black, rect); e.Graphics.DrawString(ObjConversion.StrRemoveKey(field.Text), field.Font, Brushes.Black, rect);
gg.DrawString(ObjConversion.StrRemoveKey(field.Text), field.Font, Brushes.Black, rect);
}
} }
else else
{ {
if (field.Image != null) 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) 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++) for (int i = 0; i < interimLabel.Field.Count; i++)
{ {
PrintLabelField field = interimLabel.Field[i]; PrintLabelField field = interimLabel.Field[i];
......
20fc287a1dca9a6cc2353ee6cd4335c8f8b0ea0f f08182a8667a0d04a12b18635a66f3406a72ff45
...@@ -93,3 +93,6 @@ D:\rick\vs\SmartScan\BLL\bin\Debug\halcondotnet.dll ...@@ -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.pdb
D:\rick\vs\SmartScan\BLL\bin\Debug\Asa.Camera.VisionLib.xml 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\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 @@ ...@@ -2,5 +2,5 @@
<packages> <packages>
<package id="log4net" version="2.0.12" targetFramework="net461" /> <package id="log4net" version="2.0.12" targetFramework="net461" />
<package id="Newtonsoft.Json" version="13.0.1" 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> </packages>
\ No newline at end of file \ No newline at end of file
...@@ -55,7 +55,7 @@ namespace Model ...@@ -55,7 +55,7 @@ namespace Model
LogNet.log.Info("Return:" + s); LogNet.log.Info("Return:" + s);
return FormatContent(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 }; RestClient client = new(url) { Timeout = timeout };
client.UseSerializer(new CustSerialize()); client.UseSerializer(new CustSerialize());
...@@ -71,6 +71,7 @@ namespace Model ...@@ -71,6 +71,7 @@ namespace Model
request.AddJsonBody(jsonobject); request.AddJsonBody(jsonobject);
IRestResponse response = client.Execute(request); IRestResponse response = client.Execute(request);
string s = response.Content; string s = response.Content;
if (wlog)
LogNet.log.Info("Return:" + s); LogNet.log.Info("Return:" + s);
return s; return s;
} }
......
...@@ -17,6 +17,7 @@ namespace Model ...@@ -17,6 +17,7 @@ namespace Model
public string CodeType { get; set; } = ""; public string CodeType { get; set; } = "";
public string StartText { get; set; } = ""; public string StartText { get; set; } = "";
public string MiddleText { get; set; } = ""; public string MiddleText { get; set; } = "";
public int MatchMiddleType { get; set; } = -1;
public int MiddleTextCount { get; set; } = 1; public int MiddleTextCount { get; set; } = 1;
public string EndText { get; set; } = ""; public string EndText { get; set; } = "";
public string SplitText { get; set; } = ""; public string SplitText { get; set; } = "";
...@@ -28,7 +29,7 @@ namespace Model ...@@ -28,7 +29,7 @@ namespace Model
public int SubstringStart { get; set; } = 0; public int SubstringStart { get; set; } = 0;
public int SubstringLength { get; set; } = 1; public int SubstringLength { get; set; } = 1;
public int SplitPart { get; set; } = 1; public int SplitPart { get; set; } = 1;
public bool MatchISNumber { get; set; } = false;
public MaterialCodeMatch Clone() public MaterialCodeMatch Clone()
{ {
......
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup> </startup>
<appSettings>
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
</appSettings>
</configuration> </configuration>
...@@ -13,7 +13,7 @@ namespace SmartScan ...@@ -13,7 +13,7 @@ namespace SmartScan
public static BLL.MaterialEdit mateEdit; public static BLL.MaterialEdit mateEdit;
public static Model.OCR ocr; public static Model.OCR ocr;
public static Asa.Camera.VisionLib cameraVision; public static Asa.Camera.VisionLib cameraVision;
public static BLL.KND_IO ioModule; public static BLL.IO_Interface ioModule;
public static LightSource lightSource; public static LightSource lightSource;
public static ServerCommunication SCMM; public static ServerCommunication SCMM;
......
...@@ -61,7 +61,7 @@ namespace SmartScan ...@@ -61,7 +61,7 @@ namespace SmartScan
this.BtnOK.BorderWidth = 2; this.BtnOK.BorderWidth = 2;
this.BtnOK.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230))))); this.BtnOK.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnOK.HoldPress = false; 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.Name = "BtnOK";
this.BtnOK.Padding = new System.Windows.Forms.Padding(3); this.BtnOK.Padding = new System.Windows.Forms.Padding(3);
this.BtnOK.Size = new System.Drawing.Size(120, 40); this.BtnOK.Size = new System.Drawing.Size(120, 40);
...@@ -77,7 +77,7 @@ namespace SmartScan ...@@ -77,7 +77,7 @@ namespace SmartScan
this.BtnCancel.BorderWidth = 2; this.BtnCancel.BorderWidth = 2;
this.BtnCancel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230))))); this.BtnCancel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnCancel.HoldPress = false; 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.Name = "BtnCancel";
this.BtnCancel.Padding = new System.Windows.Forms.Padding(3); this.BtnCancel.Padding = new System.Windows.Forms.Padding(3);
this.BtnCancel.Size = new System.Drawing.Size(120, 40); this.BtnCancel.Size = new System.Drawing.Size(120, 40);
...@@ -112,7 +112,7 @@ namespace SmartScan ...@@ -112,7 +112,7 @@ namespace SmartScan
this.PnlTemp.Location = new System.Drawing.Point(11, 184); this.PnlTemp.Location = new System.Drawing.Point(11, 184);
this.PnlTemp.Name = "PnlTemp"; this.PnlTemp.Name = "PnlTemp";
this.PnlTemp.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 28;
this.PnlTemp.Text = "facePanel1"; this.PnlTemp.Text = "facePanel1";
this.PnlTemp.TitleFont = new System.Drawing.Font("宋体", 12F); this.PnlTemp.TitleFont = new System.Drawing.Font("宋体", 12F);
...@@ -131,7 +131,7 @@ namespace SmartScan ...@@ -131,7 +131,7 @@ namespace SmartScan
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 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.PnlTemp);
this.Controls.Add(this.BtnAddMatch); this.Controls.Add(this.BtnAddMatch);
this.Controls.Add(this.BtnCancel); this.Controls.Add(this.BtnCancel);
......
...@@ -143,11 +143,27 @@ namespace SmartScan ...@@ -143,11 +143,27 @@ namespace SmartScan
foreach (FaceButton btn in matchButton.Keys) foreach (FaceButton btn in matchButton.Keys)
{ {
string key = matchButton[btn].GetMatchKey(); 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)) if (keyTemp.ContainsKey(key))
keyTemp[key]++; keyTemp[key]++;
else else
keyTemp.Add(key, 1); 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) foreach (string key in keyTemp.Keys)
{ {
...@@ -165,6 +181,15 @@ namespace SmartScan ...@@ -165,6 +181,15 @@ namespace SmartScan
{ {
MaterialCodeMatch match = matchButton[btn].GetMatch(); MaterialCodeMatch match = matchButton[btn].GetMatch();
match.CodeID = codeID; 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); CodeMatch.Add(match);
} }
DialogResult = DialogResult.OK; DialogResult = DialogResult.OK;
......
...@@ -35,9 +35,9 @@ namespace SmartScan ...@@ -35,9 +35,9 @@ namespace SmartScan
if (Common.config.EnabledIO) if (Common.config.EnabledIO)
{ {
string ip = Common.config.IOIPAddress; string ip = Common.config.IOIPAddress;
Common.ioModule = new BLL.KND_IO(ip); Common.ioModule = new BLL.IOManage(ip,Common.config.iomodule);
Common.ioModule.Connect(); Common.ioModule.Connect();
LogNet.log.Info($"加载IO模块,IP地址:{ip}"); LogNet.log.Info($"加载IO模块,IP地址:{ip},iomodule:{Common.config.iomodule}");
} }
if (Common.config.EnabledOCR) if (Common.config.EnabledOCR)
......
...@@ -257,8 +257,7 @@ namespace SmartScan ...@@ -257,8 +257,7 @@ namespace SmartScan
// //
// FrmMain // FrmMain
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1096, 815); this.ClientSize = new System.Drawing.Size(1096, 815);
this.Controls.Add(this.LblUserName); this.Controls.Add(this.LblUserName);
this.Controls.Add(this.LblVersion); this.Controls.Add(this.LblVersion);
......
...@@ -323,10 +323,10 @@ namespace SmartScan ...@@ -323,10 +323,10 @@ namespace SmartScan
private void BtnTriggerIO_Click(object sender, EventArgs e) private void BtnTriggerIO_Click(object sender, EventArgs e)
{ {
LogNet.log.Info("按钮点击触发Work"); LogNet.log.Info("按钮点击触发Work");
//Task.Run(()=>{ Task.Run(()=>{
scanWork.Scan(); scanWork.Scan();
//scanWork.TouchOff(); //scanWork.TouchOff();
//}); });
} }
...@@ -342,14 +342,18 @@ namespace SmartScan ...@@ -342,14 +342,18 @@ namespace SmartScan
return Common.frmWaitting.ShowDialog(); return Common.frmWaitting.ShowDialog();
} }
public void CloseWaittingDialog() { public void CloseWaittingDialog() {
if (this.InvokeRequired) if (Common.frmMain.InvokeRequired)
{ {
if (Common.frmWaitting.Created) if (Common.frmWaitting.Created)
{ {
this.Invoke(delegate () try
{
Common.frmMain.Invoke(delegate ()
{ {
CloseWaittingDialog(); CloseWaittingDialog();
}); });
}
catch { }
}; };
return; return;
} }
...@@ -358,9 +362,9 @@ namespace SmartScan ...@@ -358,9 +362,9 @@ namespace SmartScan
public void SetWaittingMsg(string msg) public void SetWaittingMsg(string msg)
{ {
if (this.InvokeRequired) if (Common.frmMain.InvokeRequired)
{ {
this.Invoke(delegate () Common.frmMain.Invoke(delegate ()
{ {
SetWaittingMsg(msg); SetWaittingMsg(msg);
}); });
...@@ -368,6 +372,7 @@ namespace SmartScan ...@@ -368,6 +372,7 @@ namespace SmartScan
} }
Common.SCMM.ShowMsg(msg, 3, msgType.INFO); Common.SCMM.ShowMsg(msg, 3, msgType.INFO);
Common.frmWaitting.SetMessage(msg); Common.frmWaitting.SetMessage(msg);
Application.DoEvents();
} }
} }
} }
...@@ -123,7 +123,7 @@ namespace SmartScan ...@@ -123,7 +123,7 @@ namespace SmartScan
this.BtnOK.BorderWidth = 2; this.BtnOK.BorderWidth = 2;
this.BtnOK.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230))))); this.BtnOK.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnOK.HoldPress = false; 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.Name = "BtnOK";
this.BtnOK.Padding = new System.Windows.Forms.Padding(3); this.BtnOK.Padding = new System.Windows.Forms.Padding(3);
this.BtnOK.Size = new System.Drawing.Size(120, 40); this.BtnOK.Size = new System.Drawing.Size(120, 40);
...@@ -139,7 +139,7 @@ namespace SmartScan ...@@ -139,7 +139,7 @@ namespace SmartScan
this.BtnCancel.BorderWidth = 2; this.BtnCancel.BorderWidth = 2;
this.BtnCancel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230))))); this.BtnCancel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnCancel.HoldPress = false; 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.Name = "BtnCancel";
this.BtnCancel.Padding = new System.Windows.Forms.Padding(3); this.BtnCancel.Padding = new System.Windows.Forms.Padding(3);
this.BtnCancel.Size = new System.Drawing.Size(120, 40); this.BtnCancel.Size = new System.Drawing.Size(120, 40);
...@@ -159,10 +159,10 @@ namespace SmartScan ...@@ -159,10 +159,10 @@ namespace SmartScan
this.PnlTemp.Location = new System.Drawing.Point(177, 55); this.PnlTemp.Location = new System.Drawing.Point(177, 55);
this.PnlTemp.Name = "PnlTemp"; this.PnlTemp.Name = "PnlTemp";
this.PnlTemp.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 11;
this.PnlTemp.Text = "facePanel1"; 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; this.PnlTemp.Visible = false;
// //
// BtnApply // BtnApply
...@@ -173,7 +173,7 @@ namespace SmartScan ...@@ -173,7 +173,7 @@ namespace SmartScan
this.BtnApply.BorderWidth = 2; this.BtnApply.BorderWidth = 2;
this.BtnApply.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230))))); this.BtnApply.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnApply.HoldPress = false; 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.Name = "BtnApply";
this.BtnApply.Padding = new System.Windows.Forms.Padding(3); this.BtnApply.Padding = new System.Windows.Forms.Padding(3);
this.BtnApply.Size = new System.Drawing.Size(120, 40); this.BtnApply.Size = new System.Drawing.Size(120, 40);
...@@ -183,9 +183,8 @@ namespace SmartScan ...@@ -183,9 +183,8 @@ namespace SmartScan
// //
// FrmSet // FrmSet
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1274, 878);
this.ClientSize = new System.Drawing.Size(1165, 758);
this.Controls.Add(this.BtnApply); this.Controls.Add(this.BtnApply);
this.Controls.Add(this.PnlTemp); this.Controls.Add(this.PnlTemp);
this.Controls.Add(this.BtnCancel); this.Controls.Add(this.BtnCancel);
......
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <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> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace SmartScan.Properties {
namespace SmartScan.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default public static Settings Default {
{ get {
get
{
return defaultInstance; return defaultInstance;
} }
} }
......
...@@ -67,15 +67,18 @@ namespace SmartScan ...@@ -67,15 +67,18 @@ namespace SmartScan
if (!isRun) return; if (!isRun) return;
if (isTouch) return; if (isTouch) return;
isTouch = true; isTouch = true;
btnMatchedName.Invoke(delegate() {
if (!Common.config.Backgrounder) if (!Common.config.Backgrounder)
btnMatchedName.Visible = false; btnMatchedName.Visible = false;
Common.extension.Clear(); Common.extension.Clear();
});
var t = Task.Run(() => var t = Task.Run(() =>
{ {
try try
{ {
workCodeInfo = new(); workCodeInfo = new();
workCodeKeyword = new(); workCodeKeyword = new(StringComparer.OrdinalIgnoreCase);
originalCodeText = null; originalCodeText = null;
originalCodeIsUsed = null; originalCodeIsUsed = null;
...@@ -111,7 +114,11 @@ namespace SmartScan ...@@ -111,7 +114,11 @@ namespace SmartScan
Common.frmMain.CloseWaittingDialog(); Common.frmMain.CloseWaittingDialog();
} }
}); });
Common.frmMain.Invoke(delegate ()
{
Common.frmMain.ShowWaittingDialog(); Common.frmMain.ShowWaittingDialog();
});
} }
...@@ -127,7 +134,7 @@ namespace SmartScan ...@@ -127,7 +134,7 @@ namespace SmartScan
btnMatchedName.Visible = false; btnMatchedName.Visible = false;
Common.extension.Clear(); Common.extension.Clear();
workCodeInfo = new(); workCodeInfo = new();
workCodeKeyword = new(); workCodeKeyword = new(StringComparer.OrdinalIgnoreCase);
originalCodeText = code; originalCodeText = code;
originalCodeIsUsed = null; originalCodeIsUsed = null;
......
...@@ -37,12 +37,15 @@ namespace SmartScan ...@@ -37,12 +37,15 @@ namespace SmartScan
server = Common.config.SmfServer; server = Common.config.SmfServer;
CID = Common.config.CID; CID = Common.config.CID;
//Common.config.Save(); //Common.config.Save();
if (server.ToLower().StartsWith("http"))
{
serverConnectTimer.Interval = 1000; serverConnectTimer.Interval = 1000;
serverConnectTimer.AutoReset = true; serverConnectTimer.AutoReset = true;
serverConnectTimer.Enabled = true; serverConnectTimer.Enabled = true;
serverConnectTimer.Elapsed += ServerConnectTimer_Elapsed; serverConnectTimer.Elapsed += ServerConnectTimer_Elapsed;
GC.KeepAlive(serverConnectTimer); GC.KeepAlive(serverConnectTimer);
} }
}
~ServerCommunication() ~ServerCommunication()
{ {
while (Datalist.TryDequeue(out var msg)) while (Datalist.TryDequeue(out var msg))
...@@ -124,7 +127,7 @@ namespace SmartScan ...@@ -124,7 +127,7 @@ namespace SmartScan
DateTime time = DateTime.Now; DateTime time = DateTime.Now;
//构建发送给服务器的对象 //构建发送给服务器的对象
Operation lineOperation = getStatus(); 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); Operation resultOperation = JsonConvert.DeserializeObject<Operation>(returntxt);
if (resultOperation==null) if (resultOperation==null)
{ {
......
...@@ -34,7 +34,6 @@ namespace SmartScan ...@@ -34,7 +34,6 @@ namespace SmartScan
this.LblCodeType = new Asa.FaceControl.FaceLabel(); this.LblCodeType = new Asa.FaceControl.FaceLabel();
this.ChkCheckCodeType = new Asa.FaceControl.FaceCheckBox(); this.ChkCheckCodeType = new Asa.FaceControl.FaceCheckBox();
this.NudMiddleTextCount = new Asa.FaceControl.FaceNumericUpDown(); this.NudMiddleTextCount = new Asa.FaceControl.FaceNumericUpDown();
this.LblMiddleTextCount = new Asa.FaceControl.FaceLabel();
this.NudSplitPart = new Asa.FaceControl.FaceNumericUpDown(); this.NudSplitPart = new Asa.FaceControl.FaceNumericUpDown();
this.LblSplitPart = new Asa.FaceControl.FaceLabel(); this.LblSplitPart = new Asa.FaceControl.FaceLabel();
this.CboMatchingSplit = new Asa.FaceControl.FaceComboBox(); this.CboMatchingSplit = new Asa.FaceControl.FaceComboBox();
...@@ -59,6 +58,8 @@ namespace SmartScan ...@@ -59,6 +58,8 @@ namespace SmartScan
this.NudMaxLength = new Asa.FaceControl.FaceNumericUpDown(); this.NudMaxLength = new Asa.FaceControl.FaceNumericUpDown();
this.BtnDel = new Asa.FaceControl.FaceButton(); this.BtnDel = new Asa.FaceControl.FaceButton();
this.faceTextBox1 = new Asa.FaceControl.FaceTextBox(); this.faceTextBox1 = new Asa.FaceControl.FaceTextBox();
this.ChkMatchisnumber = new Asa.FaceControl.FaceCheckBox();
this.ChoMatchMiddleType = new Asa.FaceControl.FaceComboBox();
this.facePanel1.SuspendLayout(); this.facePanel1.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
...@@ -86,10 +87,11 @@ namespace SmartScan ...@@ -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, 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, 28F));
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, 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.LblCodeType, 3, 7);
this.tableLayoutPanel1.Controls.Add(this.ChkCheckCodeType, 2, 7); this.tableLayoutPanel1.Controls.Add(this.ChkCheckCodeType, 2, 7);
this.tableLayoutPanel1.Controls.Add(this.NudMiddleTextCount, 1, 4); 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.NudSplitPart, 1, 6);
this.tableLayoutPanel1.Controls.Add(this.LblSplitPart, 0, 6); this.tableLayoutPanel1.Controls.Add(this.LblSplitPart, 0, 6);
this.tableLayoutPanel1.Controls.Add(this.CboMatchingSplit, 1, 5); this.tableLayoutPanel1.Controls.Add(this.CboMatchingSplit, 1, 5);
...@@ -107,27 +109,27 @@ namespace SmartScan ...@@ -107,27 +109,27 @@ namespace SmartScan
this.tableLayoutPanel1.Controls.Add(this.TxtMatchingMiddleText, 1, 3); this.tableLayoutPanel1.Controls.Add(this.TxtMatchingMiddleText, 1, 3);
this.tableLayoutPanel1.Controls.Add(this.LblStart, 2, 2); this.tableLayoutPanel1.Controls.Add(this.LblStart, 2, 2);
this.tableLayoutPanel1.Controls.Add(this.LblKeyword, 2, 1); 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.ChkMinLength, 2, 5);
this.tableLayoutPanel1.Controls.Add(this.NudMinLength, 3, 5); this.tableLayoutPanel1.Controls.Add(this.NudMinLength, 3, 5);
this.tableLayoutPanel1.Controls.Add(this.ChkMaxLength, 2, 6); this.tableLayoutPanel1.Controls.Add(this.ChkMaxLength, 2, 6);
this.tableLayoutPanel1.Controls.Add(this.NudMaxLength, 3, 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.Controls.Add(this.faceTextBox1, 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3); this.tableLayoutPanel1.Location = new System.Drawing.Point(3, 3);
this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 10; 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, 45F));
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, 45F));
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, 45F));
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, 45F));
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, 45F));
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, 45F));
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, 45F));
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, 45F));
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, 45F));
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.Size = new System.Drawing.Size(508, 461); this.tableLayoutPanel1.Size = new System.Drawing.Size(508, 461);
this.tableLayoutPanel1.TabIndex = 43; this.tableLayoutPanel1.TabIndex = 43;
// //
...@@ -138,10 +140,10 @@ namespace SmartScan ...@@ -138,10 +140,10 @@ namespace SmartScan
this.LblCodeType.BorderWidth = 0; this.LblCodeType.BorderWidth = 0;
this.LblCodeType.Dock = System.Windows.Forms.DockStyle.Fill; 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.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.Name = "LblCodeType";
this.LblCodeType.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 52;
this.LblCodeType.Text = "-"; this.LblCodeType.Text = "-";
this.LblCodeType.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.LblCodeType.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
...@@ -153,10 +155,10 @@ namespace SmartScan ...@@ -153,10 +155,10 @@ namespace SmartScan
this.ChkCheckCodeType.BorderWidth = 0; this.ChkCheckCodeType.BorderWidth = 0;
this.ChkCheckCodeType.Dock = System.Windows.Forms.DockStyle.Fill; 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.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.Name = "ChkCheckCodeType";
this.ChkCheckCodeType.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 51;
this.ChkCheckCodeType.Text = "CheckCodeType"; this.ChkCheckCodeType.Text = "CheckCodeType";
this.ChkCheckCodeType.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.ChkCheckCodeType.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
...@@ -170,32 +172,17 @@ namespace SmartScan ...@@ -170,32 +172,17 @@ namespace SmartScan
this.NudMiddleTextCount.Dock = System.Windows.Forms.DockStyle.Fill; 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.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.NudMiddleTextCount.Increment = 1F; 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.Maximum = 100F;
this.NudMiddleTextCount.Minimum = 1F; this.NudMiddleTextCount.Minimum = 1F;
this.NudMiddleTextCount.Name = "NudMiddleTextCount"; this.NudMiddleTextCount.Name = "NudMiddleTextCount";
this.NudMiddleTextCount.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 50;
this.NudMiddleTextCount.Text = "1"; this.NudMiddleTextCount.Text = "1";
this.NudMiddleTextCount.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.NudMiddleTextCount.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.NudMiddleTextCount.Value = 1F; 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 // NudSplitPart
// //
this.NudSplitPart.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); this.NudSplitPart.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
...@@ -205,12 +192,12 @@ namespace SmartScan ...@@ -205,12 +192,12 @@ namespace SmartScan
this.NudSplitPart.Dock = System.Windows.Forms.DockStyle.Fill; 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.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.NudSplitPart.Increment = 1F; 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.Maximum = 100F;
this.NudSplitPart.Minimum = 1F; this.NudSplitPart.Minimum = 1F;
this.NudSplitPart.Name = "NudSplitPart"; this.NudSplitPart.Name = "NudSplitPart";
this.NudSplitPart.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 47;
this.NudSplitPart.Text = "1"; this.NudSplitPart.Text = "1";
this.NudSplitPart.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.NudSplitPart.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
...@@ -224,10 +211,10 @@ namespace SmartScan ...@@ -224,10 +211,10 @@ namespace SmartScan
this.LblSplitPart.BorderWidth = 0; this.LblSplitPart.BorderWidth = 0;
this.LblSplitPart.Dock = System.Windows.Forms.DockStyle.Fill; 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.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.Name = "LblSplitPart";
this.LblSplitPart.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 46;
this.LblSplitPart.Text = "Field"; this.LblSplitPart.Text = "Field";
this.LblSplitPart.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.LblSplitPart.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
...@@ -239,12 +226,12 @@ namespace SmartScan ...@@ -239,12 +226,12 @@ namespace SmartScan
this.CboMatchingSplit.BorderWidth = 2; this.CboMatchingSplit.BorderWidth = 2;
this.CboMatchingSplit.Dock = System.Windows.Forms.DockStyle.Fill; 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.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.Name = "CboMatchingSplit";
this.CboMatchingSplit.Padding = new System.Windows.Forms.Padding(3); this.CboMatchingSplit.Padding = new System.Windows.Forms.Padding(3);
this.CboMatchingSplit.SelectedIndex = -1; this.CboMatchingSplit.SelectedIndex = -1;
this.CboMatchingSplit.SelectedText = ""; 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.TabIndex = 45;
this.CboMatchingSplit.Text = "faceComboBox1"; this.CboMatchingSplit.Text = "faceComboBox1";
this.CboMatchingSplit.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.CboMatchingSplit.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
...@@ -259,10 +246,10 @@ namespace SmartScan ...@@ -259,10 +246,10 @@ namespace SmartScan
this.ChkMatchingSplit.BorderWidth = 0; this.ChkMatchingSplit.BorderWidth = 0;
this.ChkMatchingSplit.Dock = System.Windows.Forms.DockStyle.Fill; 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.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.Name = "ChkMatchingSplit";
this.ChkMatchingSplit.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 44;
this.ChkMatchingSplit.Text = "Split"; this.ChkMatchingSplit.Text = "Split";
this.ChkMatchingSplit.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.ChkMatchingSplit.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
...@@ -275,10 +262,10 @@ namespace SmartScan ...@@ -275,10 +262,10 @@ namespace SmartScan
this.ChkMatchingStart.BorderWidth = 0; this.ChkMatchingStart.BorderWidth = 0;
this.ChkMatchingStart.Dock = System.Windows.Forms.DockStyle.Fill; 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.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.Name = "ChkMatchingStart";
this.ChkMatchingStart.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 25;
this.ChkMatchingStart.Text = "Start"; this.ChkMatchingStart.Text = "Start";
this.ChkMatchingStart.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.ChkMatchingStart.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
...@@ -291,10 +278,10 @@ namespace SmartScan ...@@ -291,10 +278,10 @@ namespace SmartScan
this.tableLayoutPanel1.SetColumnSpan(this.ChkLengthEnd, 2); this.tableLayoutPanel1.SetColumnSpan(this.ChkLengthEnd, 2);
this.ChkLengthEnd.Dock = System.Windows.Forms.DockStyle.Fill; 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.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.Name = "ChkLengthEnd";
this.ChkLengthEnd.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 42;
this.ChkLengthEnd.Text = "faceCheckBox7"; this.ChkLengthEnd.Text = "faceCheckBox7";
this.ChkLengthEnd.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.ChkLengthEnd.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
...@@ -307,10 +294,10 @@ namespace SmartScan ...@@ -307,10 +294,10 @@ namespace SmartScan
this.ChkMatchingEnd.BorderWidth = 0; this.ChkMatchingEnd.BorderWidth = 0;
this.ChkMatchingEnd.Dock = System.Windows.Forms.DockStyle.Fill; 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.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.Name = "ChkMatchingEnd";
this.ChkMatchingEnd.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 26;
this.ChkMatchingEnd.Text = "End"; this.ChkMatchingEnd.Text = "End";
this.ChkMatchingEnd.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.ChkMatchingEnd.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
...@@ -324,12 +311,12 @@ namespace SmartScan ...@@ -324,12 +311,12 @@ namespace SmartScan
this.NudLength.Dock = System.Windows.Forms.DockStyle.Fill; 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.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.NudLength.Increment = 1F; 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.Maximum = 100F;
this.NudLength.Minimum = 1F; this.NudLength.Minimum = 1F;
this.NudLength.Name = "NudLength"; this.NudLength.Name = "NudLength";
this.NudLength.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 41;
this.NudLength.Text = "1"; this.NudLength.Text = "1";
this.NudLength.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.NudLength.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
...@@ -343,10 +330,10 @@ namespace SmartScan ...@@ -343,10 +330,10 @@ namespace SmartScan
this.ChkMatchingMiddle.BorderWidth = 0; this.ChkMatchingMiddle.BorderWidth = 0;
this.ChkMatchingMiddle.Dock = System.Windows.Forms.DockStyle.Fill; 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.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.Name = "ChkMatchingMiddle";
this.ChkMatchingMiddle.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 27;
this.ChkMatchingMiddle.Text = "Middle"; this.ChkMatchingMiddle.Text = "Middle";
this.ChkMatchingMiddle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.ChkMatchingMiddle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
...@@ -360,12 +347,12 @@ namespace SmartScan ...@@ -360,12 +347,12 @@ namespace SmartScan
this.NudStart.Dock = System.Windows.Forms.DockStyle.Fill; 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.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.NudStart.Increment = 1F; 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.Maximum = 100F;
this.NudStart.Minimum = 0F; this.NudStart.Minimum = 0F;
this.NudStart.Name = "NudStart"; this.NudStart.Name = "NudStart";
this.NudStart.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 40;
this.NudStart.Text = "0"; this.NudStart.Text = "0";
this.NudStart.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.NudStart.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
...@@ -378,7 +365,7 @@ namespace SmartScan ...@@ -378,7 +365,7 @@ namespace SmartScan
this.TxtMatchingStartText.BorderStyle = Asa.FaceControl.ControlShape.Rectangle; this.TxtMatchingStartText.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.TxtMatchingStartText.BorderWidth = 2; this.TxtMatchingStartText.BorderWidth = 2;
this.TxtMatchingStartText.Dock = System.Windows.Forms.DockStyle.Fill; 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.MaxLength = 32767;
this.TxtMatchingStartText.Name = "TxtMatchingStartText"; this.TxtMatchingStartText.Name = "TxtMatchingStartText";
this.TxtMatchingStartText.Padding = new System.Windows.Forms.Padding(3); this.TxtMatchingStartText.Padding = new System.Windows.Forms.Padding(3);
...@@ -387,7 +374,7 @@ namespace SmartScan ...@@ -387,7 +374,7 @@ namespace SmartScan
this.TxtMatchingStartText.SelectionStart = 0; this.TxtMatchingStartText.SelectionStart = 0;
this.TxtMatchingStartText.ShowDel = true; this.TxtMatchingStartText.ShowDel = true;
this.TxtMatchingStartText.ShowQuery = false; 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.TabIndex = 31;
this.TxtMatchingStartText.Text = "faceTextBox1"; this.TxtMatchingStartText.Text = "faceTextBox1";
// //
...@@ -398,12 +385,12 @@ namespace SmartScan ...@@ -398,12 +385,12 @@ namespace SmartScan
this.CboKeyword.BorderWidth = 2; this.CboKeyword.BorderWidth = 2;
this.CboKeyword.Dock = System.Windows.Forms.DockStyle.Fill; 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.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.Name = "CboKeyword";
this.CboKeyword.Padding = new System.Windows.Forms.Padding(3); this.CboKeyword.Padding = new System.Windows.Forms.Padding(3);
this.CboKeyword.SelectedIndex = -1; this.CboKeyword.SelectedIndex = -1;
this.CboKeyword.SelectedText = ""; 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.TabIndex = 39;
this.CboKeyword.Text = "faceComboBox1"; this.CboKeyword.Text = "faceComboBox1";
this.CboKeyword.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.CboKeyword.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
...@@ -415,7 +402,7 @@ namespace SmartScan ...@@ -415,7 +402,7 @@ namespace SmartScan
this.TxtMatchingEndText.BorderStyle = Asa.FaceControl.ControlShape.Rectangle; this.TxtMatchingEndText.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.TxtMatchingEndText.BorderWidth = 2; this.TxtMatchingEndText.BorderWidth = 2;
this.TxtMatchingEndText.Dock = System.Windows.Forms.DockStyle.Fill; 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.MaxLength = 32767;
this.TxtMatchingEndText.Name = "TxtMatchingEndText"; this.TxtMatchingEndText.Name = "TxtMatchingEndText";
this.TxtMatchingEndText.Padding = new System.Windows.Forms.Padding(3); this.TxtMatchingEndText.Padding = new System.Windows.Forms.Padding(3);
...@@ -424,7 +411,7 @@ namespace SmartScan ...@@ -424,7 +411,7 @@ namespace SmartScan
this.TxtMatchingEndText.SelectionStart = 0; this.TxtMatchingEndText.SelectionStart = 0;
this.TxtMatchingEndText.ShowDel = true; this.TxtMatchingEndText.ShowDel = true;
this.TxtMatchingEndText.ShowQuery = false; 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.TabIndex = 32;
this.TxtMatchingEndText.Text = "faceTextBox2"; this.TxtMatchingEndText.Text = "faceTextBox2";
// //
...@@ -435,10 +422,10 @@ namespace SmartScan ...@@ -435,10 +422,10 @@ namespace SmartScan
this.LblLength.BorderWidth = 0; this.LblLength.BorderWidth = 0;
this.LblLength.Dock = System.Windows.Forms.DockStyle.Fill; 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.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.Name = "LblLength";
this.LblLength.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 38;
this.LblLength.Text = "长度"; this.LblLength.Text = "长度";
this.LblLength.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.LblLength.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
...@@ -449,7 +436,7 @@ namespace SmartScan ...@@ -449,7 +436,7 @@ namespace SmartScan
this.TxtMatchingMiddleText.BorderStyle = Asa.FaceControl.ControlShape.Rectangle; this.TxtMatchingMiddleText.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.TxtMatchingMiddleText.BorderWidth = 2; this.TxtMatchingMiddleText.BorderWidth = 2;
this.TxtMatchingMiddleText.Dock = System.Windows.Forms.DockStyle.Fill; 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.MaxLength = 32767;
this.TxtMatchingMiddleText.Name = "TxtMatchingMiddleText"; this.TxtMatchingMiddleText.Name = "TxtMatchingMiddleText";
this.TxtMatchingMiddleText.Padding = new System.Windows.Forms.Padding(3); this.TxtMatchingMiddleText.Padding = new System.Windows.Forms.Padding(3);
...@@ -458,7 +445,7 @@ namespace SmartScan ...@@ -458,7 +445,7 @@ namespace SmartScan
this.TxtMatchingMiddleText.SelectionStart = 0; this.TxtMatchingMiddleText.SelectionStart = 0;
this.TxtMatchingMiddleText.ShowDel = true; this.TxtMatchingMiddleText.ShowDel = true;
this.TxtMatchingMiddleText.ShowQuery = false; 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.TabIndex = 33;
this.TxtMatchingMiddleText.Text = "faceTextBox3"; this.TxtMatchingMiddleText.Text = "faceTextBox3";
// //
...@@ -469,10 +456,10 @@ namespace SmartScan ...@@ -469,10 +456,10 @@ namespace SmartScan
this.LblStart.BorderWidth = 0; this.LblStart.BorderWidth = 0;
this.LblStart.Dock = System.Windows.Forms.DockStyle.Fill; 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.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.Name = "LblStart";
this.LblStart.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 37;
this.LblStart.Text = "起始"; this.LblStart.Text = "起始";
this.LblStart.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.LblStart.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
...@@ -484,10 +471,10 @@ namespace SmartScan ...@@ -484,10 +471,10 @@ namespace SmartScan
this.LblKeyword.BorderWidth = 0; this.LblKeyword.BorderWidth = 0;
this.LblKeyword.Dock = System.Windows.Forms.DockStyle.Fill; 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.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.Name = "LblKeyword";
this.LblKeyword.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 36;
this.LblKeyword.Text = "key"; this.LblKeyword.Text = "key";
this.LblKeyword.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.LblKeyword.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
...@@ -500,10 +487,10 @@ namespace SmartScan ...@@ -500,10 +487,10 @@ namespace SmartScan
this.tableLayoutPanel1.SetColumnSpan(this.ChkCaseSensitivity, 2); this.tableLayoutPanel1.SetColumnSpan(this.ChkCaseSensitivity, 2);
this.ChkCaseSensitivity.Dock = System.Windows.Forms.DockStyle.Fill; 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.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.Name = "ChkCaseSensitivity";
this.ChkCaseSensitivity.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 28;
this.ChkCaseSensitivity.Text = "Sensitivity"; this.ChkCaseSensitivity.Text = "Sensitivity";
this.ChkCaseSensitivity.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.ChkCaseSensitivity.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
...@@ -515,10 +502,10 @@ namespace SmartScan ...@@ -515,10 +502,10 @@ namespace SmartScan
this.ChkMinLength.BorderWidth = 0; this.ChkMinLength.BorderWidth = 0;
this.ChkMinLength.Dock = System.Windows.Forms.DockStyle.Fill; 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.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.Name = "ChkMinLength";
this.ChkMinLength.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 29;
this.ChkMinLength.Text = "Min"; this.ChkMinLength.Text = "Min";
this.ChkMinLength.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.ChkMinLength.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
...@@ -533,12 +520,12 @@ namespace SmartScan ...@@ -533,12 +520,12 @@ namespace SmartScan
this.NudMinLength.Dock = System.Windows.Forms.DockStyle.Fill; 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.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.NudMinLength.Increment = 1F; 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.Maximum = 100F;
this.NudMinLength.Minimum = 0F; this.NudMinLength.Minimum = 0F;
this.NudMinLength.Name = "NudMinLength"; this.NudMinLength.Name = "NudMinLength";
this.NudMinLength.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 34;
this.NudMinLength.Text = "0"; this.NudMinLength.Text = "0";
this.NudMinLength.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.NudMinLength.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
...@@ -552,10 +539,10 @@ namespace SmartScan ...@@ -552,10 +539,10 @@ namespace SmartScan
this.ChkMaxLength.BorderWidth = 0; this.ChkMaxLength.BorderWidth = 0;
this.ChkMaxLength.Dock = System.Windows.Forms.DockStyle.Fill; 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.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.Name = "ChkMaxLength";
this.ChkMaxLength.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 30;
this.ChkMaxLength.Text = "Max"; this.ChkMaxLength.Text = "Max";
this.ChkMaxLength.TextAlign = System.Drawing.ContentAlignment.MiddleRight; this.ChkMaxLength.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
...@@ -570,12 +557,12 @@ namespace SmartScan ...@@ -570,12 +557,12 @@ namespace SmartScan
this.NudMaxLength.Dock = System.Windows.Forms.DockStyle.Fill; 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.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.NudMaxLength.Increment = 1F; 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.Maximum = 100F;
this.NudMaxLength.Minimum = 0F; this.NudMaxLength.Minimum = 0F;
this.NudMaxLength.Name = "NudMaxLength"; this.NudMaxLength.Name = "NudMaxLength";
this.NudMaxLength.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 35;
this.NudMaxLength.Text = "0"; this.NudMaxLength.Text = "0";
this.NudMaxLength.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.NudMaxLength.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
...@@ -590,10 +577,10 @@ namespace SmartScan ...@@ -590,10 +577,10 @@ namespace SmartScan
this.BtnDel.Dock = System.Windows.Forms.DockStyle.Fill; this.BtnDel.Dock = System.Windows.Forms.DockStyle.Fill;
this.BtnDel.ForeColor = System.Drawing.Color.Red; this.BtnDel.ForeColor = System.Drawing.Color.Red;
this.BtnDel.HoldPress = false; 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.Name = "BtnDel";
this.BtnDel.Padding = new System.Windows.Forms.Padding(3); 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.TabIndex = 43;
this.BtnDel.Text = "Del"; this.BtnDel.Text = "Del";
this.BtnDel.Click += new System.EventHandler(this.BtnDel_Click); this.BtnDel.Click += new System.EventHandler(this.BtnDel_Click);
...@@ -615,18 +602,50 @@ namespace SmartScan ...@@ -615,18 +602,50 @@ namespace SmartScan
this.faceTextBox1.SelectionStart = 0; this.faceTextBox1.SelectionStart = 0;
this.faceTextBox1.ShowDel = false; this.faceTextBox1.ShowDel = false;
this.faceTextBox1.ShowQuery = 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.TabIndex = 48;
this.faceTextBox1.Text = "faceTextBox1"; this.faceTextBox1.Text = "faceTextBox1";
this.faceTextBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; 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 // UsrCodeExtractList
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.facePanel1); this.Controls.Add(this.facePanel1);
this.Name = "UsrCodeExtractList"; this.Name = "UsrCodeExtractList";
this.Size = new System.Drawing.Size(566, 558); this.Size = new System.Drawing.Size(523, 476);
this.facePanel1.ResumeLayout(false); this.facePanel1.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel1.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
...@@ -662,8 +681,9 @@ namespace SmartScan ...@@ -662,8 +681,9 @@ namespace SmartScan
private Asa.FaceControl.FaceCheckBox ChkMatchingSplit; private Asa.FaceControl.FaceCheckBox ChkMatchingSplit;
private Asa.FaceControl.FaceTextBox faceTextBox1; private Asa.FaceControl.FaceTextBox faceTextBox1;
private Asa.FaceControl.FaceNumericUpDown NudMiddleTextCount; private Asa.FaceControl.FaceNumericUpDown NudMiddleTextCount;
private Asa.FaceControl.FaceLabel LblMiddleTextCount;
private Asa.FaceControl.FaceCheckBox ChkCheckCodeType; private Asa.FaceControl.FaceCheckBox ChkCheckCodeType;
private Asa.FaceControl.FaceLabel LblCodeType; private Asa.FaceControl.FaceLabel LblCodeType;
private Asa.FaceControl.FaceCheckBox ChkMatchisnumber;
private Asa.FaceControl.FaceComboBox ChoMatchMiddleType;
} }
} }
...@@ -19,6 +19,11 @@ namespace SmartScan ...@@ -19,6 +19,11 @@ namespace SmartScan
Language.SetLanguage(this); Language.SetLanguage(this);
changed = true; 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.codeText = codeText;
this.codeType = codeType; this.codeType = codeType;
CboKeyword.Items.AddRange(Common.macroKey.ToArray()); CboKeyword.Items.AddRange(Common.macroKey.ToArray());
...@@ -43,7 +48,8 @@ namespace SmartScan ...@@ -43,7 +48,8 @@ namespace SmartScan
CboKeyword.SelectedText = match.Keyword; CboKeyword.SelectedText = match.Keyword;
NudStart.Value = match.SubstringStart; NudStart.Value = match.SubstringStart;
match.CodeType = codeType; match.CodeType = codeType;
ChoMatchMiddleType.SelectedIndex = match.MatchMiddleType+1;
ChkMatchisnumber.Checked = match.MatchISNumber;
ChkCheckCodeType.Checked = match.CheckCodeType; ChkCheckCodeType.Checked = match.CheckCodeType;
LblCodeType.Text = codeType; LblCodeType.Text = codeType;
...@@ -87,7 +93,9 @@ namespace SmartScan ...@@ -87,7 +93,9 @@ namespace SmartScan
SubstringStart = Convert.ToInt32(NudStart.Value), SubstringStart = Convert.ToInt32(NudStart.Value),
SubstringLength = ChkLengthEnd.Checked ? -1 : Convert.ToInt32(NudLength.Value), SubstringLength = ChkLengthEnd.Checked ? -1 : Convert.ToInt32(NudLength.Value),
CheckCodeType = ChkCheckCodeType.Checked, CheckCodeType = ChkCheckCodeType.Checked,
CodeType = LblCodeType.Text CodeType = LblCodeType.Text,
MatchMiddleType = ChoMatchMiddleType.SelectedIndex - 1,
MatchISNumber = ChkMatchisnumber.Checked
}; };
return match; return match;
} }
......
...@@ -54,6 +54,7 @@ namespace SmartScan ...@@ -54,6 +54,7 @@ namespace SmartScan
private void LstKey_SelectedIndexChanged(object sender, EventArgs e) private void LstKey_SelectedIndexChanged(object sender, EventArgs e)
{ {
if(LstKey.SelectedIndex>=0)
TxtKey.Text = keyCopy[LstKey.SelectedIndex]; TxtKey.Text = keyCopy[LstKey.SelectedIndex];
} }
......
...@@ -269,6 +269,13 @@ namespace SmartScan ...@@ -269,6 +269,13 @@ namespace SmartScan
private void BtnOcrCode_Click(object sender, EventArgs e) private void BtnOcrCode_Click(object sender, EventArgs e)
{ {
if (codeIndex == -1) return; 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); 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); FrmCodeOCR frm = new(mateCopy[mateIndex].Code[codeIndex], codeOcr, mateCopy[mateIndex].Match, mateCopy[mateIndex].Image);
...@@ -281,12 +288,8 @@ namespace SmartScan ...@@ -281,12 +288,8 @@ namespace SmartScan
mateCopy[mateIndex].Ocr.AddRange(frm.codeOcr); mateCopy[mateIndex].Ocr.AddRange(frm.codeOcr);
mateCopy[mateIndex].Match.AddRange(frm.codeMatch); 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; mateCopy[mateIndex].State = TemplateState.Unsaved;
LstCode.Items[codeIndex] = FormatCode(codeIndex);
} }
} }
......
...@@ -8,10 +8,11 @@ ...@@ -8,10 +8,11 @@
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<RootNamespace>SmartScan</RootNamespace> <RootNamespace>SmartScan</RootNamespace>
<AssemblyName>SmartScan</AssemblyName> <AssemblyName>SmartScan</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>false</Deterministic> <Deterministic>false</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
...@@ -39,6 +40,9 @@ ...@@ -39,6 +40,9 @@
<PropertyGroup> <PropertyGroup>
<ApplicationIcon>App.ico</ApplicationIcon> <ApplicationIcon>App.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Asa.Camera.VisionLib, Version=1.3.7940.26720, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Asa.Camera.VisionLib, Version=1.3.7940.26720, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
...@@ -254,6 +258,7 @@ ...@@ -254,6 +258,7 @@
<EmbeddedResource Include="SetControl\UsrCodeExtractList.resx"> <EmbeddedResource Include="SetControl\UsrCodeExtractList.resx">
<DependentUpon>UsrCodeExtractList.cs</DependentUpon> <DependentUpon>UsrCodeExtractList.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<None Include="app.manifest" />
<None Include="log4net.config"> <None Include="log4net.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </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 Reelid
PN
QTY QTY
PRODATE PRODATE
BATCH BATCH
Description Description
SP SP
Memo Memo
h1
*h2
1473
\ No newline at end of file \ No newline at end of file
1529
\ No newline at end of file \ No newline at end of file
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<PrintCompletedClear>False</PrintCompletedClear> <PrintCompletedClear>False</PrintCompletedClear>
<OpenStartWork>True</OpenStartWork> <OpenStartWork>True</OpenStartWork>
<OpenMaximize>True</OpenMaximize> <OpenMaximize>True</OpenMaximize>
<DefaultPrintLabel>ALCOELECTRO 60x30mm</DefaultPrintLabel> <DefaultPrintLabel>test2</DefaultPrintLabel>
<EnabledIO>False</EnabledIO> <EnabledIO>False</EnabledIO>
<EnabledCamera>False</EnabledCamera> <EnabledCamera>False</EnabledCamera>
<IOIP>192.168.0.101</IOIP> <IOIP>192.168.0.101</IOIP>
...@@ -25,15 +25,18 @@ ...@@ -25,15 +25,18 @@
</ReelIDPostfix> </ReelIDPostfix>
<LockPassword>12345</LockPassword> <LockPassword>12345</LockPassword>
<ExtensionGroup>General</ExtensionGroup> <ExtensionGroup>General</ExtensionGroup>
<HttpServer>http://localhost/smdbox/rest/api/v2/mes/listPnBySupplierPn?supplierPn=</HttpServer> <HttpServer>
<HttpReelID>http://localhost/ScopeCVSService/BoxReelIDInfoMaintain</HttpReelID> </HttpServer>
<HttpReelID>http://127.0.0.1:8888/test</HttpReelID>
<DefaultMaterialName>test</DefaultMaterialName> <DefaultMaterialName>test</DefaultMaterialName>
<TriggerOpenLight>True</TriggerOpenLight> <TriggerOpenLight>True</TriggerOpenLight>
<WebService> <WebService>
</WebService> </WebService>
<PromptAfterPrinting>False</PromptAfterPrinting> <PromptAfterPrinting>False</PromptAfterPrinting>
<AutoPrint>True</AutoPrint> <AutoPrint>True</AutoPrint>
<ReelIDKeyWord>Reelid</ReelIDKeyWord> <ReelIDKeyWord>
<SmfServer>http://192.168.11.243/smf-core/</SmfServer> </ReelIDKeyWord>
<SmfServer>http://192.168.1.243/smf-core/</SmfServer>
<CID>NeoScan01</CID> <CID>NeoScan01</CID>
<iomodule>NiRen</iomodule>
</appSettings> </appSettings>
\ No newline at end of file \ No newline at end of file
...@@ -18,12 +18,19 @@ ...@@ -18,12 +18,19 @@
<LabelEmpty>Print label content is empty, do you want to continue printing?</LabelEmpty> <LabelEmpty>Print label content is empty, do you want to continue printing?</LabelEmpty>
<KeyExists>[name], Key already exists</KeyExists> <KeyExists>[name], Key already exists</KeyExists>
<KeyRepeat>Repeat keyword</KeyRepeat> <KeyRepeat>Repeat keyword</KeyRepeat>
<KeyEmpty>Keyword can't be empty</KeyEmpty>
<NoMatchSelect>A matching pattern must be selected</NoMatchSelect>
<UnlockWrong>Wrong unlock password</UnlockWrong> <UnlockWrong>Wrong unlock password</UnlockWrong>
<RepeatPrint>The tray label has been printed</RepeatPrint> <RepeatPrint>The tray label has been printed</RepeatPrint>
<MaterialScanning>In recognition...</MaterialScanning> <MaterialScanning>In recognition...</MaterialScanning>
<MaterialTemplateMatching>Template matching...</MaterialTemplateMatching> <MaterialTemplateMatching>Template matching...</MaterialTemplateMatching>
<MaterialProcessing>Processing results...</MaterialProcessing> <MaterialProcessing>Processing results...</MaterialProcessing>
<PleaseWaiting>Please Waiting...</PleaseWaiting> <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> </Dialog>
<FrmUsersLogin Text="Login" Font="Arial,24,B,"> <FrmUsersLogin Text="Login" Font="Arial,24,B,">
<LblUser Text="User name" Font="Arial,11,," /> <LblUser Text="User name" Font="Arial,11,," />
...@@ -117,18 +124,19 @@ ...@@ -117,18 +124,19 @@
<BtnDelKey Text="Delete key" Font="Arial,12,," /> <BtnDelKey Text="Delete key" Font="Arial,12,," />
<BtnUpdateKey Text="Update key" Font="Arial,12,," /> <BtnUpdateKey Text="Update key" Font="Arial,12,," />
<BtnAppendKey Text="Append conditions" 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,," /> <PnlReelid Text="Reel ID" Font="Arial,12,," />
<LblContent Text="Build conditions" Font="Arial,12,B," /> <LblContent Text="Build conditions" Font="Arial,12,B," />
<LblPrefix Text="Start characters" Font="Arial,12,," /> <LblPrefix Text="Prefix" Font="Arial,10,," />
<LblPostfix Text="End characters" Font="Arial,12,," /> <LblPostfix Text="Suffix" Font="Arial,10,," />
<LblPlaces Text="Sereial number length" Font="Arial,12,," /> <LblPlaces Text="Field length" Font="Arial,10,," />
<ChkReelIDFillZero Text="Fill zero" Font="Arial,12,," /> <ChkReelIDFillZero Text="Fill zero" Font="Arial,12,," />
</UsrMacro> </UsrMacro>
<UsrCodeExtractList> <UsrCodeExtractList>
<ChkMatchingStart Text="Match starting characters" Font="Arial,12,," /> <ChkMatchingStart Text="Match starting characters" Font="Arial,12,," />
<ChkMatchingEnd Text="Match ending characters" Font="Arial,12,," /> <ChkMatchingEnd Text="Match ending characters" Font="Arial,12,," />
<ChkMatchingMiddle Text="Contains 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,," /> <ChkMatchingSplit Text="Barcode split character" Font="Arial,12,," />
<LblSplitPart Text="Get the split part" Font="Arial,12,," /> <LblSplitPart Text="Get the split part" Font="Arial,12,," />
<ChkCaseSensitivity Text="Case sensitivity" Font="Arial,12,," /> <ChkCaseSensitivity Text="Case sensitivity" Font="Arial,12,," />
......
...@@ -18,12 +18,19 @@ ...@@ -18,12 +18,19 @@
<LabelEmpty>打印标签内容有空内容,是否继续打印?</LabelEmpty> <LabelEmpty>打印标签内容有空内容,是否继续打印?</LabelEmpty>
<KeyExists>[name],关键字已存在</KeyExists> <KeyExists>[name],关键字已存在</KeyExists>
<KeyRepeat>重复关键字</KeyRepeat> <KeyRepeat>重复关键字</KeyRepeat>
<NoMatchSelect>必须选择一个匹配模式</NoMatchSelect>
<KeyEmpty>关键字为空</KeyEmpty>
<UnlockWrong>解锁密码错误</UnlockWrong> <UnlockWrong>解锁密码错误</UnlockWrong>
<RepeatPrint>该料盘标签已打印</RepeatPrint> <RepeatPrint>该料盘标签已打印</RepeatPrint>
<MaterialScanning>拍照识别...</MaterialScanning> <MaterialScanning>拍照识别...</MaterialScanning>
<MaterialTemplateMatching>模版匹配...</MaterialTemplateMatching> <MaterialTemplateMatching>模版匹配...</MaterialTemplateMatching>
<MaterialProcessing>计算结果...</MaterialProcessing> <MaterialProcessing>计算结果...</MaterialProcessing>
<PleaseWaiting>请稍后...</PleaseWaiting> <PleaseWaiting>请稍后...</PleaseWaiting>
<MatchType_max>匹配数量至多</MatchType_max>
<MatchType_equals>匹配数量等于</MatchType_equals>
<MatchType_min>匹配数量至少</MatchType_min>
<OcrNeedCodeSetKey>Ocr的基准条码必须先匹配关键字</OcrNeedCodeSetKey>
<ThisMatchHasOcrCantdelete>该匹配规则下有Ocr规则,不能删除全部关键字</ThisMatchHasOcrCantdelete>
</Dialog> </Dialog>
<FrmUsersLogin Text="登录" Font="微软雅黑,24,B,"> <FrmUsersLogin Text="登录" Font="微软雅黑,24,B,">
<LblUser Text="用户名:" Font="微软雅黑,11,," /> <LblUser Text="用户名:" Font="微软雅黑,11,," />
...@@ -117,6 +124,7 @@ ...@@ -117,6 +124,7 @@
<BtnDelKey Text="删除" Font="微软雅黑,12,," /> <BtnDelKey Text="删除" Font="微软雅黑,12,," />
<BtnUpdateKey Text="更新" Font="微软雅黑,12,," /> <BtnUpdateKey Text="更新" Font="微软雅黑,12,," />
<BtnAppendKey Text="添加到生成条件" Font="微软雅黑,12,," /> <BtnAppendKey Text="添加到生成条件" Font="微软雅黑,12,," />
<btn_setriid Text="切换自动RI" Font="微软雅黑,12,," />
<PnlReelid Text="Reel ID" Font="微软雅黑,12,," /> <PnlReelid Text="Reel ID" Font="微软雅黑,12,," />
<LblContent Text="生成条件" Font="微软雅黑,12,B," /> <LblContent Text="生成条件" Font="微软雅黑,12,B," />
<LblPrefix Text="开头字符串" Font="微软雅黑,12,," /> <LblPrefix Text="开头字符串" Font="微软雅黑,12,," />
...@@ -128,7 +136,7 @@ ...@@ -128,7 +136,7 @@
<ChkMatchingStart Text="匹配开头字符" Font="微软雅黑,12,," /> <ChkMatchingStart Text="匹配开头字符" Font="微软雅黑,12,," />
<ChkMatchingEnd Text="匹配结尾字符" Font="微软雅黑,12,," /> <ChkMatchingEnd Text="匹配结尾字符" Font="微软雅黑,12,," />
<ChkMatchingMiddle Text="匹配任意位置字符" Font="微软雅黑,12,," /> <ChkMatchingMiddle Text="匹配任意位置字符" Font="微软雅黑,12,," />
<LblMiddleTextCount Text="字符出现最多次数" Font="微软雅黑,12,," /> <ChkMatchisnumber Text="必须为数字" Font="微软雅黑,12,," />
<ChkMatchingSplit Text="条码分割字符" Font="微软雅黑,12,," /> <ChkMatchingSplit Text="条码分割字符" Font="微软雅黑,12,," />
<LblSplitPart Text="获取分割部分" Font="微软雅黑,12,," /> <LblSplitPart Text="获取分割部分" Font="微软雅黑,12,," />
<ChkCaseSensitivity Text="区分大小写" Font="微软雅黑,12,," /> <ChkCaseSensitivity Text="区分大小写" Font="微软雅黑,12,," />
......
此文件的差异太大,无法显示。
此文件的差异太大,无法显示。
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup> </startup>
<appSettings>
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
</appSettings>
</configuration> </configuration>
1f6f52a2c9a538c951873afd08ee8e13e86993e5 7b63aa4ffa34bf61a68afae14d5eecc716e25843
...@@ -163,3 +163,6 @@ D:\rick\vs\SmartScan\SmartScan\bin\Debug\Asa.Camera.VisionLib.pdb ...@@ -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\Asa.Camera.VisionLib.xml
D:\rick\vs\SmartScan\SmartScan\bin\Debug\MvCameraControl.Net.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\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!