Commit b2199b45 贾鹏旭

添加api接口和

1 个父辈 7eb17a14
......@@ -40,9 +40,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedDll\Asa.Camera.VisionLib.dll</HintPath>
</Reference>
<Reference Include="Asa.Face.Control, Version=1.0.8386.23079, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Asa.Face.Control, Version=1.0.8636.38287, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedDll\Asa.Face.Control.dll</HintPath>
<HintPath>..\..\..\asa\FaceControl\Test\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>
......@@ -63,6 +63,9 @@
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="RestSharp, Version=106.11.7.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
<HintPath>..\packages\RestSharp.106.11.7\lib\net452\RestSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
......@@ -114,6 +117,7 @@
<Compile Include="MaterialEdit.cs" />
<Compile Include="PrintLabelShow.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Replacekeywords.cs" />
<Compile Include="ServerCommunication.cs" />
<Compile Include="Setting_Str.cs" />
<Compile Include="TextBlock.cs" />
......@@ -132,5 +136,9 @@
<Name>Model</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
......@@ -301,7 +301,7 @@ namespace BLL
get => config.Read<string>(IOModule);
set => config.Write(IOModule, value);
}
static Config()
{
ConfigHelper.Config.LoadMyConfig(typeof(Config));
......@@ -328,7 +328,7 @@ namespace BLL
public static MyConfig<bool> Func_EnabledOCR;
[MyConfigComment("允许修改打内容")]
public static MyConfig<bool> AllowModifyPrintInfo;
public void Save()
{
config.Save();
......@@ -379,6 +379,6 @@ namespace BLL
private const string WEB_SERVICE = "WebService";
private const string LIGHT_SERIAL_PORT = "LightSerialPort";
private const string AUTO_PRINT = "AutoPrint";
}
}
......@@ -6,6 +6,8 @@ using System.Web.Script.Serialization;
using System.Reflection;
using Asa.FaceControl;
using Model;
using System.Windows.Forms;
using DocumentFormat.OpenXml.Drawing;
namespace BLL
{
......@@ -31,7 +33,7 @@ namespace BLL
private FacePanel panel;
private System.Drawing.Point startPoint;
private Config config;
public Extension(Config config)
{
this.config = config;
......@@ -193,21 +195,43 @@ namespace BLL
}
};
if (!string.IsNullOrEmpty(config.HttpReelID))
listrow.Add(new object[] { A });
listrow.Add(new object[] { A });
if (BLLCommon.config.SelectHttpPN == true)
{
Dictionary<string, object> C = new(){
{ "Type", "Button" },
{"Attribute",new Dictionary<string, object>(){
{ "Name", "DynamicButton" },
{ "Font", "Arial,12,B,"},
{"Width", -1},
{"Height", 40},
{"Text", Asa.FaceControl.Language.Dialog("Exchangedata_","替换数据")},}
},
{
"Event",
new Dictionary<string, object>()
{
{ "Click", "DynamicButtonClick" }
}
}
};
listrow.Add(new object[] { C }); // Insert the button before the "B" button
}
listrow.Add(new object[] { B });
rows = listrow.ToArray();
}
else
{
{
string json = System.IO.File.ReadAllText(FilePath.CONFIG_EXTENSION);
JavaScriptSerializer serializer = new();
rows = (object[])serializer.DeserializeObject(json);
}
ctlY = startPoint.Y;
ctlY = startPoint.Y;
for (int i = 0; i < rows.Length; i++)
LoadRow(rows[i]);
currentExtension.Load(ctlGroup);
}
......@@ -221,13 +245,16 @@ namespace BLL
return currentExtension.SetKey(originalCode, key, hasMatch, out errmsg);
}
public void DrawTextBackground(Dictionary<string, string> key)
{
currentExtension.DrawTextBackground(key);
}
public void Update()
{
currentExtension.Update();
}
private void LoadRow(object row)
{
object[] cols = (object[])row;
......@@ -357,7 +384,7 @@ namespace BLL
System.Windows.Forms.HorizontalAlignment alignment = (System.Windows.Forms.HorizontalAlignment)Enum.Parse(typeof(System.Windows.Forms.HorizontalAlignment), obj.ToString());
info.SetValue(ctl, alignment);
}
}
}
......@@ -382,6 +382,8 @@ namespace BLL
}
public void DrawTextBackground(Dictionary<string, string> key)
{
}
}
}
......@@ -9,10 +9,20 @@ using System.Text;
using System.Collections.Generic;
using System.Web.Script.Serialization;
using Model;
using Asa.FaceControl;
using Asa;
using Newtonsoft.Json;
using System.Windows.Forms;
using System.IO;
using static BLL.Extension;
using System.Web.UI;
using Asa.FaceControl;
using System.Configuration;
using System.Linq;
using static BLL.Replacekeywords;
using RestSharp;
using System.Web;
using Http = Model.Http;
using System.Drawing;
namespace BLL
{
......@@ -75,7 +85,16 @@ namespace BLL
for (int i = 0; i < extensions.Count; i++)
{
if (key.ContainsKey(extensions[i].Key))
extensions[i].Control.Text = key[extensions[i].Key];
extensions[i].Control.Text = key[extensions[i].Key].Replace("<OCR>", "");/*.Replace("<OCR>","")*/;
//if (key.ContainsKey(extensions[i].Key))
//{
// if (key[extensions[i].Key].StartsWith("<OCR>"))
// {
// extensions[i].Control.BackColor = Color.Yellow;
// }
// extensions[i].Control.Text = key[extensions[i].Key].Replace("<OCR>", "");
//}
}
}
Application.DoEvents();
......@@ -113,7 +132,15 @@ namespace BLL
for (int i = 0; i < extensions.Count; i++)
{
if (key.ContainsKey(extensions[i].Key))
extensions[i].Control.Text = key[extensions[i].Key];
extensions[i].Control.Text = key[extensions[i].Key].Replace("<OCR>", "");/*.Replace("<OCR>", "");*/
//if (key.ContainsKey(extensions[i].Key))
//{
// if (key[extensions[i].Key].StartsWith("<OCR>"))
// {
// extensions[i].Control.BackColor = Color.Yellow;
// }
// extensions[i].Control.Text = key[extensions[i].Key].Replace("<OCR>", ""); ;
//}
}
}
if (!updatereelid(key, out errmsg))
......@@ -132,8 +159,7 @@ namespace BLL
{
//PrintLabel(null, EventArgs.Empty);
}
SaveRetrospect?.Invoke(key);
SaveRetrospect?.Invoke(key);
return true;
}
bool updatereelid(Dictionary<string, string> key, out string errmsg)
......@@ -221,12 +247,13 @@ namespace BLL
int reelID = 1;
try
{
var reelidfile = FilePath.CONFIG_REELID;
var reelidfile = FilePath.CONFIG_REELID;
if (config.ReelIDAutoResetByDate)
{
Directory.CreateDirectory(reelidfile + "_dir");
reelidfile = Path.Combine(FilePath.CONFIG_REELID + "_dir", DateTime.Now.ToString("yyyyMMdd"));
}
if (File.Exists(reelidfile))
{
string text = File.ReadAllText(reelidfile);
......@@ -332,11 +359,199 @@ namespace BLL
}
else
return false;
}
// 定义动态按钮点击事件处理方法
private void DynamicButtonClick(object sender, EventArgs e)
{
var listexten= extensions.Where(a => a.Type == "TextBox").ToDictionary(kvp => kvp.Key, kvp => kvp.Control.Text);
string jsondata = Replacekeywordss(listexten);
ResponseDatas lists = JsonConvert.DeserializeObject<ResponseDatas>(jsondata);
foreach (var responseItems in lists.Items)
{
foreach (var item in responseItems)
{
foreach (var items in extensions.Where(a => a.Type == "TextBox"))
{
if (items.Key == item.Name)
{
items.Control.Text = item.Value.ToString();
}
//items.Control.Text = item.Value.ToString();
}
}
}
}
#region
//public void Replacekeywordss()
//{
//try
//{
// //未找到任何关键字信息
// if (lastkey == null || lastkey.Count < 0)
// {
// throw new Exception("未找到任何关键字信息,请重新设置!");
// }
// string Tokensurl = "";
// // 判断并处理 grn_num 和 grn_line
// if (lastkey.ContainsKey("grn_num") && lastkey.ContainsKey("grn_line"))
// {
// string grn_numValue = lastkey["grn_num"];
// string grn_lineValue = lastkey["grn_line"];
// // 发起 HTTP 请求,获取 token 的值
// string tokensValue = Http.Get(Tokensurl);
// if (string.IsNullOrEmpty(tokensValue))
// {
// LogNet.log.Info($"{Tokensurl}:获取token为空!");
// throw new Exception("获取tokens失败!");
// }
// string ido = "IR_SLAPIs";
// string props = "GRNNUM,GRNLine,vendnum,vendor_name,po_num,po_line,po_release,item_code,Rating,qty_ordered,qty_received,rcvd_dat";
// string customloadmethodparms = $"{grn_numValue},,{grn_lineValue},";
// string url = $"http://IRI002S/IDORequestService/MGRestService.svc/json/{ido}/{props}/adv?customloadmethod=IR_GetGrnDetailSp&customloadmethodparms={customloadmethodparms}&loadtype=NEXT&readonly=true&rowcap=-1";
// // 发起第二个 HTTP 请求,并处理返回值
// string result = Http.SendGetRequest(url, tokensValue);
// var lists = JsonConvert.DeserializeObject<ResponseData>(result);
// if (lists.MessageCode != 0 || lists.Items.Count == 0)
// {
// throw new Exception($"{lists.Message}");
// }
// LogNet.log.Info($"{url}:返回数据{lists}");
// // 处理 result 返回的数据
// // 刷新关键字的值
// foreach (var item in lists.Items)
// {
// for (int i = 0; i < extensions.Count; i++)
// {
// if (extensions[i].Key == item.Name)
// {
// extensions[i].Control.Text = item.Value.ToString();
// }
// }
// }
// }
//}
//catch (Exception ex)
//{
// MessageBox.Show(ex.Message,"提示");
// //throw new Exception(ex.Message);
//}
// try
// {
// //是否需要请求token
// string RequestMethod = ConfigurationManager.AppSettings["RequestMethod"];
// //是否需要请求token
// bool isTokenRequired = Convert.ToBoolean(ConfigurationManager.AppSettings["isTokenRequired"]);
// //请求tokenurl
// string tokenurl = ConfigurationManager.AppSettings["tokenurl"];
// //请求正常数据
// string url = ConfigurationManager.AppSettings["url"];
// //关键字,请用,号分割
// string keywords = ConfigurationManager.AppSettings["keywords"];
// if (isTokenRequired && tokenurl != null)
// {
// throw new Exception("需要请求token,请填写tokenurl!");
// }
// if (string.IsNullOrWhiteSpace(url) || string.IsNullOrWhiteSpace(keywords))
// {
// throw new Exception("URL和关键字不能为空");
// }
// //用户提供需要更换的关键字
// var UserKeyword = keywords.Split(',').ToList();
// //未找到任何ns100设置的关键字信息
// if (lastkey == null || lastkey.Count < 0)
// {
// throw new Exception("未找到任何关键字信息,请重新设置!");
// }
// //判断ns100关键字,是否包含用户提供的关键字
// bool allinkey = UserKeyword.All(value => lastkey.ContainsKey(value));
// if (!allinkey)
// {
// throw new Exception($"关键字未包含;{keywords}");
// }
// ResponseData lists = null;
// if (isTokenRequired)
// {
// string tokensValue = Http.Get(tokenurl);
// if (string.IsNullOrEmpty(tokensValue))
// {
// LogNet.log.Info($"{tokenurl}:获取token为空!");
// throw new Exception("获取tokens失败!");
// }
// string ido = "IR_SLAPIs";
// string props = "GRNNUM,GRNLine,vendnum,vendor_name,po_num,po_line,po_release,item_code,Rating,qty_ordered,qty_received,rcvd_dat";
// string customloadmethodparms = $"{UserKeyword},";
// //string url = $"http://IRI002S/IDORequestService/MGRestService.svc/json/{ido}/{props}/adv?customloadmethod=IR_GetGrnDetailSp&customloadmethodparms={customloadmethodparms}&loadtype=NEXT&readonly=true&rowcap=-1";
// url += $"?key={customloadmethodparms}";
// LogNet.log.Info($"请求url:{url}");
// string result = Http.SendGetRequest(url, tokensValue);
// lists = JsonConvert.DeserializeObject<ResponseData>(result);
// if (lists.MessageCode != 0 || lists.Items.Count == 0)
// {
// throw new Exception($"{lists.Message}");
// }
// LogNet.log.Info($"{url}:返回数据{lists}");
// }
// else
// {
// string customloadmethodparms = $"{UserKeyword},";
// url += $"?key={customloadmethodparms}";
// LogNet.log.Info($"请求url:{url}");
// string result = Http.Requestdata(url);
// lists = JsonConvert.DeserializeObject<ResponseData>(result);
// if (lists.MessageCode != 0 || lists.Items.Count == 0)
// {
// throw new Exception($"{lists.Message}");
// }
// LogNet.log.Info($"{url}:返回数据{lists}");
// }
// foreach (var item in lists.Items)
// {
// for (int i = 0; i < extensions.Count; i++)
// {
// if (extensions[i].Key == item.Name)
// {
// extensions[i].Control.Text = item.Value.ToString();
// }
// }
// }
// }
// catch (Exception ex)
// {
// MessageBox.Show(ex.Message); ;
// }
//}
#endregion
public void DrawTextBackground(Dictionary<string, string> key)
{
if (extensions != null && !extensions[0].Control.InvokeRequired)
{
bool focused = false; // 用于跟踪是否已经聚焦到第一个匹配的文本框
for (int i = 0; i < extensions.Count; i++)
{
if (key.ContainsKey(extensions[i].Key))
{
if (key[extensions[i].Key].StartsWith("<OCR>"))
{
extensions[i].Control.ForeColor = Color.Yellow;
}
if (!focused && key[extensions[i].Key].StartsWith("<OCR>"))
{
extensions[i].Control.Focus();
focused = true; // 已经聚焦,不再继续
}
}
}
}
Application.DoEvents();
}
}
}
......@@ -383,7 +383,8 @@ namespace BLL
}
public void DrawTextBackground(Dictionary<string, string> key)
{
}
}
}
......@@ -271,6 +271,10 @@ namespace BLL
return "";
}
public void DrawTextBackground(Dictionary<string, string> key)
{
}
public class InitPPID_Request_DPS
{
/*
......
......@@ -531,7 +531,8 @@ namespace BLL
}
}
public void DrawTextBackground(Dictionary<string, string> key)
{
}
}
}
......@@ -362,6 +362,9 @@ namespace BLL
//new FaceMessageBox("", Language.Dialog(LanguageDialogKey.SAVE_SUCCEED), System.Windows.Forms.MessageBoxButtons.OK).ShowDialog();
}
public void DrawTextBackground(Dictionary<string, string> key)
{
}
}
}
......@@ -445,7 +445,7 @@ namespace BLL
foreach (string regCode in regOcrCodes.Split(';'))
{
if (string.IsNullOrEmpty(regCode)) continue;
var x = new BarcodeInfo() { Text = regCode, CodeType = Setting_Str.OCR };
var x = new BarcodeInfo() { Text = regCode, CodeType = Setting_Str.OCR };
Dictionary<string, string> matchKey = CodeMatch(x, codeMatch);
if (matchKey != null)
{
......@@ -453,9 +453,10 @@ namespace BLL
{
if (!keyword.ContainsKey(key))
{
keyword.Add(key, matchKey[key]);
string value = $"<OCR>{matchKey[key]}";
keyword.Add(key, value);
ocrCount--;
LogNet.log.Info($"{mateTemp[index].Name} OCR匹配 [{key}={matchKey[key]}]");
LogNet.log.Info($"{mateTemp[index].Name} OCR匹配 [{key}={value}]");
}
}
......
using DAL;
using DocumentFormat.OpenXml.Office2016.Drawing.Command;
using DocumentFormat.OpenXml.Wordprocessing;
using Model;
using Newtonsoft.Json.Linq;
using RestSharp;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Security.Policy;
using System.Text;
using System.Web;
using ZXing.Aztec.Internal;
using Http = Model.Http;
namespace BLL
{
//请求处理关键字
public class Replacekeywords
{
public static string Replacekeywordss(Dictionary<string,string> macroKey)
{
string jsondata = null;
Config config = new Config();
#region 验证配置数据是否正确
//未找到任何ns100设置的关键字信息
if (macroKey == null || macroKey.Count < 0)
{
LogNet.log.Error("更换关键字:未找到任何关键字信息,请重新设置!");
throw new Exception("未找到任何关键字信息,请重新设置!");
}
if (config.Method != Method.POST && config.Method != Method.GET)
{
LogNet.log.Error("更换关键字:请求方式参数不正确!");
throw new Exception("请求方式参数不正确!");
}
if (config.IsTokenRequired && config.Tokenurl == null)
{
LogNet.log.Error("更换关键字:需要请求token,请填写tokenurl!");
throw new Exception("需要请求token,请填写tokenurl!");
}
if (string.IsNullOrWhiteSpace(config.Url) || config.KeyWords.Length<0)
{
LogNet.log.Error("更换关键字:URL和关键字不能为空");
throw new Exception("URL和关键字不能为空");
}
config.filteredData= macroKey
.Where(kvp => config.KeyWords.Contains(kvp.Key))
.ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
//判断结果中是否包含指定关键字
bool allinkey = config.filteredData.Count > 0; /*== config.KeyWords.Count();*/
if (!allinkey)
{
LogNet.log.Error($"更换关键字:关键字未包含;{config.KeyWords}");
throw new Exception($"关键字未包含;{config.KeyWords}");
}
#endregion
#region 根据请求方式,设置请求数据
// 创建一个请求
var request = new RestRequest(config.Method);
// 需要token
if (config.IsTokenRequired)
{
string responseJson = Http.GetToken(config.Tokenurl);
// 解析 JSON
JObject jsonObject = JObject.Parse(responseJson);
// 提取 Token 的值
string tokenValue = (string)jsonObject["Token"];
request.AddHeader("Authorization", tokenValue);
LogNet.log.Error($"更换关键字:请求token:{tokenValue}");
}
jsondata = SendHttpRequest(config, request);
if (string.IsNullOrWhiteSpace(jsondata))
{
throw new Exception("返回信息为空请检查请求!");
}
#endregion
return jsondata;
}
public static string SendHttpRequest(Config config, RestRequest request)
{
string json = "";
if (request.Method == Method.GET)
{
List<string> parstringParts = new List<string>();
foreach (var item in config.KeyWords) // 客户指定的关键字
{
// 尝试从识别出来的关键字数据中获取值
if (config.filteredData.TryGetValue(item, out var value))
{
parstringParts.Add(value);
}
else
{
// 如果未找到值,则使用关键字的分割后数据
string[] parts = item.Split('=');
if (parts.Length > 1)
{
parstringParts.Add(parts[1]);
}
}
}
string parstring = string.Join(",", parstringParts);
//parstring = "Y023070966,WPG0001,1,infobar";
config.Url+= $"&customloadmethodparms={parstring}&loadtype=NEXT&readonly=true&rowcap=-1";
var client = new RestClient(config.Url);
LogNet.log.Error($"更换关键字:请求Url:{config.Url}");
// 禁用自动重定向
client.FollowRedirects = false;
var response = client.Execute(request);
if ((int)response.StatusCode >= 300 && (int)response.StatusCode < 400)
{
// 获取重定向后的新 URL
string newUrl = response.Headers.FirstOrDefault(header => header.Name.Equals("Location", StringComparison.OrdinalIgnoreCase))?.Value.ToString();
// 创建一个新的 RestClient 实例,用于新的 URL
var newClient = new RestClient(newUrl);
// 发送请求到新的 URL
var newResponse = newClient.Execute(request);
json = newResponse.Content;
}
else
{
json = response.Content;
}
}
LogNet.log.Error($"更换关键字:{json}");
return json;
}
public class Config
{
//是否需要请求token
public Method Method { get; set; } = ConfigurationManager.AppSettings["RequestMethod"] == "POST" ? Method.POST : Method.GET;
//是否需要请求token
public string ContentType { get; set; } = ConfigurationManager.AppSettings["ContentType"];
//是否需要请求token
public bool IsTokenRequired { get; set; } = Convert.ToBoolean(ConfigurationManager.AppSettings["IsTokenRequired"]);
//请求tokenurl
public string Tokenurl { get; set; } = ConfigurationManager.AppSettings["Tokenurl"];
//请求正常数据
public string Url { get; set; } = ConfigurationManager.AppSettings["Url"];
//关键字,请用,号分割
public string[] KeyWords { get; set; } = ConfigurationManager.AppSettings["KeyWords"].Split(',');
/// <summary>
/// 此字段在需要存放,请求数据的键值对
/// </summary>
public Dictionary<string, string> filteredData { get; set; }
}
public class ResponseItem
{
public string Name { get; set; }
public string Value { get; set; }
}
public class ResponseDatas
{
public List<List<ResponseItem>> Items { get; set; }
public string Message { get; set; }
public int MessageCode { get; set; }
}
}
}
......@@ -6,5 +6,6 @@
<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="RestSharp" version="106.11.7" targetFramework="net472" />
<package id="ZXing.Net" version="0.16.6" targetFramework="net461" requireReinstallation="true" />
</packages>
\ No newline at end of file
......@@ -20,6 +20,7 @@ namespace ExtensionGroup
//private System.IO.FileStream streamID;
public event IExtension.PrintDelegate Printing;
public event IExtension.PrintDelegate SaveRetrospect;
public Alcoelectro()
{
......@@ -385,6 +386,9 @@ namespace ExtensionGroup
}
public bool SetKey(string[] originalCode, Dictionary<string, string> key, bool hasMatch, out string errmsg)
{
throw new NotImplementedException();
}
}
}
......@@ -37,10 +37,15 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Asa.Face.Control">
<HintPath>..\..\..\DLL\FaceControl\Asa.Face.Control.dll</HintPath>
<HintPath>..\..\..\asa\FaceControl\Test\bin\Debug\Asa.Face.Control.dll</HintPath>
</Reference>
<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>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" />
......@@ -66,5 +71,8 @@
<Name>Model</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
......@@ -9,6 +9,7 @@ using System.Linq;
using Model;
using Asa.FaceControl;
using System.Web.Script.Serialization;
using NLog.Fluent;
namespace ExtensionGroup
{
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="NLog" version="5.2.3" targetFramework="net48" />
</packages>
\ No newline at end of file
using Newtonsoft.Json;
using RestSharp;
using RestSharp.Validation;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web;
namespace Model
{
......@@ -34,7 +38,7 @@ namespace Model
RestRequest request = new(Method.GET);
IRestResponse response = client.Execute(request);
string s = response.Content;
///LogNet.log.Info($"[GET][URL:{url}][Return:{s}]");
LogNet.log.Info($"[GET][URL:{url}][Return:{s}]");
return FormatContent(s);
}
......@@ -90,9 +94,21 @@ namespace Model
s = s.Replace(" ", " ");
return s;
}
}
public static string GetToken(string url)
{
RestClient client = new(url) { Timeout = 60000 };
RestRequest request = new(Method.GET);
request.AddHeader("Userid", "app_neotel");
request.AddHeader("Password", "Neotel@478*");
request.AddHeader("Accept", "application/json");
request.AddHeader("Cookie", "ASP.NET_SessionId=5jxc55snxa5jtomdoutiw1mi");
IRestResponse response = client.Execute(request);
string s = response.Content;
LogNet.log.Info($"[GET][URL:{url}][Return:{s}]");
return FormatContent(s);
}
}
public class CustSerialize : RestSharp.Serialization.IRestSerializer
{
......@@ -117,5 +133,5 @@ namespace Model
return JsonConvert.SerializeObject(parameter.Value);
}
}
}
}
......@@ -5,6 +5,7 @@ namespace Model
{
public interface IExtension
{
public delegate void PrintDelegate(Dictionary<string, string> content);
public event PrintDelegate Printing;
public event PrintDelegate SaveRetrospect;
......@@ -19,6 +20,6 @@ namespace Model
public void Dispose();
public abstract void DrawTextBackground(Dictionary<string, string> key);
}
}
......@@ -44,9 +44,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedDll\Asa.Camera.VisionLib.dll</HintPath>
</Reference>
<Reference Include="Asa.Face.Control, Version=1.0.8386.23079, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Asa.Face.Control, Version=1.0.8621.29649, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedDll\Asa.Face.Control.dll</HintPath>
<HintPath>..\..\..\asa\FaceControl\FaceControl\bin\Debug\Asa.Face.Control.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>
......
......@@ -5,6 +5,21 @@
</startup>
<appSettings>
<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="http://myprai.iriichi.com.my:8888/IDORequestService/MGRestService.svc/json/token/IRIICHI"/>
<add key="Url" value="http://myprai.iriichi.com.my:8888/IDORequestService/MGRestService.svc/json/IR_SLAPIs/GRNNUM,GRNLine,vendnum,vendor_name,po_num,po_line,po_release,item_code,Rating,qty_ordered,qty_received,rcvd_date/adv?customloadmethod=IR_GetGrnDetailSp"/>
<!--关键字value请用,号隔开-->
<add key="KeyWords" value="grn_num,vend_num,grn_line,infobar=0"/>
<!--服务器查询PN_结束-->
<add key="StartServiceName" value=""/>
<add key="StartServicePath" value=""/>
</appSettings>
<system.serviceModel>
<bindings>
......
namespace SmartScan.Form
{
partial class FrmDrawText
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmDrawText));
this.faceButton1 = new Asa.FaceControl.FaceButton();
this.faceButton2 = new Asa.FaceControl.FaceButton();
this.SuspendLayout();
//
// faceButton1
//
this.faceButton1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.faceButton1.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.faceButton1.BorderWidth = 2;
this.faceButton1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.faceButton1.HoldPress = false;
this.faceButton1.Location = new System.Drawing.Point(58, 155);
this.faceButton1.Name = "faceButton1";
this.faceButton1.Padding = new System.Windows.Forms.Padding(3);
this.faceButton1.Size = new System.Drawing.Size(239, 64);
this.faceButton1.TabIndex = 6;
this.faceButton1.Text = "OK";
this.faceButton1.Click += new System.EventHandler(this.faceButton1_Click);
//
// faceButton2
//
this.faceButton2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.faceButton2.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.faceButton2.BorderWidth = 2;
this.faceButton2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.faceButton2.HoldPress = false;
this.faceButton2.Location = new System.Drawing.Point(394, 155);
this.faceButton2.Name = "faceButton2";
this.faceButton2.Padding = new System.Windows.Forms.Padding(3);
this.faceButton2.Size = new System.Drawing.Size(239, 64);
this.faceButton2.TabIndex = 7;
this.faceButton2.Text = "Modfiy";
this.faceButton2.Click += new System.EventHandler(this.faceButton2_Click);
//
// FrmDrawText
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(696, 335);
this.Controls.Add(this.faceButton2);
this.Controls.Add(this.faceButton1);
this.Icon = ((System.Drawing.Bitmap)(resources.GetObject("$this.Icon")));
this.Name = "FrmDrawText";
this.Text = "含有OCR结果";
this.Controls.SetChildIndex(this.faceButton1, 0);
this.Controls.SetChildIndex(this.faceButton2, 0);
this.ResumeLayout(false);
}
#endregion
private Asa.FaceControl.FaceButton faceButton1;
private Asa.FaceControl.FaceButton faceButton2;
}
}
\ No newline at end of file
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.Form
{
public partial class FrmDrawText : Asa.FaceControl.FaceFormFixed
{
public FrmDrawText()
{
InitializeComponent();
}
private void faceButton1_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
this.Close();
}
private void faceButton2_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
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>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
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
</value>
</data>
</root>
\ No newline at end of file
......@@ -122,7 +122,5 @@ namespace SmartScan
{
if (back) Hide();
}
}
}
......@@ -13,6 +13,8 @@ using System.Web.Script.Serialization;
using System.Threading.Tasks;
using DocumentFormat.OpenXml.Drawing.Charts;
using System.IO;
using System.Web.UI.WebControls;
using System.Windows.Interop;
namespace SmartScan
{
......@@ -456,5 +458,23 @@ namespace SmartScan
Common.frmWaitting.SetMessage(msg);
Application.DoEvents();
}
public void DrawTextForm(Dictionary<string,string> valuePairs)
{
//
if (Common.frmMain.InvokeRequired)
{
Common.frmMain.Invoke(delegate ()
{
DrawTextForm(valuePairs);
});
return;
}
//BLLCommon.SCMM.ShowMsg(msg, 3, msgType.INFO);
//Common.frmWaitting.SetMessage(msg);
BLLCommon.extension.DrawTextBackground(valuePairs);
Application.DoEvents();
}
}
}
......@@ -45,6 +45,7 @@ namespace SmartScan
this.LstRecord = new Asa.FaceControl.FaceListBox();
this.LblCode = new Asa.FaceControl.FaceLabel();
this.LblDateRange = new Asa.FaceControl.FaceLabel();
this.butt_startservice = new Asa.FaceControl.FaceButton();
((System.ComponentModel.ISupportInitialize)(this.PicLabel)).BeginInit();
this.tableLayoutPanel1.SuspendLayout();
this.SuspendLayout();
......@@ -55,7 +56,7 @@ namespace SmartScan
this.DtpUpper.Font = new System.Drawing.Font("宋体", 12F);
this.DtpUpper.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.DtpUpper.Location = new System.Drawing.Point(15, 120);
this.DtpUpper.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.DtpUpper.Margin = new System.Windows.Forms.Padding(4);
this.DtpUpper.Name = "DtpUpper";
this.DtpUpper.ShowCheckBox = true;
this.DtpUpper.Size = new System.Drawing.Size(292, 30);
......@@ -67,7 +68,7 @@ namespace SmartScan
this.DtpLower.Font = new System.Drawing.Font("宋体", 12F);
this.DtpLower.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.DtpLower.Location = new System.Drawing.Point(15, 160);
this.DtpLower.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.DtpLower.Margin = new System.Windows.Forms.Padding(4);
this.DtpLower.Name = "DtpLower";
this.DtpLower.ShowCheckBox = true;
this.DtpLower.Size = new System.Drawing.Size(292, 30);
......@@ -79,10 +80,10 @@ namespace SmartScan
this.TxtCode.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.TxtCode.BorderWidth = 2;
this.TxtCode.Location = new System.Drawing.Point(15, 251);
this.TxtCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.TxtCode.Margin = new System.Windows.Forms.Padding(4);
this.TxtCode.MaxLength = 32767;
this.TxtCode.Name = "TxtCode";
this.TxtCode.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.TxtCode.Padding = new System.Windows.Forms.Padding(4);
this.TxtCode.SelectedText = "";
this.TxtCode.SelectionLength = 0;
this.TxtCode.SelectionStart = 0;
......@@ -99,9 +100,9 @@ namespace SmartScan
this.BtnSelect.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnSelect.HoldPress = false;
this.BtnSelect.Location = new System.Drawing.Point(15, 315);
this.BtnSelect.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.BtnSelect.Margin = new System.Windows.Forms.Padding(4);
this.BtnSelect.Name = "BtnSelect";
this.BtnSelect.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.BtnSelect.Padding = new System.Windows.Forms.Padding(4);
this.BtnSelect.Size = new System.Drawing.Size(293, 56);
this.BtnSelect.TabIndex = 9;
this.BtnSelect.Text = "查询";
......@@ -115,9 +116,9 @@ namespace SmartScan
this.BtnExport.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnExport.HoldPress = false;
this.BtnExport.Location = new System.Drawing.Point(15, 379);
this.BtnExport.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.BtnExport.Margin = new System.Windows.Forms.Padding(4);
this.BtnExport.Name = "BtnExport";
this.BtnExport.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.BtnExport.Padding = new System.Windows.Forms.Padding(4);
this.BtnExport.Size = new System.Drawing.Size(293, 56);
this.BtnExport.TabIndex = 10;
this.BtnExport.Text = "导出";
......@@ -131,9 +132,9 @@ namespace SmartScan
this.BtnExportAll.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnExportAll.HoldPress = false;
this.BtnExportAll.Location = new System.Drawing.Point(15, 442);
this.BtnExportAll.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.BtnExportAll.Margin = new System.Windows.Forms.Padding(4);
this.BtnExportAll.Name = "BtnExportAll";
this.BtnExportAll.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.BtnExportAll.Padding = new System.Windows.Forms.Padding(4);
this.BtnExportAll.Size = new System.Drawing.Size(293, 56);
this.BtnExportAll.TabIndex = 11;
this.BtnExportAll.Text = "导出所有";
......@@ -147,9 +148,9 @@ namespace SmartScan
this.PicShow.Dock = System.Windows.Forms.DockStyle.Fill;
this.PicShow.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.PicShow.Location = new System.Drawing.Point(4, 4);
this.PicShow.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.PicShow.Margin = new System.Windows.Forms.Padding(4);
this.PicShow.Name = "PicShow";
this.PicShow.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.PicShow.Padding = new System.Windows.Forms.Padding(4);
this.tableLayoutPanel1.SetRowSpan(this.PicShow, 5);
this.PicShow.Size = new System.Drawing.Size(764, 697);
this.PicShow.TabIndex = 12;
......@@ -160,7 +161,7 @@ namespace SmartScan
this.PicLabel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(40)))), ((int)(((byte)(40)))), ((int)(((byte)(40)))));
this.PicLabel.Dock = System.Windows.Forms.DockStyle.Fill;
this.PicLabel.Location = new System.Drawing.Point(776, 4);
this.PicLabel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.PicLabel.Margin = new System.Windows.Forms.Padding(4);
this.PicLabel.Name = "PicLabel";
this.PicLabel.Size = new System.Drawing.Size(507, 177);
this.PicLabel.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
......@@ -177,9 +178,9 @@ namespace SmartScan
this.LstCode.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LstCode.ItemHeight = 40;
this.LstCode.Location = new System.Drawing.Point(776, 233);
this.LstCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LstCode.Margin = new System.Windows.Forms.Padding(4);
this.LstCode.Name = "LstCode";
this.LstCode.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LstCode.Padding = new System.Windows.Forms.Padding(4);
this.LstCode.SelectedIndex = -1;
this.LstCode.Size = new System.Drawing.Size(507, 207);
this.LstCode.TabIndex = 17;
......@@ -195,9 +196,9 @@ namespace SmartScan
this.LstLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LstLabel.ItemHeight = 40;
this.LstLabel.Location = new System.Drawing.Point(776, 492);
this.LstLabel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LstLabel.Margin = new System.Windows.Forms.Padding(4);
this.LstLabel.Name = "LstLabel";
this.LstLabel.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LstLabel.Padding = new System.Windows.Forms.Padding(4);
this.LstLabel.SelectedIndex = -1;
this.LstLabel.Size = new System.Drawing.Size(507, 209);
this.LstLabel.TabIndex = 18;
......@@ -218,7 +219,7 @@ namespace SmartScan
this.tableLayoutPanel1.Controls.Add(this.LblAllCode, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.LblAllLabel, 1, 3);
this.tableLayoutPanel1.Location = new System.Drawing.Point(316, 69);
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 5;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30F));
......@@ -237,9 +238,9 @@ namespace SmartScan
this.LblAllCode.Dock = System.Windows.Forms.DockStyle.Fill;
this.LblAllCode.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblAllCode.Location = new System.Drawing.Point(776, 189);
this.LblAllCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LblAllCode.Margin = new System.Windows.Forms.Padding(4);
this.LblAllCode.Name = "LblAllCode";
this.LblAllCode.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LblAllCode.Padding = new System.Windows.Forms.Padding(4);
this.LblAllCode.Size = new System.Drawing.Size(507, 36);
this.LblAllCode.TabIndex = 19;
this.LblAllCode.Text = "faceLabel1";
......@@ -253,9 +254,9 @@ namespace SmartScan
this.LblAllLabel.Dock = System.Windows.Forms.DockStyle.Fill;
this.LblAllLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblAllLabel.Location = new System.Drawing.Point(776, 448);
this.LblAllLabel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LblAllLabel.Margin = new System.Windows.Forms.Padding(4);
this.LblAllLabel.Name = "LblAllLabel";
this.LblAllLabel.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LblAllLabel.Padding = new System.Windows.Forms.Padding(4);
this.LblAllLabel.Size = new System.Drawing.Size(507, 36);
this.LblAllLabel.TabIndex = 20;
this.LblAllLabel.Text = "faceLabel2";
......@@ -269,12 +270,12 @@ namespace SmartScan
this.LstRecord.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.LstRecord.BorderWidth = 2;
this.LstRecord.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LstRecord.Location = new System.Drawing.Point(15, 506);
this.LstRecord.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LstRecord.Location = new System.Drawing.Point(15, 568);
this.LstRecord.Margin = new System.Windows.Forms.Padding(4);
this.LstRecord.Name = "LstRecord";
this.LstRecord.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LstRecord.Padding = new System.Windows.Forms.Padding(4);
this.LstRecord.SelectedIndex = -1;
this.LstRecord.Size = new System.Drawing.Size(293, 268);
this.LstRecord.Size = new System.Drawing.Size(293, 206);
this.LstRecord.TabIndex = 19;
this.LstRecord.SelectedIndexChanged += new System.EventHandler(this.LstRecord_SelectedIndexChanged);
//
......@@ -285,9 +286,9 @@ namespace SmartScan
this.LblCode.BorderWidth = 0;
this.LblCode.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblCode.Location = new System.Drawing.Point(15, 200);
this.LblCode.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LblCode.Margin = new System.Windows.Forms.Padding(4);
this.LblCode.Name = "LblCode";
this.LblCode.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LblCode.Padding = new System.Windows.Forms.Padding(4);
this.LblCode.Size = new System.Drawing.Size(293, 44);
this.LblCode.TabIndex = 20;
this.LblCode.Text = "条码";
......@@ -300,19 +301,36 @@ namespace SmartScan
this.LblDateRange.BorderWidth = 0;
this.LblDateRange.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblDateRange.Location = new System.Drawing.Point(15, 69);
this.LblDateRange.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LblDateRange.Margin = new System.Windows.Forms.Padding(4);
this.LblDateRange.Name = "LblDateRange";
this.LblDateRange.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LblDateRange.Padding = new System.Windows.Forms.Padding(4);
this.LblDateRange.Size = new System.Drawing.Size(293, 44);
this.LblDateRange.TabIndex = 21;
this.LblDateRange.Text = "日期";
this.LblDateRange.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// butt_startservice
//
this.butt_startservice.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.butt_startservice.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.butt_startservice.BorderWidth = 2;
this.butt_startservice.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.butt_startservice.HoldPress = false;
this.butt_startservice.Location = new System.Drawing.Point(17, 505);
this.butt_startservice.Name = "butt_startservice";
this.butt_startservice.Padding = new System.Windows.Forms.Padding(3);
this.butt_startservice.Size = new System.Drawing.Size(292, 56);
this.butt_startservice.TabIndex = 22;
this.butt_startservice.Text = "启动服务";
this.butt_startservice.Visible = false;
this.butt_startservice.Click += new System.EventHandler(this.butt_startservice_Click);
//
// FrmRetrospect
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1617, 788);
this.Controls.Add(this.butt_startservice);
this.Controls.Add(this.LblDateRange);
this.Controls.Add(this.LblCode);
this.Controls.Add(this.tableLayoutPanel1);
......@@ -324,7 +342,7 @@ namespace SmartScan
this.Controls.Add(this.DtpLower);
this.Controls.Add(this.DtpUpper);
this.Icon = global::SmartScan.Properties.Resources.App;
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "FrmRetrospect";
this.Padding = new System.Windows.Forms.Padding(11, 10, 11, 10);
this.Text = "FrmRetrospect";
......@@ -339,6 +357,7 @@ namespace SmartScan
this.Controls.SetChildIndex(this.tableLayoutPanel1, 0);
this.Controls.SetChildIndex(this.LblCode, 0);
this.Controls.SetChildIndex(this.LblDateRange, 0);
this.Controls.SetChildIndex(this.butt_startservice, 0);
((System.ComponentModel.ISupportInitialize)(this.PicLabel)).EndInit();
this.tableLayoutPanel1.ResumeLayout(false);
this.ResumeLayout(false);
......@@ -363,5 +382,6 @@ namespace SmartScan
private Asa.FaceControl.FaceLabel LblAllCode;
private Asa.FaceControl.FaceLabel LblAllLabel;
private Asa.FaceControl.FaceLabel LblDateRange;
private Asa.FaceControl.FaceButton butt_startservice;
}
}
\ No newline at end of file
......@@ -12,6 +12,9 @@ using System.Web.UI.WebControls;
using DocumentFormat.OpenXml.ExtendedProperties;
using DocumentFormat.OpenXml.Wordprocessing;
using BLL;
using System.Configuration;
using System.Diagnostics;
using System.IO;
namespace SmartScan
{
......@@ -130,6 +133,11 @@ namespace SmartScan
{
DtpLower.Value = DateTime.Now.Date;
DtpUpper.Value = DateTime.Now.Date;
if (ConfigurationManager.AppSettings["CustomerName"] == "1181")
{
butt_startservice.Visible=true;
LstRecord.Height = 206;
}
}
private void BtnSelect_Click(object sender, EventArgs e)
......@@ -412,5 +420,23 @@ namespace SmartScan
}
}
private void butt_startservice_Click(object sender, EventArgs e)
{
Process p = new Process();
var pss = Process.GetProcessesByName(ConfigurationManager.AppSettings["StartServiceName"]);
if (pss.Length > 0)
return;
var f = ConfigurationManager.AppSettings["StartServicePath"];
if (!File.Exists(f))
throw new Exception("未找到服务文件!");
p.StartInfo = new ProcessStartInfo
{
FileName = f,
Verb = "runas" // 这里设置为 "runas" 表示以管理员身份运行
};
p.Start();
}
}
}
using Asa.FaceControl;
using BLL;
using Model;
using SmartScan.Form;
using System;
using System.Collections.Generic;
using System.Drawing;
......@@ -99,14 +100,14 @@ namespace SmartScan
{
AddCodeCenter();
});
Common.frmMain.SetWaittingMsg(Language.Dialog("MaterialTemplateMatching"));//模版匹配...
Common.frmMain.SetWaittingMsg(Language.Dialog("MaterialTemplateMatching"));//模版匹配...
bool hasMatch = MatchingTemplate();
Common.frmMain.SetWaittingMsg(Language.Dialog("MaterialProcessing"));//计算结果...
//Common.frmMain.SetWaittingMsg(Language.Dialog("MaterialProcessing"));//计算结果...
Common.frmMain.Invoke(delegate ()
{
SetKey(hasMatch);
});
isTouch = false;
LogNet.log.Info("Work scan is done");
......@@ -244,8 +245,7 @@ namespace SmartScan
if (string.IsNullOrEmpty(filename))
return false;
Bitmap bmp = null;
bmp = ObjConversion.ReadImageFile(filename); ;
bmp = ObjConversion.ReadImageFile(filename);
workCodeInfo = BLLCommon.cameraVision.GetBarCode(bmp);
Common.frmMain.Invoke(delegate ()
{
......@@ -290,6 +290,17 @@ namespace SmartScan
BLL.MatchAnalysis.ShowResult();
Common.frmMain.Invoke(delegate ()
{
if (workCodeKeyword.Any(a => a.Value.StartsWith("<OCR>")))
{
FrmDrawText frmDraw = new FrmDrawText();
if (frmDraw.ShowDialog() == DialogResult.OK)
{
BLLCommon.extension.DrawTextBackground(workCodeKeyword);
}
}
});
Common.frmMain.Invoke(delegate ()
{
if (rtn)
{
LogNet.log.Info("模板匹配 " + mateName + ",关键字个数 " + workCodeKeyword.Count);
......@@ -310,7 +321,7 @@ namespace SmartScan
fm.ShowDialog(Common.frmMain);
}
}
});
});
return rtn;
}
......
......@@ -29,7 +29,7 @@ namespace SmartScan
/// </summary>
private void InitializeComponent()
{
this.facePanel1 = new Asa.FaceControl.FacePanel();
this.but_StartService = new Asa.FaceControl.FacePanel();
this.panel1 = new System.Windows.Forms.Panel();
this.ChkRecursive = new Asa.FaceControl.FaceCheckBox();
this.groupBox_lblkey = new System.Windows.Forms.GroupBox();
......@@ -43,28 +43,29 @@ namespace SmartScan
this.TxtDataSource = new Asa.FaceControl.FaceTextBox();
this.LblContent = new Asa.FaceControl.FaceLabel();
this.CboDataType = new Asa.FaceControl.FaceComboBox();
this.facePanel1.SuspendLayout();
this.but_StartService.SuspendLayout();
this.panel1.SuspendLayout();
this.groupBox_lblkey.SuspendLayout();
this.SuspendLayout();
//
// facePanel1
// but_StartService
//
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.Controls.Add(this.panel1);
this.facePanel1.Controls.Add(this.LblContent);
this.facePanel1.Controls.Add(this.CboDataType);
this.facePanel1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.facePanel1.Location = new System.Drawing.Point(3, 3);
this.facePanel1.Name = "facePanel1";
this.facePanel1.Padding = new System.Windows.Forms.Padding(3);
this.facePanel1.ShowText = false;
this.facePanel1.Size = new System.Drawing.Size(870, 534);
this.facePanel1.TabIndex = 1;
this.facePanel1.Text = "facePanel1";
this.facePanel1.TitleFont = new System.Drawing.Font("宋体", 12F);
this.but_StartService.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.but_StartService.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.but_StartService.BorderWidth = 2;
this.but_StartService.Controls.Add(this.panel1);
this.but_StartService.Controls.Add(this.LblContent);
this.but_StartService.Controls.Add(this.CboDataType);
this.but_StartService.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.but_StartService.Location = new System.Drawing.Point(4, 4);
this.but_StartService.Margin = new System.Windows.Forms.Padding(4);
this.but_StartService.Name = "but_StartService";
this.but_StartService.Padding = new System.Windows.Forms.Padding(4);
this.but_StartService.ShowText = false;
this.but_StartService.Size = new System.Drawing.Size(1160, 668);
this.but_StartService.TabIndex = 1;
this.but_StartService.Text = "facePanel1";
this.but_StartService.TitleFont = new System.Drawing.Font("宋体", 12F);
//
// panel1
//
......@@ -77,9 +78,10 @@ namespace SmartScan
this.panel1.Controls.Add(this.CboDataTitle);
this.panel1.Controls.Add(this.CboDataKey);
this.panel1.Controls.Add(this.TxtDataSource);
this.panel1.Location = new System.Drawing.Point(6, 76);
this.panel1.Location = new System.Drawing.Point(8, 95);
this.panel1.Margin = new System.Windows.Forms.Padding(4);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(858, 452);
this.panel1.Size = new System.Drawing.Size(1144, 565);
this.panel1.TabIndex = 22;
//
// ChkRecursive
......@@ -88,10 +90,11 @@ namespace SmartScan
this.ChkRecursive.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.ChkRecursive.BorderWidth = 0;
this.ChkRecursive.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChkRecursive.Location = new System.Drawing.Point(638, 23);
this.ChkRecursive.Location = new System.Drawing.Point(851, 29);
this.ChkRecursive.Margin = new System.Windows.Forms.Padding(4);
this.ChkRecursive.Name = "ChkRecursive";
this.ChkRecursive.Padding = new System.Windows.Forms.Padding(3);
this.ChkRecursive.Size = new System.Drawing.Size(217, 45);
this.ChkRecursive.Padding = new System.Windows.Forms.Padding(4);
this.ChkRecursive.Size = new System.Drawing.Size(289, 56);
this.ChkRecursive.TabIndex = 23;
this.ChkRecursive.Text = "遍历同目录";
//
......@@ -99,9 +102,11 @@ namespace SmartScan
//
this.groupBox_lblkey.Controls.Add(this.txtkey);
this.groupBox_lblkey.ForeColor = System.Drawing.Color.White;
this.groupBox_lblkey.Location = new System.Drawing.Point(388, 115);
this.groupBox_lblkey.Location = new System.Drawing.Point(517, 144);
this.groupBox_lblkey.Margin = new System.Windows.Forms.Padding(4);
this.groupBox_lblkey.Name = "groupBox_lblkey";
this.groupBox_lblkey.Size = new System.Drawing.Size(300, 231);
this.groupBox_lblkey.Padding = new System.Windows.Forms.Padding(4);
this.groupBox_lblkey.Size = new System.Drawing.Size(400, 289);
this.groupBox_lblkey.TabIndex = 22;
this.groupBox_lblkey.TabStop = false;
this.groupBox_lblkey.Text = "标签可用字段";
......@@ -112,12 +117,13 @@ namespace SmartScan
this.txtkey.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.txtkey.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtkey.ForeColor = System.Drawing.Color.White;
this.txtkey.Location = new System.Drawing.Point(3, 17);
this.txtkey.Location = new System.Drawing.Point(4, 22);
this.txtkey.Margin = new System.Windows.Forms.Padding(4);
this.txtkey.Multiline = true;
this.txtkey.Name = "txtkey";
this.txtkey.ReadOnly = true;
this.txtkey.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.txtkey.Size = new System.Drawing.Size(294, 211);
this.txtkey.Size = new System.Drawing.Size(392, 263);
this.txtkey.TabIndex = 0;
this.txtkey.Tag = "not";
//
......@@ -128,10 +134,11 @@ namespace SmartScan
this.BtnSelectFile.BorderWidth = 2;
this.BtnSelectFile.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnSelectFile.HoldPress = false;
this.BtnSelectFile.Location = new System.Drawing.Point(542, 23);
this.BtnSelectFile.Location = new System.Drawing.Point(723, 29);
this.BtnSelectFile.Margin = new System.Windows.Forms.Padding(4);
this.BtnSelectFile.Name = "BtnSelectFile";
this.BtnSelectFile.Padding = new System.Windows.Forms.Padding(3);
this.BtnSelectFile.Size = new System.Drawing.Size(90, 45);
this.BtnSelectFile.Padding = new System.Windows.Forms.Padding(4);
this.BtnSelectFile.Size = new System.Drawing.Size(120, 56);
this.BtnSelectFile.TabIndex = 1;
this.BtnSelectFile.Text = "选择文件";
this.BtnSelectFile.Click += new System.EventHandler(this.BtnSelectFile_Click);
......@@ -142,10 +149,11 @@ namespace SmartScan
this.faceLabel2.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.faceLabel2.BorderWidth = 0;
this.faceLabel2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.faceLabel2.Location = new System.Drawing.Point(18, 228);
this.faceLabel2.Location = new System.Drawing.Point(24, 285);
this.faceLabel2.Margin = new System.Windows.Forms.Padding(4);
this.faceLabel2.Name = "faceLabel2";
this.faceLabel2.Padding = new System.Windows.Forms.Padding(3);
this.faceLabel2.Size = new System.Drawing.Size(300, 45);
this.faceLabel2.Padding = new System.Windows.Forms.Padding(4);
this.faceLabel2.Size = new System.Drawing.Size(400, 56);
this.faceLabel2.TabIndex = 21;
this.faceLabel2.Text = "关键字匹配数据标题";
this.faceLabel2.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
......@@ -156,10 +164,11 @@ namespace SmartScan
this.faceLabel1.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.faceLabel1.BorderWidth = 0;
this.faceLabel1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.faceLabel1.Location = new System.Drawing.Point(18, 115);
this.faceLabel1.Location = new System.Drawing.Point(24, 144);
this.faceLabel1.Margin = new System.Windows.Forms.Padding(4);
this.faceLabel1.Name = "faceLabel1";
this.faceLabel1.Padding = new System.Windows.Forms.Padding(3);
this.faceLabel1.Size = new System.Drawing.Size(334, 45);
this.faceLabel1.Padding = new System.Windows.Forms.Padding(4);
this.faceLabel1.Size = new System.Drawing.Size(445, 56);
this.faceLabel1.TabIndex = 21;
this.faceLabel1.Text = "识别关键词";
this.faceLabel1.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
......@@ -170,10 +179,11 @@ namespace SmartScan
this.LblFilestatus.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.LblFilestatus.BorderWidth = 0;
this.LblFilestatus.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblFilestatus.Location = new System.Drawing.Point(23, 74);
this.LblFilestatus.Location = new System.Drawing.Point(31, 92);
this.LblFilestatus.Margin = new System.Windows.Forms.Padding(4);
this.LblFilestatus.Name = "LblFilestatus";
this.LblFilestatus.Padding = new System.Windows.Forms.Padding(3);
this.LblFilestatus.Size = new System.Drawing.Size(411, 35);
this.LblFilestatus.Padding = new System.Windows.Forms.Padding(4);
this.LblFilestatus.Size = new System.Drawing.Size(548, 44);
this.LblFilestatus.TabIndex = 21;
this.LblFilestatus.Text = "文件状态:";
this.LblFilestatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
......@@ -184,12 +194,13 @@ namespace SmartScan
this.CboDataTitle.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.CboDataTitle.BorderWidth = 2;
this.CboDataTitle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.CboDataTitle.Location = new System.Drawing.Point(23, 279);
this.CboDataTitle.Location = new System.Drawing.Point(31, 349);
this.CboDataTitle.Margin = new System.Windows.Forms.Padding(4);
this.CboDataTitle.Name = "CboDataTitle";
this.CboDataTitle.Padding = new System.Windows.Forms.Padding(3);
this.CboDataTitle.Padding = new System.Windows.Forms.Padding(4);
this.CboDataTitle.SelectedIndex = -1;
this.CboDataTitle.SelectedText = "";
this.CboDataTitle.Size = new System.Drawing.Size(239, 45);
this.CboDataTitle.Size = new System.Drawing.Size(319, 56);
this.CboDataTitle.TabIndex = 0;
this.CboDataTitle.Tag = "not";
//
......@@ -199,12 +210,13 @@ namespace SmartScan
this.CboDataKey.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.CboDataKey.BorderWidth = 2;
this.CboDataKey.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.CboDataKey.Location = new System.Drawing.Point(23, 166);
this.CboDataKey.Location = new System.Drawing.Point(31, 208);
this.CboDataKey.Margin = new System.Windows.Forms.Padding(4);
this.CboDataKey.Name = "CboDataKey";
this.CboDataKey.Padding = new System.Windows.Forms.Padding(3);
this.CboDataKey.Padding = new System.Windows.Forms.Padding(4);
this.CboDataKey.SelectedIndex = -1;
this.CboDataKey.SelectedText = "";
this.CboDataKey.Size = new System.Drawing.Size(239, 45);
this.CboDataKey.Size = new System.Drawing.Size(319, 56);
this.CboDataKey.TabIndex = 0;
this.CboDataKey.Tag = "not";
//
......@@ -213,16 +225,17 @@ namespace SmartScan
this.TxtDataSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.TxtDataSource.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.TxtDataSource.BorderWidth = 2;
this.TxtDataSource.Location = new System.Drawing.Point(23, 23);
this.TxtDataSource.Location = new System.Drawing.Point(31, 29);
this.TxtDataSource.Margin = new System.Windows.Forms.Padding(4);
this.TxtDataSource.MaxLength = 32767;
this.TxtDataSource.Name = "TxtDataSource";
this.TxtDataSource.Padding = new System.Windows.Forms.Padding(3);
this.TxtDataSource.Padding = new System.Windows.Forms.Padding(4);
this.TxtDataSource.SelectedText = "";
this.TxtDataSource.SelectionLength = 0;
this.TxtDataSource.SelectionStart = 0;
this.TxtDataSource.ShowDel = false;
this.TxtDataSource.ShowQuery = false;
this.TxtDataSource.Size = new System.Drawing.Size(513, 45);
this.TxtDataSource.Size = new System.Drawing.Size(684, 56);
this.TxtDataSource.TabIndex = 0;
this.TxtDataSource.Tag = "not";
this.TxtDataSource.Text = "faceTextBox1";
......@@ -233,10 +246,11 @@ namespace SmartScan
this.LblContent.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.LblContent.BorderWidth = 0;
this.LblContent.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblContent.Location = new System.Drawing.Point(6, 16);
this.LblContent.Location = new System.Drawing.Point(8, 20);
this.LblContent.Margin = new System.Windows.Forms.Padding(4);
this.LblContent.Name = "LblContent";
this.LblContent.Padding = new System.Windows.Forms.Padding(3);
this.LblContent.Size = new System.Drawing.Size(121, 35);
this.LblContent.Padding = new System.Windows.Forms.Padding(4);
this.LblContent.Size = new System.Drawing.Size(161, 44);
this.LblContent.TabIndex = 21;
this.LblContent.Text = "标签数据源";
this.LblContent.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
......@@ -247,24 +261,26 @@ namespace SmartScan
this.CboDataType.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.CboDataType.BorderWidth = 2;
this.CboDataType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.CboDataType.Location = new System.Drawing.Point(133, 10);
this.CboDataType.Location = new System.Drawing.Point(177, 12);
this.CboDataType.Margin = new System.Windows.Forms.Padding(4);
this.CboDataType.Name = "CboDataType";
this.CboDataType.Padding = new System.Windows.Forms.Padding(3);
this.CboDataType.Padding = new System.Windows.Forms.Padding(4);
this.CboDataType.SelectedIndex = -1;
this.CboDataType.SelectedText = "";
this.CboDataType.Size = new System.Drawing.Size(150, 45);
this.CboDataType.Size = new System.Drawing.Size(200, 56);
this.CboDataType.TabIndex = 0;
this.CboDataType.Tag = "not";
this.CboDataType.Text = "CboDataType";
//
// UsrDataSource
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.facePanel1);
this.Controls.Add(this.but_StartService);
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "UsrDataSource";
this.Size = new System.Drawing.Size(905, 553);
this.facePanel1.ResumeLayout(false);
this.Size = new System.Drawing.Size(1207, 691);
this.but_StartService.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.groupBox_lblkey.ResumeLayout(false);
this.groupBox_lblkey.PerformLayout();
......@@ -274,7 +290,7 @@ namespace SmartScan
#endregion
private Asa.FaceControl.FacePanel facePanel1;
private Asa.FaceControl.FacePanel but_StartService;
private Asa.FaceControl.FaceComboBox CboDataType;
private Asa.FaceControl.FaceLabel LblContent;
private System.Windows.Forms.Panel panel1;
......
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;
using System.IO;
using System.Windows.Forms;
using Asa.FaceControl;
......@@ -93,7 +95,7 @@ namespace SmartScan
}
TxtDataSource.Text = Config.DataSource_FilePath;
return facePanel1;
return but_StartService;
}
public void Save()
......@@ -128,6 +130,6 @@ namespace SmartScan
}
TxtDataSource.Text = fileDialog.FileName;
}
}
}
}
......@@ -31,10 +31,12 @@ namespace SmartScan
{
this.facePanel1 = new Asa.FaceControl.FacePanel();
this.PnlReelid = new Asa.FaceControl.FacePanel();
this.btn_adddatetime = new Asa.FaceControl.FaceButton();
this.LblContent = new Asa.FaceControl.FaceLabel();
this.TxtReelIDMatch = new Asa.FaceControl.FaceTextBox();
this.LblPlaces = new Asa.FaceControl.FaceLabel();
this.NumReelIDPlaces = new Asa.FaceControl.FaceNumericUpDown();
this.ChkResetidbydate = new Asa.FaceControl.FaceCheckBox();
this.ChkReelIDFillZero = new Asa.FaceControl.FaceCheckBox();
this.TxtPostfix = new Asa.FaceControl.FaceTextBox();
this.LblPrefix = new Asa.FaceControl.FaceLabel();
......@@ -49,8 +51,6 @@ namespace SmartScan
this.BtnAddKey = new Asa.FaceControl.FaceButton();
this.TxtKey = new Asa.FaceControl.FaceTextBox();
this.LstKey = new Asa.FaceControl.FaceListBox();
this.btn_adddatetime = new Asa.FaceControl.FaceButton();
this.ChkResetidbydate = new Asa.FaceControl.FaceCheckBox();
this.facePanel1.SuspendLayout();
this.PnlReelid.SuspendLayout();
this.SuspendLayout();
......@@ -71,11 +71,12 @@ namespace SmartScan
this.facePanel1.Controls.Add(this.TxtKey);
this.facePanel1.Controls.Add(this.LstKey);
this.facePanel1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.facePanel1.Location = new System.Drawing.Point(3, 3);
this.facePanel1.Location = new System.Drawing.Point(4, 4);
this.facePanel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.facePanel1.Name = "facePanel1";
this.facePanel1.Padding = new System.Windows.Forms.Padding(3);
this.facePanel1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.facePanel1.ShowText = false;
this.facePanel1.Size = new System.Drawing.Size(722, 496);
this.facePanel1.Size = new System.Drawing.Size(963, 620);
this.facePanel1.TabIndex = 1;
this.facePanel1.Text = "facePanel1";
this.facePanel1.TitleFont = new System.Drawing.Font("宋体", 12F);
......@@ -97,14 +98,31 @@ namespace SmartScan
this.PnlReelid.Controls.Add(this.LblPostfix);
this.PnlReelid.Controls.Add(this.TxtPrefix);
this.PnlReelid.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.PnlReelid.Location = new System.Drawing.Point(356, 6);
this.PnlReelid.Location = new System.Drawing.Point(475, 8);
this.PnlReelid.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.PnlReelid.Name = "PnlReelid";
this.PnlReelid.Padding = new System.Windows.Forms.Padding(3);
this.PnlReelid.Size = new System.Drawing.Size(230, 431);
this.PnlReelid.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.PnlReelid.Size = new System.Drawing.Size(307, 520);
this.PnlReelid.TabIndex = 35;
this.PnlReelid.Text = "ReelID";
this.PnlReelid.TitleFont = new System.Drawing.Font("宋体", 12F);
//
// btn_adddatetime
//
this.btn_adddatetime.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.btn_adddatetime.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.btn_adddatetime.BorderWidth = 2;
this.btn_adddatetime.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.btn_adddatetime.HoldPress = false;
this.btn_adddatetime.Location = new System.Drawing.Point(8, 447);
this.btn_adddatetime.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btn_adddatetime.Name = "btn_adddatetime";
this.btn_adddatetime.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btn_adddatetime.Size = new System.Drawing.Size(291, 56);
this.btn_adddatetime.TabIndex = 36;
this.btn_adddatetime.Text = "添加日期时间";
this.btn_adddatetime.Click += new System.EventHandler(this.btn_adddatetime_Click);
//
// LblContent
//
this.LblContent.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
......@@ -113,10 +131,11 @@ namespace SmartScan
this.LblContent.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.LblContent.BorderWidth = 0;
this.LblContent.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblContent.Location = new System.Drawing.Point(6, 34);
this.LblContent.Location = new System.Drawing.Point(8, 42);
this.LblContent.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LblContent.Name = "LblContent";
this.LblContent.Padding = new System.Windows.Forms.Padding(3);
this.LblContent.Size = new System.Drawing.Size(218, 35);
this.LblContent.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LblContent.Size = new System.Drawing.Size(291, 44);
this.LblContent.TabIndex = 20;
this.LblContent.Text = "条件";
this.LblContent.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
......@@ -128,16 +147,17 @@ namespace SmartScan
this.TxtReelIDMatch.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.TxtReelIDMatch.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.TxtReelIDMatch.BorderWidth = 2;
this.TxtReelIDMatch.Location = new System.Drawing.Point(6, 75);
this.TxtReelIDMatch.Location = new System.Drawing.Point(8, 94);
this.TxtReelIDMatch.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.TxtReelIDMatch.MaxLength = 32767;
this.TxtReelIDMatch.Name = "TxtReelIDMatch";
this.TxtReelIDMatch.Padding = new System.Windows.Forms.Padding(3);
this.TxtReelIDMatch.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.TxtReelIDMatch.SelectedText = "";
this.TxtReelIDMatch.SelectionLength = 0;
this.TxtReelIDMatch.SelectionStart = 0;
this.TxtReelIDMatch.ShowDel = true;
this.TxtReelIDMatch.ShowQuery = false;
this.TxtReelIDMatch.Size = new System.Drawing.Size(218, 45);
this.TxtReelIDMatch.Size = new System.Drawing.Size(291, 56);
this.TxtReelIDMatch.TabIndex = 19;
this.TxtReelIDMatch.Text = "faceTextBox1";
//
......@@ -147,10 +167,11 @@ namespace SmartScan
this.LblPlaces.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.LblPlaces.BorderWidth = 0;
this.LblPlaces.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblPlaces.Location = new System.Drawing.Point(6, 228);
this.LblPlaces.Location = new System.Drawing.Point(8, 285);
this.LblPlaces.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LblPlaces.Name = "LblPlaces";
this.LblPlaces.Padding = new System.Windows.Forms.Padding(3);
this.LblPlaces.Size = new System.Drawing.Size(90, 45);
this.LblPlaces.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LblPlaces.Size = new System.Drawing.Size(120, 56);
this.LblPlaces.TabIndex = 23;
this.LblPlaces.Text = "数字位数";
this.LblPlaces.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
......@@ -165,17 +186,34 @@ namespace SmartScan
this.NumReelIDPlaces.DecimalPlaces = 0;
this.NumReelIDPlaces.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.NumReelIDPlaces.Increment = 1F;
this.NumReelIDPlaces.Location = new System.Drawing.Point(102, 228);
this.NumReelIDPlaces.Location = new System.Drawing.Point(136, 285);
this.NumReelIDPlaces.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.NumReelIDPlaces.Maximum = 9999F;
this.NumReelIDPlaces.Minimum = 1F;
this.NumReelIDPlaces.Name = "NumReelIDPlaces";
this.NumReelIDPlaces.Padding = new System.Windows.Forms.Padding(3);
this.NumReelIDPlaces.Size = new System.Drawing.Size(122, 45);
this.NumReelIDPlaces.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.NumReelIDPlaces.Size = new System.Drawing.Size(163, 56);
this.NumReelIDPlaces.TabIndex = 24;
this.NumReelIDPlaces.Text = "1";
this.NumReelIDPlaces.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.NumReelIDPlaces.Value = 1F;
//
// ChkResetidbydate
//
this.ChkResetidbydate.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ChkResetidbydate.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.ChkResetidbydate.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.ChkResetidbydate.BorderWidth = 0;
this.ChkResetidbydate.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChkResetidbydate.Location = new System.Drawing.Point(8, 395);
this.ChkResetidbydate.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ChkResetidbydate.Name = "ChkResetidbydate";
this.ChkResetidbydate.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ChkResetidbydate.Size = new System.Drawing.Size(291, 44);
this.ChkResetidbydate.TabIndex = 25;
this.ChkResetidbydate.Text = "序号每日重置";
//
// ChkReelIDFillZero
//
this.ChkReelIDFillZero.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
......@@ -184,10 +222,11 @@ namespace SmartScan
this.ChkReelIDFillZero.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.ChkReelIDFillZero.BorderWidth = 0;
this.ChkReelIDFillZero.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChkReelIDFillZero.Location = new System.Drawing.Point(6, 279);
this.ChkReelIDFillZero.Location = new System.Drawing.Point(8, 349);
this.ChkReelIDFillZero.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ChkReelIDFillZero.Name = "ChkReelIDFillZero";
this.ChkReelIDFillZero.Padding = new System.Windows.Forms.Padding(3);
this.ChkReelIDFillZero.Size = new System.Drawing.Size(218, 35);
this.ChkReelIDFillZero.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.ChkReelIDFillZero.Size = new System.Drawing.Size(291, 44);
this.ChkReelIDFillZero.TabIndex = 25;
this.ChkReelIDFillZero.Text = "前面补0";
//
......@@ -198,16 +237,17 @@ namespace SmartScan
this.TxtPostfix.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.TxtPostfix.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.TxtPostfix.BorderWidth = 2;
this.TxtPostfix.Location = new System.Drawing.Point(102, 177);
this.TxtPostfix.Location = new System.Drawing.Point(136, 221);
this.TxtPostfix.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.TxtPostfix.MaxLength = 32767;
this.TxtPostfix.Name = "TxtPostfix";
this.TxtPostfix.Padding = new System.Windows.Forms.Padding(3);
this.TxtPostfix.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.TxtPostfix.SelectedText = "";
this.TxtPostfix.SelectionLength = 0;
this.TxtPostfix.SelectionStart = 0;
this.TxtPostfix.ShowDel = true;
this.TxtPostfix.ShowQuery = false;
this.TxtPostfix.Size = new System.Drawing.Size(122, 45);
this.TxtPostfix.Size = new System.Drawing.Size(163, 56);
this.TxtPostfix.TabIndex = 29;
this.TxtPostfix.Text = "faceTextBox1";
//
......@@ -217,10 +257,11 @@ namespace SmartScan
this.LblPrefix.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.LblPrefix.BorderWidth = 0;
this.LblPrefix.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblPrefix.Location = new System.Drawing.Point(6, 126);
this.LblPrefix.Location = new System.Drawing.Point(8, 158);
this.LblPrefix.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LblPrefix.Name = "LblPrefix";
this.LblPrefix.Padding = new System.Windows.Forms.Padding(3);
this.LblPrefix.Size = new System.Drawing.Size(90, 45);
this.LblPrefix.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LblPrefix.Size = new System.Drawing.Size(120, 56);
this.LblPrefix.TabIndex = 26;
this.LblPrefix.Text = "前缀";
this.LblPrefix.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
......@@ -231,10 +272,11 @@ namespace SmartScan
this.LblPostfix.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.LblPostfix.BorderWidth = 0;
this.LblPostfix.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblPostfix.Location = new System.Drawing.Point(6, 177);
this.LblPostfix.Location = new System.Drawing.Point(8, 221);
this.LblPostfix.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LblPostfix.Name = "LblPostfix";
this.LblPostfix.Padding = new System.Windows.Forms.Padding(3);
this.LblPostfix.Size = new System.Drawing.Size(90, 45);
this.LblPostfix.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LblPostfix.Size = new System.Drawing.Size(120, 56);
this.LblPostfix.TabIndex = 28;
this.LblPostfix.Text = "后缀";
this.LblPostfix.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
......@@ -246,16 +288,17 @@ namespace SmartScan
this.TxtPrefix.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.TxtPrefix.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.TxtPrefix.BorderWidth = 2;
this.TxtPrefix.Location = new System.Drawing.Point(102, 126);
this.TxtPrefix.Location = new System.Drawing.Point(136, 158);
this.TxtPrefix.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.TxtPrefix.MaxLength = 32767;
this.TxtPrefix.Name = "TxtPrefix";
this.TxtPrefix.Padding = new System.Windows.Forms.Padding(3);
this.TxtPrefix.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.TxtPrefix.SelectedText = "";
this.TxtPrefix.SelectionLength = 0;
this.TxtPrefix.SelectionStart = 0;
this.TxtPrefix.ShowDel = true;
this.TxtPrefix.ShowQuery = false;
this.TxtPrefix.Size = new System.Drawing.Size(122, 45);
this.TxtPrefix.Size = new System.Drawing.Size(163, 56);
this.TxtPrefix.TabIndex = 27;
this.TxtPrefix.Text = "faceTextBox1";
//
......@@ -266,10 +309,11 @@ namespace SmartScan
this.btn_down.BorderWidth = 2;
this.btn_down.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.btn_down.HoldPress = false;
this.btn_down.Location = new System.Drawing.Point(92, 312);
this.btn_down.Location = new System.Drawing.Point(123, 390);
this.btn_down.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btn_down.Name = "btn_down";
this.btn_down.Padding = new System.Windows.Forms.Padding(3);
this.btn_down.Size = new System.Drawing.Size(84, 45);
this.btn_down.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btn_down.Size = new System.Drawing.Size(112, 56);
this.btn_down.TabIndex = 34;
this.btn_down.Text = "▼";
this.btn_down.Click += new System.EventHandler(this.btn_down_Click);
......@@ -281,10 +325,11 @@ namespace SmartScan
this.btn_up.BorderWidth = 2;
this.btn_up.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.btn_up.HoldPress = false;
this.btn_up.Location = new System.Drawing.Point(6, 312);
this.btn_up.Location = new System.Drawing.Point(8, 390);
this.btn_up.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btn_up.Name = "btn_up";
this.btn_up.Padding = new System.Windows.Forms.Padding(3);
this.btn_up.Size = new System.Drawing.Size(80, 45);
this.btn_up.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btn_up.Size = new System.Drawing.Size(107, 56);
this.btn_up.TabIndex = 34;
this.btn_up.Text = "▲";
this.btn_up.Click += new System.EventHandler(this.btn_up_Click);
......@@ -296,10 +341,11 @@ namespace SmartScan
this.btn_setriid.BorderWidth = 2;
this.btn_setriid.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.btn_setriid.HoldPress = false;
this.btn_setriid.Location = new System.Drawing.Point(182, 261);
this.btn_setriid.Location = new System.Drawing.Point(243, 326);
this.btn_setriid.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btn_setriid.Name = "btn_setriid";
this.btn_setriid.Padding = new System.Windows.Forms.Padding(3);
this.btn_setriid.Size = new System.Drawing.Size(168, 45);
this.btn_setriid.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btn_setriid.Size = new System.Drawing.Size(224, 56);
this.btn_setriid.TabIndex = 34;
this.btn_setriid.Text = "Toggle Auto ReelID";
this.btn_setriid.Click += new System.EventHandler(this.btn_setriid_Click);
......@@ -311,10 +357,11 @@ namespace SmartScan
this.BtnAppendKey.BorderWidth = 2;
this.BtnAppendKey.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnAppendKey.HoldPress = false;
this.BtnAppendKey.Location = new System.Drawing.Point(182, 210);
this.BtnAppendKey.Location = new System.Drawing.Point(243, 262);
this.BtnAppendKey.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.BtnAppendKey.Name = "BtnAppendKey";
this.BtnAppendKey.Padding = new System.Windows.Forms.Padding(3);
this.BtnAppendKey.Size = new System.Drawing.Size(168, 45);
this.BtnAppendKey.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.BtnAppendKey.Size = new System.Drawing.Size(224, 56);
this.BtnAppendKey.TabIndex = 34;
this.BtnAppendKey.Text = "append";
this.BtnAppendKey.Click += new System.EventHandler(this.BtnAppendKey_Click);
......@@ -326,10 +373,11 @@ namespace SmartScan
this.BtnUpdateKey.BorderWidth = 2;
this.BtnUpdateKey.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnUpdateKey.HoldPress = false;
this.BtnUpdateKey.Location = new System.Drawing.Point(182, 159);
this.BtnUpdateKey.Location = new System.Drawing.Point(243, 199);
this.BtnUpdateKey.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.BtnUpdateKey.Name = "BtnUpdateKey";
this.BtnUpdateKey.Padding = new System.Windows.Forms.Padding(3);
this.BtnUpdateKey.Size = new System.Drawing.Size(168, 45);
this.BtnUpdateKey.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.BtnUpdateKey.Size = new System.Drawing.Size(224, 56);
this.BtnUpdateKey.TabIndex = 33;
this.BtnUpdateKey.Text = "update";
this.BtnUpdateKey.Click += new System.EventHandler(this.BtnUpdateKey_Click);
......@@ -341,10 +389,11 @@ namespace SmartScan
this.BtnDelKey.BorderWidth = 2;
this.BtnDelKey.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnDelKey.HoldPress = false;
this.BtnDelKey.Location = new System.Drawing.Point(182, 108);
this.BtnDelKey.Location = new System.Drawing.Point(243, 135);
this.BtnDelKey.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.BtnDelKey.Name = "BtnDelKey";
this.BtnDelKey.Padding = new System.Windows.Forms.Padding(3);
this.BtnDelKey.Size = new System.Drawing.Size(168, 45);
this.BtnDelKey.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.BtnDelKey.Size = new System.Drawing.Size(224, 56);
this.BtnDelKey.TabIndex = 32;
this.BtnDelKey.Text = "del";
this.BtnDelKey.Click += new System.EventHandler(this.BtnDelKey_Click);
......@@ -356,10 +405,11 @@ namespace SmartScan
this.BtnAddKey.BorderWidth = 2;
this.BtnAddKey.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnAddKey.HoldPress = false;
this.BtnAddKey.Location = new System.Drawing.Point(182, 57);
this.BtnAddKey.Location = new System.Drawing.Point(243, 71);
this.BtnAddKey.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.BtnAddKey.Name = "BtnAddKey";
this.BtnAddKey.Padding = new System.Windows.Forms.Padding(3);
this.BtnAddKey.Size = new System.Drawing.Size(168, 45);
this.BtnAddKey.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.BtnAddKey.Size = new System.Drawing.Size(224, 56);
this.BtnAddKey.TabIndex = 31;
this.BtnAddKey.Text = "add";
this.BtnAddKey.Click += new System.EventHandler(this.BtnAddKey_Click);
......@@ -369,16 +419,17 @@ namespace SmartScan
this.TxtKey.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.TxtKey.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.TxtKey.BorderWidth = 2;
this.TxtKey.Location = new System.Drawing.Point(182, 6);
this.TxtKey.Location = new System.Drawing.Point(243, 8);
this.TxtKey.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.TxtKey.MaxLength = 32767;
this.TxtKey.Name = "TxtKey";
this.TxtKey.Padding = new System.Windows.Forms.Padding(3);
this.TxtKey.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.TxtKey.SelectedText = "";
this.TxtKey.SelectionLength = 0;
this.TxtKey.SelectionStart = 0;
this.TxtKey.ShowDel = true;
this.TxtKey.ShowQuery = false;
this.TxtKey.Size = new System.Drawing.Size(168, 45);
this.TxtKey.Size = new System.Drawing.Size(224, 56);
this.TxtKey.TabIndex = 30;
//
// LstKey
......@@ -387,51 +438,23 @@ namespace SmartScan
this.LstKey.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.LstKey.BorderWidth = 2;
this.LstKey.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LstKey.Location = new System.Drawing.Point(6, 6);
this.LstKey.Location = new System.Drawing.Point(8, 8);
this.LstKey.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LstKey.Name = "LstKey";
this.LstKey.Padding = new System.Windows.Forms.Padding(3);
this.LstKey.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.LstKey.SelectedIndex = -1;
this.LstKey.Size = new System.Drawing.Size(170, 300);
this.LstKey.Size = new System.Drawing.Size(227, 375);
this.LstKey.TabIndex = 21;
this.LstKey.SelectedIndexChanged += new System.EventHandler(this.LstKey_SelectedIndexChanged);
//
// btn_adddatetime
//
this.btn_adddatetime.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.btn_adddatetime.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.btn_adddatetime.BorderWidth = 2;
this.btn_adddatetime.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.btn_adddatetime.HoldPress = false;
this.btn_adddatetime.Location = new System.Drawing.Point(6, 357);
this.btn_adddatetime.Name = "btn_adddatetime";
this.btn_adddatetime.Padding = new System.Windows.Forms.Padding(3);
this.btn_adddatetime.Size = new System.Drawing.Size(218, 45);
this.btn_adddatetime.TabIndex = 36;
this.btn_adddatetime.Text = "添加日期时间";
this.btn_adddatetime.Click += new System.EventHandler(this.btn_adddatetime_Click);
//
// ChkResetidbydate
//
this.ChkResetidbydate.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ChkResetidbydate.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.ChkResetidbydate.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.ChkResetidbydate.BorderWidth = 0;
this.ChkResetidbydate.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.ChkResetidbydate.Location = new System.Drawing.Point(6, 316);
this.ChkResetidbydate.Name = "ChkResetidbydate";
this.ChkResetidbydate.Padding = new System.Windows.Forms.Padding(3);
this.ChkResetidbydate.Size = new System.Drawing.Size(218, 35);
this.ChkResetidbydate.TabIndex = 25;
this.ChkResetidbydate.Text = "序号每日重置";
//
// UsrMacro
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.facePanel1);
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Name = "UsrMacro";
this.Size = new System.Drawing.Size(848, 533);
this.Size = new System.Drawing.Size(1131, 666);
this.facePanel1.ResumeLayout(false);
this.PnlReelid.ResumeLayout(false);
this.ResumeLayout(false);
......
......@@ -147,6 +147,6 @@ namespace SmartScan
{
string key = "[datetime:yyyyMMddHHmmss]";
TxtReelIDMatch.AppendText(key);
}
}
}
}
......@@ -296,7 +296,7 @@ namespace SmartScan
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel4.Controls.Add(this.pnlCodeOp, 0, 1);
this.tableLayoutPanel4.Controls.Add(this.LstCode, 0, 0);
this.tableLayoutPanel4.Location = new System.Drawing.Point(4, 38);
this.tableLayoutPanel4.Location = new System.Drawing.Point(6, 38);
this.tableLayoutPanel4.Name = "tableLayoutPanel4";
this.tableLayoutPanel4.RowCount = 2;
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
......@@ -330,7 +330,7 @@ namespace SmartScan
this.BtnExtractCode.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnExtractCode.HoldPress = false;
this.BtnExtractCode.Image = global::SmartScan.Properties.Resources.filter;
this.BtnExtractCode.Location = new System.Drawing.Point(11, 44);
this.BtnExtractCode.Location = new System.Drawing.Point(18, 43);
this.BtnExtractCode.Margin = new System.Windows.Forms.Padding(4);
this.BtnExtractCode.Name = "BtnExtractCode";
this.BtnExtractCode.Padding = new System.Windows.Forms.Padding(4);
......
......@@ -8,6 +8,7 @@ using Asa.FaceControl;
using BLL;
using CameraVisionLib.Model;
using DocumentFormat.OpenXml.EMMA;
using DocumentFormat.OpenXml.Office2016.Drawing.ChartDrawing;
using Model;
namespace SmartScan
......@@ -68,7 +69,7 @@ namespace SmartScan
item.Add(FormatCode(i));
}
return item.ToArray();
}
}
private string FormatCode(int index)
{
MaterialCode code = mateCopy[mateIndex].Code[index];
......@@ -83,7 +84,7 @@ namespace SmartScan
List<string> arr = new();
if (mateCopy[mateIndex].Code[index].CodeType.Equals(Setting_Str.OCR))
{
s += "<OCR> ";
s += "<OCR> ";
}
s += text;
arr = new();
......@@ -227,7 +228,6 @@ namespace SmartScan
mateCopy[mateIndex].ImagePath = "";
mateCopy[mateIndex].Image = bmp;
ImgShow.Image = bmp;
}
private void BtnLocalImage_Click(object sender, EventArgs e)
......@@ -795,5 +795,33 @@ namespace SmartScan
return key;
}
#endregion
private void FaceListBox_DrawItem(object sender, DrawItemEventArgs e)
{
if (e.Index >= 0 && e.Index < LstCode.Items.Count)
{
string itemText = LstCode.Items[e.Index].ToString();
// 设置特定文本的颜色
if (itemText.Contains("<OCR>"))
{
using (SolidBrush brush = new SolidBrush(Color.Red))
{
e.Graphics.DrawString(itemText, e.Font, brush, e.Bounds);
}
}
else
{
// 设置默认文本颜色
using (SolidBrush brush = new SolidBrush(e.ForeColor))
{
e.Graphics.DrawString(itemText, e.Font, brush, e.Bounds);
}
}
e.DrawFocusRectangle();
}
}
}
}
......@@ -63,13 +63,13 @@
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Asa.Camera.VisionLib, Version=1.3.8398.28384, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Asa.Camera.VisionLib, Version=1.3.8479.24297, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedDll\Asa.Camera.VisionLib.dll</HintPath>
<HintPath>..\..\相机操作类\Camera\CameraVisionLibSetting\bin\Debug\Asa.Camera.VisionLib.dll</HintPath>
</Reference>
<Reference Include="Asa.Face.Control, Version=1.0.8386.23079, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="Asa.Face.Control, Version=1.0.8636.38287, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedDll\Asa.Face.Control.dll</HintPath>
<HintPath>..\..\..\asa\FaceControl\Test\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>
......@@ -84,9 +84,16 @@
<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="halcondotnet, Version=12.0.0.0, Culture=neutral, PublicKeyToken=4973bed59ddbf2b8, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\相机操作类\Camera\CameraVisionLibSetting\bin\Debug\halcondotnet.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>
<Reference Include="MaterialSkin">
<HintPath>D:\贾鹏旭_项目文件\Gilocation\Gilocation.Entrance\bin\Debug\MaterialSkin.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
......@@ -111,6 +118,12 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Common.cs" />
<Compile Include="Form\FrmDrawText.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form\FrmDrawText.Designer.cs">
<DependentUpon>FrmDrawText.cs</DependentUpon>
</Compile>
<Compile Include="Form\FrmWaitting.cs">
<SubType>Form</SubType>
</Compile>
......@@ -270,6 +283,9 @@
<EmbeddedResource Include="Form\FrmCodeOCR.resx">
<DependentUpon>FrmCodeOCR.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form\FrmDrawText.resx">
<DependentUpon>FrmDrawText.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form\FrmFieldContent.resx">
<DependentUpon>FrmFieldContent.cs</DependentUpon>
</EmbeddedResource>
......@@ -400,6 +416,9 @@
<None Include="Resources\create.png" />
<None Include="Resources\NEO 64.png" />
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>rem copy C:\Neotel\DLL\Halcon\halcondotnet.dll $(TargetDir)halcondotnet.dll
......
......@@ -86,7 +86,9 @@
<Reference Include="PaddleOCRSharp, Version=2.3.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\PaddleOCRSharp.2.3.0\lib\net472\PaddleOCRSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System">
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.dll</HintPath>
</Reference>
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.Serialization" />
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!