Commit 27df0cbb 贾鹏旭

同步

2 个父辈 e3128339 d758d3a9
...@@ -40,9 +40,8 @@ ...@@ -40,9 +40,8 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedDll\Asa.Camera.VisionLib.dll</HintPath> <HintPath>..\SharedDll\Asa.Camera.VisionLib.dll</HintPath>
</Reference> </Reference>
<Reference Include="Asa.Face.Control, Version=1.0.8636.38287, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Asa.Face.Control">
<SpecificVersion>False</SpecificVersion> <HintPath>..\SharedDll\Asa.Face.Control.dll</HintPath>
<HintPath>..\..\..\asa\FaceControl\Test\bin\Debug\Asa.Face.Control.dll</HintPath>
</Reference> </Reference>
<Reference Include="ClosedXML, Version=0.96.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL"> <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> <HintPath>..\packages\ClosedXML.0.96.0\lib\net46\ClosedXML.dll</HintPath>
......
...@@ -244,9 +244,9 @@ namespace BLL ...@@ -244,9 +244,9 @@ namespace BLL
{ {
return currentExtension.SetKey(originalCode, key, hasMatch, out errmsg); return currentExtension.SetKey(originalCode, key, hasMatch, out errmsg);
} }
public void Print() public void Print(bool hasMatch, Dictionary<string, string> key)
{ {
//currentExtension.Printing currentExtension.Print(hasMatch, key);
} }
public void DrawTextBackground(Dictionary<string, string> key) public void DrawTextBackground(Dictionary<string, string> key)
{ {
......
...@@ -385,5 +385,10 @@ namespace BLL ...@@ -385,5 +385,10 @@ namespace BLL
public void DrawTextBackground(Dictionary<string, string> key) public void DrawTextBackground(Dictionary<string, string> key)
{ {
} }
public void Print(bool match, Dictionary<string, string> key)
{
}
} }
} }
...@@ -150,7 +150,7 @@ namespace BLL ...@@ -150,7 +150,7 @@ namespace BLL
//if (extensions != null && !extensions[0].Control.InvokeRequired) //if (extensions != null && !extensions[0].Control.InvokeRequired)
//{ //{
// if ( && hasMatch) // if (config.AutoPrint && hasMatch)
// { // {
// //if (CanPrint()) // //if (CanPrint())
// PrintLabel(null, EventArgs.Empty); // PrintLabel(null, EventArgs.Empty);
...@@ -160,7 +160,7 @@ namespace BLL ...@@ -160,7 +160,7 @@ namespace BLL
//{ //{
// //PrintLabel(null, EventArgs.Empty); // //PrintLabel(null, EventArgs.Empty);
//} //}
SaveRetrospect?.Invoke(key); //SaveRetrospect?.Invoke(key);
return true; return true;
} }
bool updatereelid(Dictionary<string, string> key, out string errmsg) bool updatereelid(Dictionary<string, string> key, out string errmsg)
...@@ -286,9 +286,8 @@ namespace BLL ...@@ -286,9 +286,8 @@ namespace BLL
{ {
updatereelid(lastkey, out _); updatereelid(lastkey, out _);
} }
public void PrintLabel(object sender, EventArgs e) private void PrintLabel(object sender, EventArgs e)
{ {
if (!config.AutoPrint) return;
LogNet.log.Debug("Enter PrintLabel Method"); LogNet.log.Debug("Enter PrintLabel Method");
if (lastkey == null) return; if (lastkey == null) return;
//Dictionary<string, string> key = new(); //Dictionary<string, string> key = new();
...@@ -558,6 +557,23 @@ namespace BLL ...@@ -558,6 +557,23 @@ namespace BLL
} }
Application.DoEvents(); Application.DoEvents();
} }
public void Print(bool match, Dictionary<string, string> key)
{
if (extensions != null && !extensions[0].Control.InvokeRequired)
{
if (config.AutoPrint && match)
{
//if (CanPrint())
PrintLabel(null, EventArgs.Empty);
}
}
else
{
//PrintLabel(null, EventArgs.Empty);
}
SaveRetrospect?.Invoke(key);
}
} }
} }
...@@ -386,5 +386,10 @@ namespace BLL ...@@ -386,5 +386,10 @@ namespace BLL
public void DrawTextBackground(Dictionary<string, string> key) public void DrawTextBackground(Dictionary<string, string> key)
{ {
} }
public void Print(bool match, Dictionary<string, string> key)
{
}
} }
} }
...@@ -275,6 +275,11 @@ namespace BLL ...@@ -275,6 +275,11 @@ namespace BLL
{ {
} }
public void Print(bool match, Dictionary<string, string> key)
{
}
public class InitPPID_Request_DPS public class InitPPID_Request_DPS
{ {
/* /*
......
...@@ -534,5 +534,10 @@ namespace BLL ...@@ -534,5 +534,10 @@ namespace BLL
public void DrawTextBackground(Dictionary<string, string> key) public void DrawTextBackground(Dictionary<string, string> key)
{ {
} }
public void Print(bool match, Dictionary<string, string> key)
{
}
} }
} }
...@@ -365,6 +365,11 @@ namespace BLL ...@@ -365,6 +365,11 @@ namespace BLL
public void DrawTextBackground(Dictionary<string, string> key) public void DrawTextBackground(Dictionary<string, string> key)
{ {
} }
public void Print(bool match, Dictionary<string, string> key)
{
}
} }
} }
...@@ -12,16 +12,16 @@ namespace BLL ...@@ -12,16 +12,16 @@ namespace BLL
//请求处理关键字 //请求处理关键字
public class Replacekeywords public class Replacekeywords
{ {
public static string Replacekeywordss(Dictionary<string,string> macroKey) public static string Replacekeywordss(Dictionary<string, string> macroKey)
{ {
string jsondata = null; string jsondata = null;
Config config = new Config(); Config config = new Config();
#region 验证配置数据是否正确 #region 验证配置数据是否正确
//未找到任何ns100设置的关键字信息 //未找到任何ns100设置的关键字信息
if (macroKey == null || macroKey.Count < 0) if (macroKey == null || macroKey.Count < 0)
{ {
LogNet.log.Error("更换关键字:未找到任何关键字信息,请重新设置!"); LogNet.log.Error("更换关键字:未找到任何关键字信息,请重新设置!");
throw new Exception("未找到任何关键字信息,请重新设置!"); throw new Exception("未找到任何关键字信息,请重新设置!");
} }
if (config.Method != Method.POST && config.Method != Method.GET) if (config.Method != Method.POST && config.Method != Method.GET)
{ {
...@@ -30,23 +30,23 @@ namespace BLL ...@@ -30,23 +30,23 @@ namespace BLL
} }
if (config.IsTokenRequired && config.Tokenurl == null) if (config.IsTokenRequired && config.Tokenurl == null)
{ {
LogNet.log.Error("更换关键字:需要请求token,请填写tokenurl!"); LogNet.log.Error("更换关键字:需要请求token,请填写tokenurl!");
throw new Exception("需要请求token,请填写tokenurl!"); throw new Exception("需要请求token,请填写tokenurl!");
} }
if (string.IsNullOrWhiteSpace(config.Url) || config.KeyWords.Length<0) if (string.IsNullOrWhiteSpace(config.Url) || config.KeyWords.Length < 0)
{ {
LogNet.log.Error("更换关键字:URL和关键字不能为空"); LogNet.log.Error("更换关键字:URL和关键字不能为空");
throw new Exception("URL和关键字不能为空"); throw new Exception("URL和关键字不能为空");
} }
config.filteredData= macroKey config.filteredData = macroKey
.Where(kvp => config.KeyWords.Contains(kvp.Key)) .Where(kvp => config.KeyWords.Contains(kvp.Key))
.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); .ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
//判断结果中是否包含指定关键字 //判断结果中是否包含指定关键字
bool allinkey = config.filteredData.Count > 0; /*== config.KeyWords.Count();*/ bool allinkey = config.filteredData.Count > 0; /*== config.KeyWords.Count();*/
if (!allinkey) if (!allinkey)
{ {
LogNet.log.Error($"更换关键字:关键字未包含;{config.KeyWords}"); LogNet.log.Error($"更换关键字:关键字未包含;{config.KeyWords}");
throw new Exception($"关键字未包含;{config.KeyWords}"); throw new Exception($"关键字未包含;{config.KeyWords}");
} }
...@@ -62,7 +62,7 @@ namespace BLL ...@@ -62,7 +62,7 @@ namespace BLL
// 解析 JSON // 解析 JSON
JObject jsonObject = JObject.Parse(responseJson); JObject jsonObject = JObject.Parse(responseJson);
// 提取 Token 的值 // 提取 Token 的值
string tokenValue = (string)jsonObject["Token"]; string tokenValue = (string)jsonObject["Token"];
request.AddHeader("Authorization", tokenValue); request.AddHeader("Authorization", tokenValue);
LogNet.log.Error($"更换关键字:请求token:{tokenValue}"); LogNet.log.Error($"更换关键字:请求token:{tokenValue}");
} }
...@@ -73,7 +73,7 @@ namespace BLL ...@@ -73,7 +73,7 @@ namespace BLL
} }
#endregion #endregion
return jsondata; return jsondata;
} }
public static string SendHttpRequest(Config config, RestRequest request) public static string SendHttpRequest(Config config, RestRequest request)
{ {
string json = ""; string json = "";
...@@ -100,7 +100,7 @@ namespace BLL ...@@ -100,7 +100,7 @@ namespace BLL
} }
string parstring = string.Join(",", parstringParts); string parstring = string.Join(",", parstringParts);
//parstring = "Y023070966,WPG0001,1,infobar"; //parstring = "Y023070966,WPG0001,1,infobar";
config.Url+= $"&customloadmethodparms={parstring}&loadtype=NEXT&readonly=true&rowcap=-1"; config.Url += $"&customloadmethodparms={parstring}&loadtype=NEXT&readonly=true&rowcap=-1";
var client = new RestClient(config.Url); var client = new RestClient(config.Url);
LogNet.log.Error($"更换关键字:请求Url:{config.Url}"); LogNet.log.Error($"更换关键字:请求Url:{config.Url}");
// 禁用自动重定向 // 禁用自动重定向
...@@ -127,17 +127,17 @@ namespace BLL ...@@ -127,17 +127,17 @@ namespace BLL
public class Config public class Config
{ {
//是否需要请求token //是否需要请求token
public Method Method { get; set; } = ConfigurationManager.AppSettings["RequestMethod"] == "POST" ? Method.POST : Method.GET; public Method Method { get; set; } = ConfigHelper.Config.Get("SelectHttpPN_RequestMethod", "GET") == "POST" ? Method.POST : Method.GET;
//是否需要请求token //是否需要请求token
public string ContentType { get; set; } = ConfigurationManager.AppSettings["ContentType"]; public string ContentType { get; set; } = ConfigHelper.Config.Get("SelectHttpPN_ContentType", "application/json");
//是否需要请求token //是否需要请求token
public bool IsTokenRequired { get; set; } = Convert.ToBoolean(ConfigurationManager.AppSettings["IsTokenRequired"]); public bool IsTokenRequired { get; set; } = ConfigHelper.Config.Get("SelectHttpPN_IsTokenRequired", true);
//请求tokenurl //请求tokenurl
public string Tokenurl { get; set; } = ConfigurationManager.AppSettings["Tokenurl"]; public string Tokenurl { get; set; } = ConfigHelper.Config.Get("SelectHttpPN_Tokenurl", "");
//请求正常数据 //请求正常数据
public string Url { get; set; } = ConfigurationManager.AppSettings["Url"]; public string Url { get; set; } = ConfigHelper.Config.Get("SelectHttpPN_Url", "");
//关键字,请用,号分割 //关键字,请用,号分割
public string[] KeyWords { get; set; } = ConfigurationManager.AppSettings["KeyWords"].Split(','); public string[] KeyWords { get; set; } = ConfigHelper.Config.Get("SelectHttpPN_KeyWords", "grn_num,vend_num,grn_line,infobar=0").Split(',');
/// <summary> /// <summary>
...@@ -157,6 +157,6 @@ namespace BLL ...@@ -157,6 +157,6 @@ namespace BLL
public List<List<ResponseItem>> Items { get; set; } public List<List<ResponseItem>> Items { get; set; }
public string Message { get; set; } public string Message { get; set; }
public int MessageCode { get; set; } public int MessageCode { get; set; }
} }
} }
} }
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Asa.Face.Control"> <Reference Include="Asa.Face.Control">
<HintPath>..\..\..\asa\FaceControl\Test\bin\Debug\Asa.Face.Control.dll</HintPath> <HintPath>..\SharedDll\Asa.Face.Control.dll</HintPath>
</Reference> </Reference>
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL"> <Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
<HintPath>..\packages\NLog.5.2.3\lib\net46\NLog.dll</HintPath> <HintPath>..\packages\NLog.5.2.3\lib\net46\NLog.dll</HintPath>
......
...@@ -534,8 +534,42 @@ namespace ExtensionGroup ...@@ -534,8 +534,42 @@ namespace ExtensionGroup
// return false; // return false;
// } // }
//} //}
public event IExtension.PrintDelegate Printing;
public event IExtension.PrintDelegate SaveRetrospect;
public void Clear()
{
throw new NotImplementedException();
}
public void Dispose()
{
throw new NotImplementedException();
}
public void DrawTextBackground(Dictionary<string, string> key)
{
throw new NotImplementedException();
}
public void Load(List<ExtensionControl> extensions)
{
throw new NotImplementedException();
}
public void Print(bool match, Dictionary<string, string> key)
{
}
public bool SetKey(string[] originalCode, Dictionary<string, string> key, bool hasMatch, out string errmsg)
{
throw new NotImplementedException();
}
public void Update()
{
throw new NotImplementedException();
}
} }
} }
...@@ -20,6 +20,7 @@ namespace Model ...@@ -20,6 +20,7 @@ namespace Model
public void Dispose(); public void Dispose();
public void Print(bool match, Dictionary<string, string> key);
public abstract void DrawTextBackground(Dictionary<string, string> key); public abstract void DrawTextBackground(Dictionary<string, string> key);
} }
} }
...@@ -44,9 +44,8 @@ ...@@ -44,9 +44,8 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedDll\Asa.Camera.VisionLib.dll</HintPath> <HintPath>..\SharedDll\Asa.Camera.VisionLib.dll</HintPath>
</Reference> </Reference>
<Reference Include="Asa.Face.Control, Version=1.0.8621.29649, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Asa.Face.Control">
<SpecificVersion>False</SpecificVersion> <HintPath>..\SharedDll\Asa.Face.Control.dll</HintPath>
<HintPath>..\..\..\asa\FaceControl\FaceControl\bin\Debug\Asa.Face.Control.dll</HintPath>
</Reference> </Reference>
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <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> <HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
......
...@@ -5,22 +5,6 @@ ...@@ -5,22 +5,6 @@
</startup> </startup>
<appSettings> <appSettings>
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true"/> <add key="EnableWindowsFormsHighDpiAutoResizing" value="true"/>
<!--服务器查询PN_开始-->
<!--请求方式;大写POSTGET-->
<add key="CustomerName" value="1181"/>
<add key="RequestMethod" value="GET"/>
<add key="ContentType" value="application/json"/>
<add key="IsTokenRequired" value="TRUE"/>
<!--isTokenRequiredtrue时,tokenurl必填-->
<add key="Tokenurl" value=""/>
<add key="Url" value=""/>
<!--关键字value请用,号隔开-->
<add key="KeyWords" value="grn_num,vend_num,grn_line,infobar=0"/>
<!--服务器查询PN_结束-->
<!--启动服务路由地址-->
<add key="StartServiceName" value=""/>
<add key="StartServicePath" value=""/>
</appSettings> </appSettings>
<system.serviceModel> <system.serviceModel>
<bindings> <bindings>
......
...@@ -45,7 +45,7 @@ namespace SmartScan ...@@ -45,7 +45,7 @@ namespace SmartScan
this.LstRecord = new Asa.FaceControl.FaceListBox(); this.LstRecord = new Asa.FaceControl.FaceListBox();
this.LblCode = new Asa.FaceControl.FaceLabel(); this.LblCode = new Asa.FaceControl.FaceLabel();
this.LblDateRange = new Asa.FaceControl.FaceLabel(); this.LblDateRange = new Asa.FaceControl.FaceLabel();
this.butt_startservice = new Asa.FaceControl.FaceButton(); this.butt_getData = new Asa.FaceControl.FaceButton();
((System.ComponentModel.ISupportInitialize)(this.PicLabel)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.PicLabel)).BeginInit();
this.tableLayoutPanel1.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
...@@ -309,28 +309,28 @@ namespace SmartScan ...@@ -309,28 +309,28 @@ namespace SmartScan
this.LblDateRange.Text = "日期"; this.LblDateRange.Text = "日期";
this.LblDateRange.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.LblDateRange.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
// butt_startservice // butt_getData
// //
this.butt_startservice.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20))))); this.butt_getData.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.butt_startservice.BorderStyle = Asa.FaceControl.ControlShape.Rectangle; this.butt_getData.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.butt_startservice.BorderWidth = 2; this.butt_getData.BorderWidth = 2;
this.butt_startservice.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230))))); this.butt_getData.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.butt_startservice.HoldPress = false; this.butt_getData.HoldPress = false;
this.butt_startservice.Location = new System.Drawing.Point(17, 505); this.butt_getData.Location = new System.Drawing.Point(17, 505);
this.butt_startservice.Name = "butt_startservice"; this.butt_getData.Name = "butt_getData";
this.butt_startservice.Padding = new System.Windows.Forms.Padding(3); this.butt_getData.Padding = new System.Windows.Forms.Padding(3);
this.butt_startservice.Size = new System.Drawing.Size(292, 56); this.butt_getData.Size = new System.Drawing.Size(292, 56);
this.butt_startservice.TabIndex = 22; this.butt_getData.TabIndex = 22;
this.butt_startservice.Text = "启动服务"; this.butt_getData.Text = "获取数据";
this.butt_startservice.Visible = false; this.butt_getData.Visible = false;
this.butt_startservice.Click += new System.EventHandler(this.butt_startservice_Click); this.butt_getData.Click += new System.EventHandler(this.butt_startservice_Click);
// //
// FrmRetrospect // FrmRetrospect
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1617, 788); this.ClientSize = new System.Drawing.Size(1617, 788);
this.Controls.Add(this.butt_startservice); this.Controls.Add(this.butt_getData);
this.Controls.Add(this.LblDateRange); this.Controls.Add(this.LblDateRange);
this.Controls.Add(this.LblCode); this.Controls.Add(this.LblCode);
this.Controls.Add(this.tableLayoutPanel1); this.Controls.Add(this.tableLayoutPanel1);
...@@ -357,7 +357,7 @@ namespace SmartScan ...@@ -357,7 +357,7 @@ namespace SmartScan
this.Controls.SetChildIndex(this.tableLayoutPanel1, 0); this.Controls.SetChildIndex(this.tableLayoutPanel1, 0);
this.Controls.SetChildIndex(this.LblCode, 0); this.Controls.SetChildIndex(this.LblCode, 0);
this.Controls.SetChildIndex(this.LblDateRange, 0); this.Controls.SetChildIndex(this.LblDateRange, 0);
this.Controls.SetChildIndex(this.butt_startservice, 0); this.Controls.SetChildIndex(this.butt_getData, 0);
((System.ComponentModel.ISupportInitialize)(this.PicLabel)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.PicLabel)).EndInit();
this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel1.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
...@@ -382,6 +382,6 @@ namespace SmartScan ...@@ -382,6 +382,6 @@ namespace SmartScan
private Asa.FaceControl.FaceLabel LblAllCode; private Asa.FaceControl.FaceLabel LblAllCode;
private Asa.FaceControl.FaceLabel LblAllLabel; private Asa.FaceControl.FaceLabel LblAllLabel;
private Asa.FaceControl.FaceLabel LblDateRange; private Asa.FaceControl.FaceLabel LblDateRange;
private Asa.FaceControl.FaceButton butt_startservice; private Asa.FaceControl.FaceButton butt_getData;
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -133,9 +133,9 @@ namespace SmartScan ...@@ -133,9 +133,9 @@ namespace SmartScan
{ {
DtpLower.Value = DateTime.Now.Date; DtpLower.Value = DateTime.Now.Date;
DtpUpper.Value = DateTime.Now.Date; DtpUpper.Value = DateTime.Now.Date;
if (ConfigurationManager.AppSettings["CustomerName"] == "1181") if (ConfigHelper.Config.Get("Func_EnableGetData",false))
{ {
butt_startservice.Visible=true; butt_getData.Visible = true;
LstRecord.Height = 206; LstRecord.Height = 206;
} }
} }
...@@ -424,11 +424,11 @@ namespace SmartScan ...@@ -424,11 +424,11 @@ namespace SmartScan
private void butt_startservice_Click(object sender, EventArgs e) private void butt_startservice_Click(object sender, EventArgs e)
{ {
Process p = new Process(); Process p = new Process();
var pss = Process.GetProcessesByName(ConfigurationManager.AppSettings["StartServiceName"]); var pss = Process.GetProcessesByName(ConfigHelper.Config.Get("GetDataAppName"));
if (pss.Length > 0) if (pss.Length > 0)
return; return;
var f = ConfigurationManager.AppSettings["StartServicePath"]; var f = ConfigurationManager.AppSettings["GetDataAppPath"];
if (!File.Exists(f)) if (!File.Exists(f))
throw new Exception("未找到服务文件!"); throw new Exception("未找到服务文件!");
p.StartInfo = new ProcessStartInfo p.StartInfo = new ProcessStartInfo
......
...@@ -291,6 +291,7 @@ ...@@ -291,6 +291,7 @@
<BtnSelect Text="Search" Font="Arial,12,," /> <BtnSelect Text="Search" Font="Arial,12,," />
<BtnExport Text="Export" Font="Arial,12,," /> <BtnExport Text="Export" Font="Arial,12,," />
<BtnExportAll Text="Export All" Font="Arial,12,," /> <BtnExportAll Text="Export All" Font="Arial,12,," />
<butt_getData Text="Get Data" Font="Arial,12,," />
<LblAllCode Text="Original" Font="Arial,12,," /> <LblAllCode Text="Original" Font="Arial,12,," />
<LblAllLabel Text="Extracted Info." Font="Arial,12,," /> <LblAllLabel Text="Extracted Info." Font="Arial,12,," />
</FrmRetrospect> </FrmRetrospect>
......
...@@ -307,6 +307,7 @@ ...@@ -307,6 +307,7 @@
<BtnSelect Text="查询" Font="微软雅黑,12,," /> <BtnSelect Text="查询" Font="微软雅黑,12,," />
<BtnExport Text="导出" Font="微软雅黑,12,," /> <BtnExport Text="导出" Font="微软雅黑,12,," />
<BtnExportAll Text="导出所有" Font="微软雅黑,12,," /> <BtnExportAll Text="导出所有" Font="微软雅黑,12,," />
<butt_getData Text="获取数据" Font="微软雅黑,12,," />
<LblAllCode Text="物料条码" Font="微软雅黑,12,," /> <LblAllCode Text="物料条码" Font="微软雅黑,12,," />
<LblAllLabel Text="标签内容" Font="微软雅黑,12,," /> <LblAllLabel Text="标签内容" Font="微软雅黑,12,," />
</FrmRetrospect> </FrmRetrospect>
......
...@@ -107,19 +107,17 @@ namespace SmartScan ...@@ -107,19 +107,17 @@ namespace SmartScan
Common.frmMain.Invoke(delegate () Common.frmMain.Invoke(delegate ()
{ {
SetKey(hasMatch); SetKey(hasMatch);
Common.frmMain.Invoke(delegate () if (workCodeKeyword.Any(a => a.Value.StartsWith("<OCR>")))
{ {
if (workCodeKeyword.Any(a => a.Value.StartsWith("<OCR>"))) FrmDrawText frmDraw = new FrmDrawText();
if (frmDraw.ShowDialog() == DialogResult.OK)
{ {
FrmDrawText frmDraw = new FrmDrawText(); //打印
if (frmDraw.ShowDialog() == DialogResult.OK) BLLCommon.extension.Print(hasMatch,workCodeKeyword);
{ BLLCommon.extension.DrawTextBackground(workCodeKeyword);
BLLCommon.extension.DrawTextBackground(workCodeKeyword);
//BLLCommon.extension.pri BLLCommon.extension.DrawTextBackground(workCodeKeyword);
}
} }
}); }
}); });
isTouch = false; isTouch = false;
......
...@@ -63,13 +63,11 @@ ...@@ -63,13 +63,11 @@
<Prefer32Bit>true</Prefer32Bit> <Prefer32Bit>true</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Asa.Camera.VisionLib, Version=1.3.8479.24297, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Asa.Camera.VisionLib">
<SpecificVersion>False</SpecificVersion> <HintPath>..\SharedDll\Asa.Camera.VisionLib.dll</HintPath>
<HintPath>..\..\相机操作类\Camera\CameraVisionLibSetting\bin\Debug\Asa.Camera.VisionLib.dll</HintPath>
</Reference> </Reference>
<Reference Include="Asa.Face.Control, Version=1.0.8636.38287, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Asa.Face.Control">
<SpecificVersion>False</SpecificVersion> <HintPath>..\SharedDll\Asa.Face.Control.dll</HintPath>
<HintPath>..\..\..\asa\FaceControl\Test\bin\Debug\Asa.Face.Control.dll</HintPath>
</Reference> </Reference>
<Reference Include="ClosedXML, Version=0.96.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL"> <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> <HintPath>..\packages\ClosedXML.0.96.0\lib\net46\ClosedXML.dll</HintPath>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!