Commit 71bf9456 刘韬

1

1 个父辈 6e600050
正在显示 105 个修改的文件 包含 1985 行增加93 行删除
......@@ -42,6 +42,18 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\FaceControl\FaceControl\bin\Debug\Asa.Face.Control.dll</HintPath>
</Reference>
<Reference Include="ClosedXML, Version=0.96.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL">
<HintPath>..\packages\ClosedXML.0.96.0\lib\net46\ClosedXML.dll</HintPath>
</Reference>
<Reference Include="ConfigHelper">
<HintPath>..\..\ConfigHelper\ConfigHelper\bin\Debug\ConfigHelper.dll</HintPath>
</Reference>
<Reference Include="DocumentFormat.OpenXml, Version=2.16.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.2.16.0\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
</Reference>
<Reference Include="ExcelNumberFormat, Version=1.1.0.0, Culture=neutral, PublicKeyToken=23c6f5d73be07eca, processorArchitecture=MSIL">
<HintPath>..\packages\ExcelNumberFormat.1.1.0\lib\net20\ExcelNumberFormat.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
</Reference>
......@@ -64,6 +76,7 @@
<Reference Include="TcpKPIO">
<HintPath>..\..\..\DllLibrary\第三方\泥人科技-网络继电器\TcpKPIO.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="zxing, Version=0.16.6.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL">
<HintPath>..\packages\ZXing.Net.0.16.6\lib\net461\zxing.dll</HintPath>
</Reference>
......@@ -85,7 +98,7 @@
<Compile Include="IO\IOManage.cs" />
<Compile Include="IO\IO_Interface.cs" />
<Compile Include="IO\KND.cs" />
<Compile Include="IO\NirenIO.cs" />
<Compile Include="IO\NiRenIO.cs" />
<Compile Include="MatchAnalysis.cs" />
<Compile Include="MonitorMouseKeyboard.cs" />
<Compile Include="NamedPipeClient.cs" />
......
using System;
using ConfigHelper;
using System;
namespace BLL
{
......@@ -242,7 +243,11 @@ namespace BLL
get => config.Read<string>(REEL_ID_POSTFIX);
set => config.Write(REEL_ID_POSTFIX, value);
}
public bool ReelIDAutoResetByDate
{
get => config.Read<bool>(REEL_ID_AutoResetByDate);
set => config.Write(REEL_ID_AutoResetByDate, value);
}
public string LockPassword
{
get => config.Read<string>(LOCK_PASSWORD);
......@@ -308,6 +313,26 @@ namespace BLL
get => config.Read<string>(IOModule);
set => config.Write(IOModule, value);
}
static Config() {
ConfigHelper.Config.LoadMyConfig(typeof(Config));
}
[MyConfigComment("数据源类型")]
public static MyConfig<string> DataSource_Type;
[MyConfigComment("数据源字符串")]
public static MyConfig<string> DataSource_String;
[MyConfigComment("数据源编码")]
public static MyConfig<string> DataSource_Encoding;
[MyConfigComment("数据源匹配Key")]
public static MyConfig<string> DataSource_DataKey;
[MyConfigComment("数据源列标题")]
public static MyConfig<string> DataSource_DataTitle;
[MyConfigComment("遍历数据源目录")]
public static MyConfig<bool> DataSource_Recursive;
public void Save()
{
config.Save();
......@@ -321,6 +346,8 @@ namespace BLL
private const string Smf_Server = "SmfServer";
private const string ClientID = "CID";
private const string IOModule = "IOModule";
private const string dataSourceType = "DataSourceType";
private const string dataSourceString = "dataSourceString";
private const string ENABLED_USER_LOGIN = "EnabledUserLogin";
private const string OPERATE_TIMEOUT = "OperateTimeout";
private const string CHECK_SHORTCUT = "CheckShortcut";
......@@ -347,6 +374,7 @@ namespace BLL
private const string REEL_ID_FILL_ZERO = "ReelIDFillZero";
private const string REEL_ID_PREFIX = "ReelIDPrefix";
private const string REEL_ID_POSTFIX = "ReelIDPostfix";
private const string REEL_ID_AutoResetByDate = "ReelIDAutoResetByDate";
private const string LOCK_PASSWORD = "LockPassword";
private const string EXTENSION_NAME = "ExtensionGroup";
private const string HTTP_SERVER = "HttpServer";
......
......@@ -215,9 +215,9 @@ namespace BLL
currentExtension.Clear();
}
public void SetKey(string[] originalCode, Dictionary<string, string> key,bool hasMatch)
public bool SetKey(string[] originalCode, Dictionary<string, string> key,bool hasMatch, out string errmsg)
{
currentExtension.SetKey(originalCode, key, hasMatch);
return currentExtension.SetKey(originalCode, key, hasMatch, out errmsg);
}
public void Update()
......
......@@ -73,8 +73,9 @@ namespace BLL
Update();
}
public void SetKey(string[] originalCode, Dictionary<string, string> key, bool hasMatch)
public bool SetKey(string[] originalCode, Dictionary<string, string> key, bool hasMatch,out string errmsg)
{
errmsg = "";
LogNet.log.Info("SetKey()");
for (int i = 0; i < extensions.Count; i++)
{
......@@ -84,6 +85,8 @@ namespace BLL
int index = extensions.FindIndex(match => match.Control.Name == "ctxt_PN");
if (index > -1) PNPress(extensions[index].Control, EventArgs.Empty);
return true;
}
public void Update()
......
......@@ -63,8 +63,9 @@ namespace BLL
}
}
public void SetKey(string[] originalCode, Dictionary<string, string> key, bool hasMatch)
public bool SetKey(string[] originalCode, Dictionary<string, string> key, bool hasMatch,out string errmsg)
{
errmsg = "";
for (int i = 0; i < extensions.Count; i++)
{
if (key.ContainsKey(extensions[i].Key))
......@@ -78,7 +79,7 @@ namespace BLL
if (config.AutoPrint)
PrintLabel(null, EventArgs.Empty);
return true;
}
public void Update()
......
......@@ -52,8 +52,9 @@ namespace BLL
ReadReelID();
}
static bool mesResult = false;
public void SetKey(string[] originalCode, Dictionary<string, string> key, bool hasMatch)
public bool SetKey(string[] originalCode, Dictionary<string, string> key, bool hasMatch,out string errmsg)
{
errmsg = "";
mesResult = false;
SaveAddReelID();
var now = DateTime.Now;
......@@ -86,13 +87,14 @@ namespace BLL
}
if (!mesResult)
{
return;
return false;
}
if (config.AutoPrint)
{
//if (CanPrint())
PrintLabel(null, EventArgs.Empty);
}
return true;
}
public void Update()
......
......@@ -45,8 +45,10 @@ namespace BLL
//mesConn = Http.Ping(mesIP);
}
public void SetKey(string[] originalCode, Dictionary<string, string> key, bool hasMatch)
public bool SetKey(string[] originalCode, Dictionary<string, string> key, bool hasMatch,out string errmsg)
{
errmsg = "";
return true;
//SetComboItem("CboSupplier", originalCode);
//SetComboItem("CboQuantity", originalCode);
//SetComboItem("CboBatch", originalCode);
......
......@@ -78,19 +78,15 @@ namespace BLL
}
}
public void SetKey(string[] originalCode, Dictionary<string, string> key, bool hasMatch)
public bool SetKey(string[] originalCode, Dictionary<string, string> key, bool hasMatch, out string errmsg)
{
errmsg = "";
for (int i = 0; i < extensions.Count; i++)
{
if (key.ContainsKey(extensions[i].Key))
extensions[i].Control.Text = key[extensions[i].Key];
}
//int index = extensions.FindIndex(match => match.Control.Name == "TxtSupplierPN");
//if (index == -1) return;
//PNPress(extensions[index].Control, EventArgs.Empty);
return true;
}
public void Update()
......
......@@ -13,7 +13,7 @@ namespace BLL
if (string.IsNullOrWhiteSpace(iomodule))
iom = new KND_IO(ip);
else
iom = new NirenIO(ip);
iom = new NiRenIO(ip);
iom.DI_Changed_Event += Iom_DI_Changed_Event;
}
......
using System;
using BLL;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using TcpKPIO;
namespace BLL
class NiRenIO: IO_Interface
{
public class NirenIO : IO_Interface
const int IoCount = 8;
byte station = 1;
public string IP;
TcpClient tcpClient = new TcpClient();
Thread iomonitorThread;
ushort seq = 0;
/// <summary>
///
/// </summary>
/// <param name="changindex">变化的io列表</param>
/// <param name="sta">所有IO状态</param>
public delegate void IO_Changed(List<int> changindex, bool[] sta);
public event IO_Changed DI_Changed_Event_a;
public event IO_Changed DO_Changed_Event;
/// <summary>
/// 连接状态变化, 手动连接不触发
/// </summary>
public event EventHandler<bool> ConnectionState_Event;
public NiRenIO(string ip)
{
static int diCount = 2;
this.IP = ip;
//DOdata[0] = 0x00;
//DOdata[1] = 0x00;
iomonitorThread = new Thread(new ThreadStart(iomonitor));
}
public event IOManage.DI_Changed DI_Changed_Event;
public string IP { get; set; }
public bool IsConn
~NiRenIO()
{
get
iomonitorrun = false;
Close();
}
bool systemrun = false;
/// <summary>
/// 打开IO
/// </summary>
/// <returns></returns>
public bool Open()
{
var i= 0;
while (i < 5)
tcpClient.Dispose();
tcpClient = new TcpClient();
tcpClient.ReceiveTimeout = 50;
tcpClient.SendTimeout = 50;
lock (tcpClient)
{
var isonline = KPIOServer.DeviceIsOnline(IP);
if (isonline)
try
{
var connectResult = tcpClient.ConnectAsync(IP, 12345);
if (connectResult.Wait(1000))
{
systemrun = true;
iomonitorrun = true;
iomonitorThread = new Thread(new ThreadStart(iomonitor));
iomonitorThread.Start();
ConnectionState_Event?.Invoke(this, true);
return true;
i++;
Thread.Sleep(1000);
}
return false;
else
{
tcpClient.EndConnect(connectResult);
tcpClient.Close();
return false;
}
}
catch
{
return false;
}
}
}
/// <summary>
/// 关闭IO
/// </summary>
public void Close()
{
try
{
systemrun = false;
iomonitorrun = false;
if (tcpClient.Connected)
tcpClient.Close();
}
catch { }
}
/// <summary>
/// 连接状态
/// </summary>
public bool IsConn
{
get => iomonitorrun && systemrun;
}
string IO_Interface.IP { get; set; }
public int Port { get; set; }
public NirenIO(string ip)
bool iomonitorrun = false;
/// <summary>
/// 循环读全部IO
/// </summary>
void iomonitor()
{
iomonitorrun = true;
while (iomonitorrun && systemrun)
{
Thread.Sleep(2);
try
{
ReadDO();
}
catch (SocketException)
{
IP = ip;
Port = 6000;
bool rtn = KPIOServer.StartServer(Port);
KPIOServer.DeviceDIChangeEvent += KPIOServer_DeviceDIChangeEvent;
KPIOServer.DeviceOnlineEvent += KPIOServer_DeviceOnlineEvent;
IOLogUtil.info($"开启IO模块:{rtn}");
if (tcpClient.Connected)
tcpClient.Close();
ConnectionState_Event?.Invoke(this, false);
iomonitorrun = false;
}
}
if (systemrun)
{
do
{
Thread.Sleep(1000);
} while (systemrun && !Open());
}
}
private void KPIOServer_DeviceOnlineEvent(string ip)
/// <summary>
/// 写io
/// </summary>
/// <param name="donum">地址</param>
/// <param name="state">On/Off</param>
/// <returns></returns>
public bool WriteDO(int donum, bool state)
{
IP = ip;
IOLogUtil.info($"IO模块:{IP}上线");
const string CMD_WriteDI = "AT+STACH{0}={1}\r\n";
var CMDSEND = string.Format(CMD_WriteDI, donum + 1, state ? "1": "0");
Debug.WriteLine("CMDSEND:" + CMDSEND);
var sendbyte = Encoding.ASCII.GetBytes(CMDSEND);
lock (tcpClient)
{
try
{
tcpClient.Client.Send(sendbyte);
Thread.Sleep(1);
byte[] result = new byte[100];
var ulength = tcpClient.Client.Receive(result);
if (ulength > 0) {
var recive = Encoding.ASCII.GetString(result, 0, ulength);
Debug.WriteLine("recive:" + recive);
if (recive.StartsWith("OK"))
return true;
}
private void KPIOServer_DeviceDIChangeEvent(string ip, int[] diStatus)
}
catch
{
Status[] statuses = new Status[diStatus.Length];
for (int i = 0; i < diStatus.Length; i++)
return false;
}
}
return false;
}
/// <summary>
/// 所有DI状态
/// </summary>
public bool[] DIstate = new bool[IoCount];
/// <summary>
/// 所有DO状态
/// </summary>
public bool[] DOstate = new bool[IoCount];
bool[] lastDIstate = new bool[IoCount];
bool[] lastDOstate = new bool[IoCount];
/// <summary>
/// 读全部IO
/// </summary>
void ReadDO()
{
statuses[i] = diStatus[i] == 0 ? Status.On : Status.Off;
const string CMD_ReadDI = "AT+OCCH0=?\r\n";
const string CMD_ReadD0 = "AT+STACH0=?\r\n";
const string CMD_ReadALL = CMD_ReadDI + CMD_ReadD0;
var sendbyte = Encoding.ASCII.GetBytes(CMD_ReadALL);
Debug.WriteLine("CMD_ReadALL:"+ sendbyte);
var resultbuffer = new byte[2048];
int ulength = 0;
lock (tcpClient)
{
try
{
tcpClient.Client.Send(sendbyte);
Thread.Sleep(1);
ulength = tcpClient.Client.Receive(resultbuffer);
}
catch (SocketException se)
{
throw se;
}
DI_Changed_Event?.Invoke(statuses);
}
if (ulength == 0) {
return;
}
var recive = Encoding.ASCII.GetString(resultbuffer, 0, ulength);
Debug.WriteLine("recive:"+ recive);
var datas = recive.Split(new char[] { '\r', '\n' });
/*
+STACH1:0,100000
+STACH2:0,100000
+OCCH1:0
+OCCH2:0
*/
foreach (var data in datas) {
if (!data.StartsWith("+"))
continue;
public void Close()
if (data.StartsWith("+STACH"))
{
KPIOServer.StopServer();
var ds = data.Split(':');
var d = ds[0].Substring(6);
if (!int.TryParse(d, out int doindex))
continue;
doindex = doindex - 1;
var sta = ds[1].StartsWith("1") ? true : false;
DOstate[doindex] = sta;
}
else if (data.StartsWith("+OCCH"))
{
var ds = data.Split(':');
var d = ds[0].Substring(5);
if (!int.TryParse(d, out int doindex))
continue;
doindex = doindex - 1;
var sta = ds[1].StartsWith("1") ? true : false;
DIstate[doindex] = sta;
}
}
for (int i = 0; i < IoCount; i++)
{
List<int> dichgindex = new List<int>();
List<int> dochgindex = new List<int>();
if (lastDIstate[i] != DIstate[i])
{
dichgindex.Add(i);
lastDIstate[i] = DIstate[i];
}
if (lastDOstate[i] != DOstate[i])
{
dochgindex.Add(i);
lastDOstate[i] = DOstate[i];
}
if (dichgindex.Count > 0)
{
DI_Changed_Event_a?.BeginInvoke(dichgindex, DIstate, null, null);
var statuses =DIstate.Select(d => { return d ? Status.On : Status.Off; }).ToArray();
DI_Changed_Event?.BeginInvoke(statuses, null, null);
}
if (dochgindex.Count > 0)
DO_Changed_Event?.BeginInvoke(dochgindex, DOstate, null, null);
}
}
void seqadd()
{
seq++;
if (seq >= ushort.MaxValue - 10)
seq = 0;
}
public bool Connect()
{
//throw new NotImplementedException();
return true;
return Open();
}
public bool ReadDI(Addr add, out Status sta)
......@@ -80,8 +302,8 @@ namespace BLL
try
{
int index = ((int)add) - 10200;
var onoff = KPIOServer.GetDI(IP, index);
sta = onoff == 0 ? Status.Off : Status.On;
var onoff = DIstate[index];
sta = onoff? Status.On : Status.Off;
return true;
}
catch
......@@ -92,13 +314,12 @@ namespace BLL
public bool ReadDO(Addr add, out Status sta)
{
sta = KPIOServer.GetDO(IP, (int)add - 100) == 0 ? Status.Off : Status.On;
sta = DOstate[(int)add - 100]? Status.On : Status.Off;
return true;
}
public bool WriteDO(int add, Status sta)
{
return KPIOServer.WriteDO(IP, add, sta== Status.On ?1:0);
}
return WriteDO(add, sta == Status.On);
}
}
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 NirenIO1 : 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;
KPIOServer.DeviceOnlineEvent += KPIOServer_DeviceOnlineEvent;
IOLogUtil.info($"开启IO模块:{rtn}");
}
private void KPIOServer_DeviceOnlineEvent(string ip)
{
IP = ip;
IOLogUtil.info($"IO模块:{IP}上线");
}
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);
}
}
}
......@@ -289,6 +289,12 @@
</summary>
<returns></returns>
</member>
<member name="M:Asa.Camera.VisionLib.GetImage(System.Int32)">
<summary>
按索引获取当前图像
</summary>
<returns></returns>
</member>
<member name="M:Asa.Camera.VisionLib.GetImage(System.String)">
<summary>
获取当前图像
......
625a16d94e24a12228b3782465bd026b987271aa
1cd8754b4a550d036fb6e1554e1bec03b87aa454
......@@ -96,3 +96,13 @@ 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
D:\rick\vs\SmartScan\BLL\bin\Debug\ConfigHelper.dll
D:\rick\vs\SmartScan\BLL\bin\Debug\ConfigHelper.pdb
D:\rick\vs\SmartScan\BLL\bin\Debug\ConfigHelper.xml
D:\rick\vs\SmartScan\BLL\bin\Debug\ClosedXML.dll
D:\rick\vs\SmartScan\BLL\bin\Debug\DocumentFormat.OpenXml.dll
D:\rick\vs\SmartScan\BLL\bin\Debug\ExcelNumberFormat.dll
D:\rick\vs\SmartScan\BLL\bin\Debug\ClosedXML.pdb
D:\rick\vs\SmartScan\BLL\bin\Debug\ClosedXML.xml
D:\rick\vs\SmartScan\BLL\bin\Debug\DocumentFormat.OpenXml.xml
D:\rick\vs\SmartScan\BLL\bin\Debug\ExcelNumberFormat.xml
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ClosedXML" version="0.96.0" targetFramework="net472" />
<package id="DocumentFormat.OpenXml" version="2.16.0" targetFramework="net472" />
<package id="ExcelNumberFormat" version="1.1.0" targetFramework="net472" />
<package id="log4net" version="2.0.12" targetFramework="net461" />
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net472" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net461" />
<package id="ZXing.Net" version="0.16.6" targetFramework="net461" requireReinstallation="true" />
</packages>
\ No newline at end of file
......@@ -68,3 +68,10 @@ D:\rick\vs\SmartScan\DAL\obj\Debug\DAL.dll
D:\rick\vs\SmartScan\DAL\obj\Debug\DAL.pdb
D:\rick\vs\SmartScan\DAL\bin\Debug\Newtonsoft.Json.dll
D:\rick\vs\SmartScan\DAL\bin\Debug\Newtonsoft.Json.xml
D:\rick\vs\SmartScan\DAL\bin\Debug\Asa.Camera.VisionLib.dll
D:\rick\vs\SmartScan\DAL\bin\Debug\Basler.Pylon.dll
D:\rick\vs\SmartScan\DAL\bin\Debug\MvCameraControl.Net.dll
D:\rick\vs\SmartScan\DAL\bin\Debug\halcondotnet.dll
D:\rick\vs\SmartScan\DAL\bin\Debug\Asa.Camera.VisionLib.pdb
D:\rick\vs\SmartScan\DAL\bin\Debug\Asa.Camera.VisionLib.xml
D:\rick\vs\SmartScan\DAL\bin\Debug\MvCameraControl.Net.xml
......@@ -14,8 +14,7 @@ namespace Model
public void Load(List<ExtensionControl> extensions);
public void SetKey(string[] originalCode, Dictionary<string, string> key,bool hasMatch);
public bool SetKey(string[] originalCode, Dictionary<string, string> key,bool hasMatch, out string errmsg);
public void Update();
public void Dispose();
......
......@@ -2,6 +2,8 @@
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Runtime.Serialization;
using System.Collections.Generic;
using CameraVisionLib.Model;
namespace Model
{
......@@ -20,6 +22,10 @@ namespace Model
[WebInvoke(Method = "POST", UriTemplate = "SmartScan/WorkWithCode", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
WebResultCode WorkWithCode(Stream json);
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "SmartScan/ProcessBitmap?param={param}", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
WebResultCode ProcessBitmap(Stream info, string param);
}
[DataContract]
......@@ -48,6 +54,10 @@ namespace Model
public string Msg { get; set; }
[DataMember]
public WebCodeText[] Data { get; set; }
[DataMember]
public List<KeyValuePair<string, string>> workCodeKeyword;
[DataMember]
public List<BarcodeInfo> workCodeInfo = new List<BarcodeInfo>();
public WebResultCode()
{
......
......@@ -38,6 +38,9 @@
<LangVersion>preview</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Asa.Camera.VisionLib">
<HintPath>..\..\Camera\CameraVisionLib\bin\Debug\Asa.Camera.VisionLib.dll</HintPath>
</Reference>
<Reference Include="Asa.Face.Control, Version=1.0.7916.18557, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\FaceControl\FaceControl\bin\Debug\Asa.Face.Control.dll</HintPath>
......
01b2d5ca38927b2b61ed6a650f31468a3ffe0e0d
8bca2b2a5d358a7826d322738ed7a7f167128baf
......@@ -47,7 +47,6 @@ D:\rick\vs\SmartScan\Model\bin\Debug\Tesseract.dll
D:\rick\vs\SmartScan\Model\bin\Debug\Asa.Face.Control.pdb
D:\rick\vs\SmartScan\Model\bin\Debug\log4net.xml
D:\rick\vs\SmartScan\Model\bin\Debug\RestSharp.xml
D:\rick\vs\SmartScan\Model\obj\Debug\Model.csproj.AssemblyReference.cache
D:\rick\vs\SmartScan\Model\obj\Debug\Model.csproj.CoreCompileInputs.cache
D:\rick\vs\SmartScan\Model\obj\Debug\Model.csproj.CopyComplete
D:\rick\vs\SmartScan\Model\obj\Debug\Model.dll
......@@ -55,3 +54,10 @@ D:\rick\vs\SmartScan\Model\obj\Debug\Model.pdb
D:\rick\vs\SmartScan\Model\bin\Debug\Asa.Face.Control.dll
D:\rick\vs\SmartScan\Model\bin\Debug\Newtonsoft.Json.dll
D:\rick\vs\SmartScan\Model\bin\Debug\Newtonsoft.Json.xml
D:\rick\vs\SmartScan\Model\bin\Debug\Asa.Camera.VisionLib.dll
D:\rick\vs\SmartScan\Model\bin\Debug\Basler.Pylon.dll
D:\rick\vs\SmartScan\Model\bin\Debug\MvCameraControl.Net.dll
D:\rick\vs\SmartScan\Model\bin\Debug\halcondotnet.dll
D:\rick\vs\SmartScan\Model\bin\Debug\Asa.Camera.VisionLib.pdb
D:\rick\vs\SmartScan\Model\bin\Debug\Asa.Camera.VisionLib.xml
D:\rick\vs\SmartScan\Model\bin\Debug\MvCameraControl.Net.xml
......@@ -4,6 +4,16 @@
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>
<appSettings>
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true"/>
</appSettings>
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding maxReceivedMessageSize="90000000" maxBufferPoolSize="90000000" maxBufferSize="90000000" closeTimeout="00:03:00" openTimeout="00:03:00" receiveTimeout="00:01:00" sendTimeout="00:01:00">
<readerQuotas maxStringContentLength="90000000" maxArrayLength="90000000" maxBytesPerRead="90000000" />
<security mode="None"/>
</binding>
</webHttpBinding>
</bindings>
</system.serviceModel>
</configuration>
......@@ -19,6 +19,7 @@ namespace SmartScan
public static ServerCommunication SCMM;
public static List<string> macroKey;
public static List<string> extraKey=new List<string>();
public static int mateMaxCodeID;
public static readonly string[] CODE_SPLIT = new string[] { ",", ";", "@", "#", "$", "%", "&", "-", "_", "+", "|", "!", "^", "*", "?", "/", "\\", "[Space]", "[Tab]" };
......
using BLL;
using ClosedXML.Excel;
using Model;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SmartScan
{
public class ExtraFileData
{
static Dictionary<string, Dictionary<string, string>> AllData = new Dictionary<string, Dictionary<string, string>>();
public static void Init() {
var ext = Path.GetExtension(Config.DataSource_String);
if (string.IsNullOrEmpty(ext))
{
return;
}
ext = ext.ToLower();
AllData.Clear();
if (ext == ".xlsx")
LoadXLSALlData();
else if (ext == ".csv")
LoadCSVALlData();
}
public static void LoadCSVALlData()
{
LogNet.log.Info("数据源:" + Config.DataSource_String);
if (!File.Exists(Config.DataSource_String))
{
throw new FileNotFoundException(Config.DataSource_String);
}
var titles = ParseCSVFileTitle(Config.DataSource_String);
Common.extraKey = titles;
string[] files;
if (Config.DataSource_Recursive)
{
var ext = Path.GetExtension(Config.DataSource_String);
var path = Path.GetDirectoryName(Config.DataSource_String);
files=Directory.GetFiles(path, "*" + ext);
}
else
{
files = new string[] { Config.DataSource_String };
}
foreach (var file in files)
{
LogNet.log.Info("数据源加载文件:"+file);
try
{
using var sm = new StreamReader(file, Encoding.GetEncoding(Config.DataSource_Encoding));
while (true)
{
var dataline = sm.ReadLine();
if (string.IsNullOrWhiteSpace(dataline))
break;
var datas = dataline.Split(',');
if (datas.Length < titles.Count)
continue;
string keydata = "";
var rowdata = new Dictionary<string, string>();
for (int i = 0; i < titles.Count; i++)
{
rowdata.Add(titles[i], datas[i]);
if (titles[i] == Config.DataSource_DataTitle)
{
keydata = datas[i];
}
}
if (!string.IsNullOrEmpty(keydata) && !AllData.ContainsKey(keydata))
AllData.Add(keydata, rowdata);
}
}
catch(Exception ex) {
LogNet.log.Info("数据源加载文件出错:" + ex.ToString());
}
}
}
public static List<string> ParseCSVFileTitle(string filename)
{
using var sm = new StreamReader(filename, Encoding.GetEncoding(Config.DataSource_Encoding.Val));
var titleline = sm.ReadLine();
var titles = new List<string>(titleline.Split(','));
return titles;
}
public static void LoadXLSALlData() {
if (!File.Exists(Config.DataSource_String)) {
throw new FileNotFoundException(Config.DataSource_String);
}
var titles = ParseXLSFileTitle(Config.DataSource_String);
Common.extraKey = titles;
string[] files;
if (Config.DataSource_Recursive)
{
var ext = Path.GetExtension(Config.DataSource_String);
var path = Path.GetDirectoryName(Config.DataSource_String);
files = Directory.GetFiles(path, "*" + ext);
}
else
{
files = new string[] { Config.DataSource_String };
}
foreach (var file in files)
{
LogNet.log.Info("数据源加载文件:" + file);
try
{
XLWorkbook wb = new XLWorkbook(file);
IXLWorksheet ws = wb.Worksheet(1);
int emptyrow = 0;
int currow = 0;
while (emptyrow < 3)
{
string keydata = "";
var rowdata = new Dictionary<string, string>();
for (int i = 0; i < titles.Count; i++)
{
var v = ws.Row(currow + 1).Cell(i + 1).Value.ToString().Trim();
rowdata.Add(titles[i], v);
if (titles[i] == Config.DataSource_DataTitle)
{
keydata = v;
if (string.IsNullOrWhiteSpace(v))
emptyrow++;
}
}
if (!string.IsNullOrEmpty(keydata) && !AllData.ContainsKey(keydata))
AllData.Add(keydata, rowdata);
currow++;
}
}
catch (Exception ex)
{
LogNet.log.Info("数据源加载文件出错:" + ex.ToString());
}
}
}
public static List<string> ParseXLSFileTitle(string filename)
{
List<string> titles = new List<string>();
int emptycolcount = 0;
XLWorkbook wb = new XLWorkbook(filename);
IXLWorksheet ws = wb.Worksheet(1);
for (int i = 1; i < 50; i++)
{
var v = ws.Row(1).Cell(i).Value.ToString().Trim();
if (string.IsNullOrEmpty(v))
{
emptycolcount++;
if (emptycolcount > 3)
{
break;
}
}
if (!string.IsNullOrEmpty(v))
{
titles.Add(v);
}
}
return titles;
}
public static Encoding GetEncoding(string coding) {
try
{
return Encoding.GetEncoding(coding);
}
catch {
return Encoding.UTF8;
}
}
}
}
......@@ -17,6 +17,13 @@ namespace SmartScan
InitializeComponent();
faceTextBox1.Text = content;
faceListBox1.Items.AddRange(Common.macroKey.ToArray());
Common.extraKey.ForEach(x =>
{
var has = Common.macroKey.Find(a => a == x);
if (string.IsNullOrEmpty(has))
faceListBox1.Items.Add(x);
});
}
public string Content { get; private set; }
......
......@@ -21,10 +21,10 @@ namespace SmartScan
LogNet.log = log4net.LogManager.GetLogger("SmartScan");
LogNet.log.Info($"===== 程序开始 {version} =====");
Common.config = new();
Common.config = new BLL.Config();
Common.config.SoftVersion = version;
Common.config.Backgrounder = back;
ExtraFileData.Init();
Asa.FaceControl.Language.LoadPath(FilePath.LANGUAGE_DIR);
LogNet.log.Debug("加载语言文件夹:" + FilePath.LANGUAGE_DIR);
Asa.FaceControl.Language.LoadLanguage(Common.config.Language);
......
......@@ -180,7 +180,6 @@ namespace SmartScan
foreach (string key in content.Keys)
str += string.Format("({0}:{1})", key, content[key]);
LogNet.log.Info(str);
//Common.SCMM.SendData(content);
//Bitmap labelBmp = Common.labelEdit.PrintImage(Common.config.DefaultPrintLabel, content, out _);
Common.labelEdit.PrintLast(Common.config.DefaultPrintLabel, Common.config.PrinterName, Common.config.PrintLandscape, content, out string[] barcode);
LogNet.log.Info(string.Format("打印标签 Label[{0}] Printer[{1}]", Common.config.DefaultPrintLabel, Common.config.PrinterName));
......@@ -216,6 +215,8 @@ namespace SmartScan
scanWork = new();
LblVersion.Text = Common.config.SoftVersion;
LblUserName.Text = Common.config.UserName;
if (LblUserName.Text == "None user")
LblUserName.Visible = false;
BtnSet.Enabled = Common.config.UserLevel == UserLevel.Admin;
//扩展面板
......@@ -231,7 +232,7 @@ namespace SmartScan
CboLanguage.SelectedText = Common.config.Language;
if (Common.config.OpenMaximize) Maximize();
BtnTriggerIO.Enabled = false;
if (CheckCamera() && CheckIOModule())
{
......
......@@ -38,6 +38,7 @@ namespace SmartScan
this.BtnCancel = new Asa.FaceControl.FaceButton();
this.PnlTemp = new Asa.FaceControl.FacePanel();
this.BtnApply = new Asa.FaceControl.FaceButton();
this.BtnDataSource = new Asa.FaceControl.FaceButton();
this.SuspendLayout();
//
// BtnWorkMode
......@@ -181,6 +182,21 @@ namespace SmartScan
this.BtnApply.Text = "Apply";
this.BtnApply.Click += new System.EventHandler(this.BtnApply_Click);
//
// BtnDataSource
//
this.BtnDataSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.BtnDataSource.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.BtnDataSource.BorderWidth = 2;
this.BtnDataSource.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnDataSource.HoldPress = false;
this.BtnDataSource.Location = new System.Drawing.Point(11, 335);
this.BtnDataSource.Name = "BtnDataSource";
this.BtnDataSource.Padding = new System.Windows.Forms.Padding(3);
this.BtnDataSource.Size = new System.Drawing.Size(160, 50);
this.BtnDataSource.TabIndex = 7;
this.BtnDataSource.Text = "数据源";
this.BtnDataSource.Click += new System.EventHandler(this.BtnMenu_Click);
//
// FrmSet
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
......@@ -189,6 +205,7 @@ namespace SmartScan
this.Controls.Add(this.PnlTemp);
this.Controls.Add(this.BtnCancel);
this.Controls.Add(this.BtnOK);
this.Controls.Add(this.BtnDataSource);
this.Controls.Add(this.BtnKeyword);
this.Controls.Add(this.BtnMaterial);
this.Controls.Add(this.BtnLabel);
......@@ -203,6 +220,7 @@ namespace SmartScan
this.Controls.SetChildIndex(this.BtnLabel, 0);
this.Controls.SetChildIndex(this.BtnMaterial, 0);
this.Controls.SetChildIndex(this.BtnKeyword, 0);
this.Controls.SetChildIndex(this.BtnDataSource, 0);
this.Controls.SetChildIndex(this.BtnOK, 0);
this.Controls.SetChildIndex(this.BtnCancel, 0);
this.Controls.SetChildIndex(this.PnlTemp, 0);
......@@ -222,5 +240,6 @@ namespace SmartScan
private Asa.FaceControl.FaceButton BtnCancel;
private Asa.FaceControl.FacePanel PnlTemp;
private Asa.FaceControl.FaceButton BtnApply;
private Asa.FaceControl.FaceButton BtnDataSource;
}
}
\ No newline at end of file
......@@ -26,6 +26,7 @@ namespace SmartScan
menu.Add(BtnLabel, new UsrPrintTemplate());
menu.Add(BtnMaterial, new UsrMaterialTemplate());
menu.Add(BtnKeyword, new UsrMacro());
menu.Add(BtnDataSource, new UsrDataSource());
foreach (FaceButton button in menu.Keys)
{
......
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using Asa.FaceControl;
using System.Windows.Forms;
namespace SmartScan
{
public partial class FrmSetPlus : FaceFormNormal
{
private readonly Dictionary<FaceButton, Model.ISetMenu> menu = new();
public FrmSetPlus()
{
InitializeComponent();
Language.SetLanguage(this);
}
private void FrmSet_Load(object sender, EventArgs e)
{
foreach (FaceButton button in menu.Keys)
{
Controls.Remove(menu[button].GetPanel());
}
menu.Clear();
menu.Add(BtnLabel, new UsrPrintTemplate());
menu.Add(BtnMaterial, new UsrMaterialTemplate());
menu.Add(BtnKeyword, new UsrMacro());
menu.Add(BtnLabeling, new UsrLabeling());
foreach (FaceButton button in menu.Keys)
{
FacePanel pnl = menu[button].GetPanel();
pnl.Left = PnlTemp.Left;
pnl.Top = PnlTemp.Top;
pnl.Width = PnlTemp.Width;
pnl.Height = PnlTemp.Height;
pnl.Anchor = PnlTemp.Anchor;
pnl.Visible = false;
Controls.Add(pnl);
}
BtnMaterial.HoldPress = true;
menu[BtnMaterial].GetPanel().Visible = true;
//语言
CboLanguage.Items.Clear();
CboLanguage.Items.AddRange(Language.Name);
CboLanguage.SelectedText = Common.config.Language;
}
private void BtnMenu_Click(object sender, EventArgs e)
{
foreach (FaceButton button in menu.Keys)
{
bool rtn = button == sender;
button.HoldPress = rtn;
menu[button].GetPanel().Visible = rtn;
}
}
private void BtnUnlock_Click(object sender, EventArgs e)
{
//if (BtnUnlock.HoldPress)
//{
// BtnUnlock.HoldPress = false;
//}
//else
//{
// DialogResult dr = new FrmUnlock().ShowDialog();
// if (dr == DialogResult.OK)
// BtnUnlock.HoldPress = true;
// else
// return;
//}
//foreach (FaceButton button in menu.Keys)
// menu[button].SetUnlock(BtnUnlock.HoldPress);
}
private void BtnOK_Click(object sender, EventArgs e)
{
foreach (FaceButton button in menu.Keys)
menu[button].Save();
string text = Language.Dialog(Model.LanguageDialogKey.SAVE_SUCCEED);
new FaceMessageBox("", text, MessageBoxButtons.OK).ShowDialog();
Common.extension.Update();
DialogResult = DialogResult.OK;
}
private void BtnCancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
}
private void BtnApply_Click(object sender, EventArgs e)
{
foreach (FaceButton button in menu.Keys)
menu[button].Save();
string text = Language.Dialog(Model.LanguageDialogKey.SAVE_SUCCEED);
new FaceMessageBox("", text, MessageBoxButtons.OK).ShowDialog();
Common.extension.Update();
}
private void CboLanguage_SelectedIndexChanged(object sender, EventArgs e)
{
if (Common.config.Language != CboLanguage.Text)
{
Language.LoadLanguage(CboLanguage.Text);
Common.config.Language = CboLanguage.Text;
Common.config.Save();
FrmSet_Load(this, EventArgs.Empty);
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file

namespace SmartScan
{
partial class UsrLabeling
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.facePanel1 = new Asa.FaceControl.FacePanel();
this.SuspendLayout();
//
// facePanel1
//
this.facePanel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.facePanel1.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.facePanel1.BorderWidth = 2;
this.facePanel1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.facePanel1.Location = new System.Drawing.Point(14, 49);
this.facePanel1.Name = "facePanel1";
this.facePanel1.Padding = new System.Windows.Forms.Padding(3);
this.facePanel1.ShowText = false;
this.facePanel1.Size = new System.Drawing.Size(634, 392);
this.facePanel1.TabIndex = 2;
this.facePanel1.Text = "facePanel1";
this.facePanel1.TitleFont = new System.Drawing.Font("宋体", 12F);
//
// UsrLabeling
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.facePanel1);
this.Name = "UsrLabeling";
this.Size = new System.Drawing.Size(662, 491);
this.ResumeLayout(false);
}
#endregion
private Asa.FaceControl.FacePanel facePanel1;
}
}
using Asa.FaceControl;
using Model;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace SmartScan
{
public partial class UsrLabeling : UserControl, ISetMenu
{
public UsrLabeling()
{
InitializeComponent();
}
public FacePanel GetPanel()
{
//throw new NotImplementedException();
return facePanel1;
}
public void Save()
{
//throw new NotImplementedException();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
......@@ -16,8 +16,6 @@ namespace SmartScan
{
Environment.CurrentDirectory = Application.StartupPath;
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
Application.ThreadException += Application_ThreadException;
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
......@@ -27,17 +25,32 @@ namespace SmartScan
bool back = false;
if (args.Length > 0)
back = args[0].ToLower() == "background";
back = args[0].ToLower() == "background" || args[0].ToLower() == "plussetting";
var onnxexe = "onnx\\OcrLiteOnnxForm.exe";
Process.Start(onnxexe);
Application.Run(new FrmLoading(back)); //预加载,完成后自动退出
if (args.Length > 0 && args[0].ToLower() == "plussetting")
{
Application.Run(new FrmSetPlus());
}
else
{
Common.frmMain = new FrmMain();
Common.frmWaitting = new FrmWaitting();
if (back)
{
Common.frmMain.WindowState = FormWindowState.Minimized;
Common.frmWaitting.WindowState = FormWindowState.Minimized;
}
Application.Run(Common.frmMain);
}
Exit();
}
......
......@@ -31,8 +31,10 @@ namespace SmartScan
{
isRun = true;
isTouch = false;
Common.frmMain.Controls["BtnSet"].Enabled = false;
Common.frmMain.Controls["BtnTriggerIO"].Enabled = true;
Common.frmMain.Controls["BtnSet"].Visible = false;
Common.frmMain.Controls["BtnRetrospect"].Visible = false;
Common.frmMain.Controls["BtnAbout"].Visible = false;
Common.frmMain.Controls["BtnTriggerIO"].Visible = true;
LogNet.log.Info("Work Start");
if (Common.config.EnabledCamera)
......@@ -47,8 +49,10 @@ namespace SmartScan
public void Close()
{
isRun = false;
Common.frmMain.Controls["BtnSet"].Enabled = true;
Common.frmMain.Controls["BtnTriggerIO"].Enabled = false;
Common.frmMain.Controls["BtnSet"].Visible = true;
Common.frmMain.Controls["BtnRetrospect"].Visible = true;
Common.frmMain.Controls["BtnAbout"].Visible = true;
Common.frmMain.Controls["BtnTriggerIO"].Visible = false;
LogNet.log.Info("Work Stop");
if (Common.config.EnabledCamera)
......@@ -311,7 +315,7 @@ namespace SmartScan
private void SetKey(bool hasMatch)
{
LogNet.log.Info("Work SetKey hasMatch:"+ hasMatch);
Common.extension.SetKey(originalCodeText, workCodeKeyword, hasMatch);
Common.extension.SetKey(originalCodeText, workCodeKeyword, hasMatch,out _);
if (workCodeKeyword.Count == 0) return;
if (Common.config.PromptAfterPrinting && !Common.config.Backgrounder)
......
......@@ -122,6 +122,8 @@ namespace SmartScan
}
public void SendStatus()
{
if (!server.ToLower().StartsWith("http"))
return;
lock (serverclock)
{
DateTime time = DateTime.Now;
......

namespace SmartScan
{
partial class FrmDataFilePreview
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.BtnOK = new Asa.FaceControl.FaceButton();
this.CboEncoding = new Asa.FaceControl.FaceComboBox();
this.BtnCancel = new Asa.FaceControl.FaceButton();
this.LblEncoding = new Asa.FaceControl.FaceLabel();
this.txtPreview = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// BtnOK
//
this.BtnOK.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.BtnOK.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.BtnOK.BorderWidth = 2;
this.BtnOK.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnOK.HoldPress = false;
this.BtnOK.Location = new System.Drawing.Point(499, 394);
this.BtnOK.Name = "BtnOK";
this.BtnOK.Padding = new System.Windows.Forms.Padding(3);
this.BtnOK.Size = new System.Drawing.Size(151, 45);
this.BtnOK.TabIndex = 3;
this.BtnOK.Text = "确认";
this.BtnOK.Click += new System.EventHandler(this.BtnOK_Click);
//
// CboEncoding
//
this.CboEncoding.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.CboEncoding.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.CboEncoding.BorderWidth = 2;
this.CboEncoding.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.CboEncoding.Location = new System.Drawing.Point(499, 37);
this.CboEncoding.Name = "CboEncoding";
this.CboEncoding.Padding = new System.Windows.Forms.Padding(3);
this.CboEncoding.SelectedIndex = -1;
this.CboEncoding.SelectedText = "";
this.CboEncoding.Size = new System.Drawing.Size(150, 45);
this.CboEncoding.TabIndex = 2;
this.CboEncoding.SelectedIndexChanged += new System.EventHandler(this.CboEncoding_SelectedIndexChanged);
//
// BtnCancel
//
this.BtnCancel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.BtnCancel.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.BtnCancel.BorderWidth = 2;
this.BtnCancel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnCancel.HoldPress = false;
this.BtnCancel.Location = new System.Drawing.Point(11, 394);
this.BtnCancel.Name = "BtnCancel";
this.BtnCancel.Padding = new System.Windows.Forms.Padding(3);
this.BtnCancel.Size = new System.Drawing.Size(151, 45);
this.BtnCancel.TabIndex = 3;
this.BtnCancel.Text = "取消";
this.BtnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
//
// LblEncoding
//
this.LblEncoding.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.LblEncoding.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.LblEncoding.BorderWidth = 0;
this.LblEncoding.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblEncoding.Location = new System.Drawing.Point(354, 44);
this.LblEncoding.Name = "LblEncoding";
this.LblEncoding.Padding = new System.Windows.Forms.Padding(3);
this.LblEncoding.Size = new System.Drawing.Size(139, 35);
this.LblEncoding.TabIndex = 22;
this.LblEncoding.Text = "编码格式";
this.LblEncoding.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtPreview
//
this.txtPreview.BackColor = System.Drawing.Color.DimGray;
this.txtPreview.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtPreview.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtPreview.ForeColor = System.Drawing.Color.White;
this.txtPreview.Location = new System.Drawing.Point(11, 88);
this.txtPreview.Multiline = true;
this.txtPreview.Name = "txtPreview";
this.txtPreview.ReadOnly = true;
this.txtPreview.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.txtPreview.Size = new System.Drawing.Size(639, 291);
this.txtPreview.TabIndex = 23;
//
// FrmDataFilePreview
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(661, 450);
this.Controls.Add(this.txtPreview);
this.Controls.Add(this.LblEncoding);
this.Controls.Add(this.BtnCancel);
this.Controls.Add(this.BtnOK);
this.Controls.Add(this.CboEncoding);
this.Icon = global::SmartScan.Properties.Resources.NEO_64;
this.Location = new System.Drawing.Point(0, 0);
this.Name = "FrmDataFilePreview";
this.Text = "文件预览";
this.Load += new System.EventHandler(this.FrmDataFilePreview_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private Asa.FaceControl.FaceButton BtnOK;
private Asa.FaceControl.FaceComboBox CboEncoding;
private Asa.FaceControl.FaceButton BtnCancel;
private Asa.FaceControl.FaceLabel LblEncoding;
private System.Windows.Forms.TextBox txtPreview;
}
}
\ No newline at end of file
using BLL;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace SmartScan
{
public partial class FrmDataFilePreview : Asa.FaceControl.FormBase
{
public FrmDataFilePreview()
{
InitializeComponent();
}
public static bool ShowPreview(string filename,out string Encodingtxt) {
FrmDataFilePreview frmDataFile = new FrmDataFilePreview();
frmDataFile.Filename = filename;
Encodingtxt = frmDataFile.EncodingTxt;
if (frmDataFile.ShowDialog() != DialogResult.OK)
return false;
Encodingtxt = frmDataFile.EncodingTxt;
return true;
}
private void CboEncoding_SelectedIndexChanged(object sender, EventArgs e)
{
EncodingTxt = CboEncoding.SelectedText;
loadfile();
}
public string Filename;
public string EncodingTxt;
private void FrmDataFilePreview_Load(object sender, EventArgs e)
{
CboEncoding.Items.Add("UTF-8");
CboEncoding.Items.Add("Shift_JIS");
CboEncoding.Items.Add("EUC-JP");
CboEncoding.Items.Add("GB2312");
CboEncoding.Items.Add("GBK");
CboEncoding.SelectedIndex = 0;
if (!string.IsNullOrEmpty(Config.DataSource_Encoding))
{
CboEncoding.SelectedText = Config.DataSource_Encoding;
}
loadfile();
}
void loadfile() {
txtPreview.Text = "";
using var sm = new StreamReader(Filename, ExtraFileData.GetEncoding(EncodingTxt));
for (int i = 0; i < 10; i++)
{
var titleline = sm.ReadLine();
if (titleline == null)
break;
txtPreview.Text += titleline + "\r\n";
}
}
private void BtnOK_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
this.Close();
}
private void BtnCancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
this.Close();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
......@@ -14,7 +14,7 @@ namespace SmartScan
{
InitializeComponent();
Asa.FaceControl.Language.SetLanguage(this);
BtnCameraImage.Enabled = Common.cameraVision.Count > 0;
BtnCameraImage.Enabled = Common.cameraVision==null?false:Common.cameraVision.Count > 0;
}
public Asa.FaceControl.FacePanel GetPanel()
......
using System;
using System.Collections.Generic;
using System.IO;
using System.Windows.Forms;
using Asa.FaceControl;
using BLL;
using ClosedXML.Excel;
using Model;
namespace SmartScan
{
public partial class UsrDataSource : UserControl, ISetMenu
{
public UsrDataSource()
{
InitializeComponent();
CboDataType.Items.Add("None");
CboDataType.Items.Add("Excel/CSV");
CboDataType.SelectedIndex = 0;
TxtDataSource.TextChanged += TxtDataSource_TextChanged;
TxtDataSource.Text = Config.DataSource_String;
ChkRecursive.Checked= Config.DataSource_Recursive;
Asa.FaceControl.Language.SetLanguage(this);
}
private void TxtDataSource_TextChanged(object sender, EventArgs e)
{
var filestring = TxtDataSource.Text.Trim();
if (string.IsNullOrEmpty(filestring)) {
LblFilestatus.Text = Language.Dialog("selectdatasource","请选择数据文件");
}
if (!File.Exists(filestring))
{
LblFilestatus.Text = Language.Dialog("filenotexists", "文件状态:改文件不存在");
}
List<string> titles;
if (Path.GetExtension(TxtDataSource.Text).ToLower() == ".csv")
{
titles = ExtraFileData.ParseCSVFileTitle(TxtDataSource.Text);
}
else if (Path.GetExtension(TxtDataSource.Text).ToLower() == ".xlsx")
{
try
{
XLWorkbook wb = new XLWorkbook(filestring);
}
catch
{
LblFilestatus.Text = Language.Dialog("filepatseerror", "文件内容解析失败");
return;
}
titles = ExtraFileData.ParseXLSFileTitle(TxtDataSource.Text);
}
else
{
LblFilestatus.Text = Language.Dialog("fileformaterror", "文件格式不正确");
return;
}
txtkey.Text = "";
CboDataTitle.Items.Clear();
titles.ForEach(t => {
CboDataTitle.Items.Add(t);
txtkey.Text += $"{{{t}}}\r\n";
});
if (CboDataTitle.Items.Count > 0)
CboDataTitle.SelectedIndex = 0;
if (!string.IsNullOrEmpty(Config.DataSource_DataTitle))
{
CboDataTitle.SelectedText = Config.DataSource_DataTitle;
}
}
public Asa.FaceControl.FacePanel GetPanel()
{
if (Config.DataSource_Type == "xls")
{
CboDataType.SelectedIndex = 1;
}
else {
}
CboDataKey.Items.Clear();
CboDataKey.Items.AddRange(Common.macroKey.ToArray());
CboDataKey.SelectedIndex = 0;
if (!string.IsNullOrEmpty(Config.DataSource_DataKey))
{
CboDataKey.SelectedText = Config.DataSource_DataKey;
}
TxtDataSource.Text = Config.DataSource_String;
return facePanel1;
}
public void Save()
{
if (CboDataType.SelectedIndex == 1)
Config.DataSource_Type = "xls";
else
Config.DataSource_Type = "none";
Config.DataSource_String = TxtDataSource.Text;
Config.DataSource_DataKey = CboDataKey.Text;
Config.DataSource_DataTitle = CboDataTitle.Text;
Config.DataSource_Recursive = ChkRecursive.Checked;
ExtraFileData.Init();
}
private void BtnSelectFile_Click(object sender, EventArgs e)
{
OpenFileDialog fileDialog = new OpenFileDialog();
fileDialog.Filter = "Excel files (*.csv;*.xlsx)|*.csv;*.xlsx";
fileDialog.RestoreDirectory = true;
if (fileDialog.ShowDialog() != DialogResult.OK)
return;
if (Path.GetExtension(fileDialog.FileName).ToLower() == ".csv")
{
if (!FrmDataFilePreview.ShowPreview(fileDialog.FileName, out string encodingtxt))
return;
Config.DataSource_Encoding = encodingtxt;
}
TxtDataSource.Text = fileDialog.FileName;
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
......@@ -20,6 +20,7 @@ namespace SmartScan
TxtPostfix.Text = Common.config.ReelIDPostfix;
NumReelIDPlaces.Value = Common.config.ReelIDPlaces;
ChkReelIDFillZero.Checked = Common.config.ReelIDFillZero;
ChkResetidbydate.Checked = Common.config.ReelIDAutoResetByDate;
Asa.FaceControl.Language.SetLanguage(this);
}
......@@ -39,6 +40,7 @@ namespace SmartScan
Common.config.ReelIDPostfix = TxtPostfix.Text;
Common.config.ReelIDPlaces = (int)NumReelIDPlaces.Value;
Common.config.ReelIDFillZero = ChkReelIDFillZero.Checked;
Common.config.ReelIDAutoResetByDate = ChkResetidbydate.Checked;
Common.config.Save();
}
void setRIkey() {
......@@ -139,5 +141,11 @@ namespace SmartScan
Common.config.ReelIDKeyWord = keyCopy[LstKey.SelectedIndex];
setRIkey();
}
private void btn_adddatetime_Click(object sender, EventArgs e)
{
string key = "[datetime:yyyyMMdd]";
TxtReelIDMatch.AppendText(key);
}
}
}
......@@ -55,6 +55,18 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\FaceControl\FaceControl\bin\Debug\Asa.Face.Control.dll</HintPath>
</Reference>
<Reference Include="ClosedXML, Version=0.96.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL">
<HintPath>..\packages\ClosedXML.0.96.0\lib\net46\ClosedXML.dll</HintPath>
</Reference>
<Reference Include="ConfigHelper">
<HintPath>..\..\ConfigHelper\ConfigHelper\bin\Debug\ConfigHelper.dll</HintPath>
</Reference>
<Reference Include="DocumentFormat.OpenXml, Version=2.16.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.2.16.0\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
</Reference>
<Reference Include="ExcelNumberFormat, Version=1.1.0.0, Culture=neutral, PublicKeyToken=23c6f5d73be07eca, processorArchitecture=MSIL">
<HintPath>..\packages\ExcelNumberFormat.1.1.0\lib\net20\ExcelNumberFormat.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
</Reference>
......@@ -78,17 +90,43 @@
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="Common.cs" />
<Compile Include="ExtraFileData.cs" />
<Compile Include="Form\FrmWaitting.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form\FrmWaitting.Designer.cs">
<DependentUpon>FrmWaitting.cs</DependentUpon>
</Compile>
<Compile Include="PlusSettingFrm\FrmSetPlus.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PlusSettingFrm\FrmSetPlus.Designer.cs">
<DependentUpon>FrmSetPlus.cs</DependentUpon>
</Compile>
<Compile Include="PlusSettingFrm\UsrLabeling.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="PlusSettingFrm\UsrLabeling.Designer.cs">
<DependentUpon>UsrLabeling.cs</DependentUpon>
</Compile>
<Compile Include="ScanWork.cs" />
<Compile Include="ServerCommunication.cs" />
<Compile Include="SetControl\FrmDataFilePreview.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SetControl\FrmDataFilePreview.Designer.cs">
<DependentUpon>FrmDataFilePreview.cs</DependentUpon>
</Compile>
<Compile Include="SetControl\UsrDataSource.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="SetControl\UsrDataSource.Designer.cs">
<DependentUpon>UsrDataSource.cs</DependentUpon>
</Compile>
<Compile Include="UserLoginWindow.cs" />
<Compile Include="Form\FrmAbout.cs">
<SubType>Form</SubType>
......@@ -230,6 +268,12 @@
<EmbeddedResource Include="Form\FrmWaitting.resx">
<DependentUpon>FrmWaitting.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PlusSettingFrm\FrmSetPlus.resx">
<DependentUpon>FrmSetPlus.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PlusSettingFrm\UsrLabeling.resx">
<DependentUpon>UsrLabeling.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
......@@ -240,6 +284,12 @@
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<EmbeddedResource Include="SetControl\FrmDataFilePreview.resx">
<DependentUpon>FrmDataFilePreview.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SetControl\UsrDataSource.resx">
<DependentUpon>UsrDataSource.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SetControl\UsrWorkMode.resx">
<DependentUpon>UsrWorkMode.cs</DependentUpon>
</EmbeddedResource>
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<StartArguments>
</StartArguments>
<StartArguments>background-</StartArguments>
</PropertyGroup>
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
......
......@@ -3,6 +3,9 @@ using System.ServiceModel;
using System.ServiceModel.Activation;
using System.IO;
using Model;
using System.Runtime.Serialization.Formatters.Binary;
using System.Drawing;
using System.Collections.Generic;
namespace SmartScan
{
......@@ -44,9 +47,50 @@ namespace SmartScan
Common.frmMain.Invoke(new Action(() => { msg = Common.frmMain.WebTouchWork(str); }));
return new WebResultCode() { Data = msg };
}
public WebResultCode ProcessBitmap(Stream info, string param)
{
BinaryFormatter bf = new BinaryFormatter();
Bitmap bitmap = (Bitmap)bf.Deserialize(info);
try
{
List<CameraVisionLib.Model.BarcodeInfo> workCodeInfo = new();
Dictionary<string, string> workCodeKeyword;// = new(StringComparer.OrdinalIgnoreCase);
bool[] originalCodeIsUsed = null;
workCodeInfo = Common.cameraVision.GetBarCode(bitmap);
if (workCodeInfo.Count == 0)
return new WebResultCode() { ErrorCode = -1, Msg = "扫码失败" };
bool rtn = Common.mateEdit.MatchingTemplate(workCodeInfo, Common.config.DefaultMaterialName, false, out string mateName, out workCodeKeyword, out originalCodeIsUsed);
LogNet.log.Info("Work SetKey hasMatch:" + rtn);
WebResultCode webResultCode = null;
if (!Common.extension.SetKey(null, workCodeKeyword, rtn, out string errmsg))
{
webResultCode = new WebResultCode() { ErrorCode = -2, Msg = errmsg };
}
if (webResultCode != null)
return webResultCode;
LogNet.log.Info("Work scan is done");
List<KeyValuePair<string, string>> result = new List<KeyValuePair<string, string>>();
foreach (var wc in workCodeKeyword) {
result.Add(new KeyValuePair<string, string>(wc.Key,wc.Value));
}
return new WebResultCode() { workCodeKeyword = result, workCodeInfo = workCodeInfo };
}
catch (Exception ex)
{
LogNet.log.Error("ProcessBitmap", ex);
return new WebResultCode() { ErrorCode = -1, Msg = "扫码失败:"+ ex };
}
}
}
}
......@@ -289,6 +289,12 @@
</summary>
<returns></returns>
</member>
<member name="M:Asa.Camera.VisionLib.GetImage(System.Int32)">
<summary>
按索引获取当前图像
</summary>
<returns></returns>
</member>
<member name="M:Asa.Camera.VisionLib.GetImage(System.String)">
<summary>
获取当前图像
......
1529
\ No newline at end of file
1541
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<appSettings>
<Language>简体中文</Language>
<Language>English</Language>
<PrinterName>Microsoft Print to PDF</PrinterName>
<PrintLandscape>False</PrintLandscape>
<HistoryImage>Original</HistoryImage>
......@@ -16,8 +16,7 @@
<IOTouch>0</IOTouch>
<IOLight>0</IOLight>
<ExtensionWidth>300</ExtensionWidth>
<ReelIDMatch>
</ReelIDMatch>
<ReelIDMatch>[datetime:yyyyMMdd]</ReelIDMatch>
<ReelIDPlaces>9</ReelIDPlaces>
<ReelIDFillZero>True</ReelIDFillZero>
<ReelIDPrefix>C</ReelIDPrefix>
......@@ -30,13 +29,12 @@
<HttpReelID>http://127.0.0.1:8888/test</HttpReelID>
<DefaultMaterialName>m2</DefaultMaterialName>
<TriggerOpenLight>True</TriggerOpenLight>
<WebService>
</WebService>
<WebService>http://127.0.0.1:58137</WebService>
<PromptAfterPrinting>False</PromptAfterPrinting>
<AutoPrint>True</AutoPrint>
<ReelIDKeyWord>
</ReelIDKeyWord>
<ReelIDKeyWord>Reelid</ReelIDKeyWord>
<SmfServer>http://192.168.1.243/smf-core/</SmfServer>
<CID>NeoScan01</CID>
<IOModule>NiRen</IOModule>
<ReelIDAutoResetByDate>False</ReelIDAutoResetByDate>
</appSettings>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Language Name="English">
<Dialog>
<LoginWrong>The login password is incorrect.</LoginWrong>
......@@ -31,6 +31,14 @@
<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>
<!--原文:请选择数据文件-->
<selectdatasource>Please select data source</selectdatasource>
<!--原文:文件状态:改文件不存在-->
<filenotexists>文件状态:The file doesn't exit</filenotexists>
<!--原文:文件内容解析失败-->
<filepatseerror>File read fails</filepatseerror>
<!--原文:文件格式不正确-->
<fileformaterror>Incorrect file format</fileformaterror>
</Dialog>
<FrmUsersLogin Text="Login" Font="Arial,24,B,">
<LblUser Text="User name" Font="Arial,11,," />
......@@ -57,7 +65,19 @@
<BtnOK Text="Save" Font="Arial,12,," />
<BtnCancel Text="Cancel" Font="Arial,12,," />
<BtnApply Text="Apply" Font="Arial,12,," />
<!--原文:Data Source-->
<BtnDataSource Text="Data Source" Font="微软雅黑,12,," />
</FrmSet>
<FrmSetPlus Text="BarCode Rule Setting" Font="Arial,24,B,">
<BtnWorkMode Text="Work Mode" Font="Arial,12,B," />
<BtnIdentify Text="Identify" Font="Arial,12,B," />
<BtnLabel Text="Label Template" Font="Arial,12,B," />
<BtnMaterial Text="Material Template" Font="Arial,12,B," />
<BtnKeyword Text="Keyword" Font="Arial,12,B," />
<BtnOK Text="Save" Font="Arial,12,," />
<BtnCancel Text="Cancel" Font="Arial,12,," />
<BtnApply Text="Apply" Font="Arial,12,," />
</FrmSetPlus>
<UsrWorkMode>
<LblPrint Text="Printer" Font="Arial,12,B," />
<LblDefaultLabel Text="Default Print Label" Font="Arial,12,B," />
......@@ -119,6 +139,22 @@
<BtnOcrCode Text="OCR" Font="Arial,12,," />
<BtnPrimaryCode Text="Set Primary code" Font="Arial,12,," />
</UsrMaterialTemplate>
<UsrDataSource>
<!--原文:遍历同目录-->
<ChkRecursive Text="Search files in the same directory" Font="微软雅黑,12,," />
<!--原文:标签可用字段-->
<groupBox_lblkey Text="Label Available Fields" Font="微软雅黑,12,," />
<!--原文:选择文件-->
<BtnSelectFile Text="Select File" Font="微软雅黑,12,," />
<!--原文:关键字匹配数据标题-->
<faceLabel2 Text="Keyword matches the data title" Font="微软雅黑,12,," />
<!--原文:识别关键词-->
<faceLabel1 Text="Identify Key Words" Font="微软雅黑,12,," />
<!--原文:文件状态:-->
<LblFilestatus Text="File Status:" Font="微软雅黑,12,," />
<!--原文:Label Data Source-->
<LblContent Text="Label Data Source" Font="微软雅黑,12,," />
</UsrDataSource>
<UsrMacro>
<BtnAddKey Text="Add key" Font="Arial,12,," />
<BtnDelKey Text="Delete key" Font="Arial,12,," />
......@@ -131,6 +167,10 @@
<LblPostfix Text="Suffix" Font="Arial,10,," />
<LblPlaces Text="Field length" Font="Arial,10,," />
<ChkReelIDFillZero Text="Fill zero" Font="Arial,12,," />
<!--原文:添加日期时间-->
<btn_adddatetime Text="Date" Font="微软雅黑,12,," />
<!--原文:序号每日重置-->
<ChkResetidbydate Text="Serial Number Reset Daily" Font="微软雅黑,12,," />
</UsrMacro>
<UsrCodeExtractList>
<ChkMatchingStart Text="Match starting characters" Font="Arial,12,," />
......
......@@ -47,6 +47,8 @@
<LblCameraExist Text="识别设备连接" Font="微软雅黑,9,," />
<LblIOExist Text="IO模块连接" Font="微软雅黑,9,," />
<PnlExtension Text="功能" Font="微软雅黑,14,B," />
<!--原文:简体中文-->
<CboLanguage Text="简体中文" Font="微软雅黑,12,," />
</FrmMain>
<FrmSet Text="设置" Font="微软雅黑,24,B,">
<BtnWorkMode Text="工作模式" Font="微软雅黑,12,B," />
......@@ -57,7 +59,19 @@
<BtnOK Text="保存" Font="微软雅黑,12,," />
<BtnCancel Text="取消" Font="微软雅黑,12,," />
<BtnApply Text="应用" Font="微软雅黑,12,," />
<!--原文:数据源-->
<BtnDataSource Text="数据源" Font="微软雅黑,12,," />
</FrmSet>
<FrmSetPlus Text="条码规则设置" Font="微软雅黑,24,B,">
<BtnWorkMode Text="工作模式" Font="微软雅黑,12,B," />
<BtnIdentify Text="识别设备" Font="微软雅黑,12,B," />
<BtnLabel Text="打印模版" Font="微软雅黑,12,B," />
<BtnMaterial Text="物料模版" Font="微软雅黑,12,B," />
<BtnKeyword Text="关键字" Font="微软雅黑,12,B," />
<BtnOK Text="保存" Font="微软雅黑,12,," />
<BtnCancel Text="取消" Font="微软雅黑,12,," />
<BtnApply Text="应用" Font="微软雅黑,12,," />
</FrmSetPlus>
<UsrWorkMode>
<LblPrint Text="打印机" Font="微软雅黑,12,B," />
<LblDefaultLabel Text="默认打印标签" Font="微软雅黑,12,B," />
......@@ -131,6 +145,10 @@
<LblPostfix Text="结尾字符串" Font="微软雅黑,12,," />
<LblPlaces Text="数字位数" Font="微软雅黑,12,," />
<ChkReelIDFillZero Text="位数不足前面补0" Font="微软雅黑,12,," />
<!--原文:添加日期时间-->
<btn_adddatetime Text="添加日期时间" Font="微软雅黑,12,," />
<!--原文:序号每日重置-->
<ChkResetidbydate Text="序号每日重置" Font="微软雅黑,12,," />
</UsrMacro>
<UsrCodeExtractList>
<ChkMatchingStart Text="匹配开头字符" Font="微软雅黑,12,," />
......
......@@ -4,6 +4,16 @@
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>
<appSettings>
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true" />
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true"/>
</appSettings>
<system.serviceModel>
<bindings>
<webHttpBinding>
<binding maxReceivedMessageSize="90000000" maxBufferPoolSize="90000000" maxBufferSize="90000000" closeTimeout="00:03:00" openTimeout="00:03:00" receiveTimeout="00:01:00" sendTimeout="00:01:00">
<readerQuotas maxStringContentLength="90000000" maxArrayLength="90000000" maxBytesPerRead="90000000" />
<security mode="None"/>
</binding>
</webHttpBinding>
</bindings>
</system.serviceModel>
</configuration>
7b63aa4ffa34bf61a68afae14d5eecc716e25843
29118a0e85ae73ebe328af796212ada2655bcbd6
......@@ -163,6 +163,17 @@ D:\rick\vs\SmartScan\SmartScan\bin\Debug\Asa.Camera.VisionLib.pdb
D:\rick\vs\SmartScan\SmartScan\bin\Debug\Asa.Camera.VisionLib.xml
D:\rick\vs\SmartScan\SmartScan\bin\Debug\MvCameraControl.Net.xml
D:\rick\vs\SmartScan\SmartScan\bin\Debug\Asa.Face.dll
D:\rick\vs\SmartScan\SmartScan\bin\Debug\TcpKPIO.dll
D:\rick\vs\SmartScan\SmartScan\bin\Debug\TcpKPIO.pdb
D:\rick\vs\SmartScan\SmartScan\bin\Debug\TcpKPIO.xml
D:\rick\vs\SmartScan\SmartScan\obj\Debug\SmartScan.FrmSetPlus.resources
D:\rick\vs\SmartScan\SmartScan\obj\Debug\SmartScan.UsrLabeling.resources
D:\rick\vs\SmartScan\SmartScan\bin\Debug\ConfigHelper.dll
D:\rick\vs\SmartScan\SmartScan\bin\Debug\ConfigHelper.pdb
D:\rick\vs\SmartScan\SmartScan\bin\Debug\ConfigHelper.xml
D:\rick\vs\SmartScan\SmartScan\obj\Debug\SmartScan.UsrDataSource.resources
D:\rick\vs\SmartScan\SmartScan\bin\Debug\ClosedXML.dll
D:\rick\vs\SmartScan\SmartScan\bin\Debug\DocumentFormat.OpenXml.dll
D:\rick\vs\SmartScan\SmartScan\bin\Debug\ExcelNumberFormat.dll
D:\rick\vs\SmartScan\SmartScan\bin\Debug\ClosedXML.pdb
D:\rick\vs\SmartScan\SmartScan\bin\Debug\ClosedXML.xml
D:\rick\vs\SmartScan\SmartScan\bin\Debug\DocumentFormat.OpenXml.xml
D:\rick\vs\SmartScan\SmartScan\bin\Debug\ExcelNumberFormat.xml
D:\rick\vs\SmartScan\SmartScan\obj\Debug\SmartScan.FrmDataFilePreview.resources
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!