Commit b2199b45 贾鹏旭

添加api接口和

1 个父辈 7eb17a14
...@@ -40,9 +40,9 @@ ...@@ -40,9 +40,9 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedDll\Asa.Camera.VisionLib.dll</HintPath> <HintPath>..\SharedDll\Asa.Camera.VisionLib.dll</HintPath>
</Reference> </Reference>
<Reference Include="Asa.Face.Control, Version=1.0.8386.23079, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Asa.Face.Control, Version=1.0.8636.38287, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedDll\Asa.Face.Control.dll</HintPath> <HintPath>..\..\..\asa\FaceControl\Test\bin\Debug\Asa.Face.Control.dll</HintPath>
</Reference> </Reference>
<Reference Include="ClosedXML, Version=0.96.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL"> <Reference Include="ClosedXML, Version=0.96.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL">
<HintPath>..\packages\ClosedXML.0.96.0\lib\net46\ClosedXML.dll</HintPath> <HintPath>..\packages\ClosedXML.0.96.0\lib\net46\ClosedXML.dll</HintPath>
...@@ -63,6 +63,9 @@ ...@@ -63,6 +63,9 @@
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <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> <HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference> </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" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
...@@ -114,6 +117,7 @@ ...@@ -114,6 +117,7 @@
<Compile Include="MaterialEdit.cs" /> <Compile Include="MaterialEdit.cs" />
<Compile Include="PrintLabelShow.cs" /> <Compile Include="PrintLabelShow.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Replacekeywords.cs" />
<Compile Include="ServerCommunication.cs" /> <Compile Include="ServerCommunication.cs" />
<Compile Include="Setting_Str.cs" /> <Compile Include="Setting_Str.cs" />
<Compile Include="TextBlock.cs" /> <Compile Include="TextBlock.cs" />
...@@ -132,5 +136,9 @@ ...@@ -132,5 +136,9 @@
<Name>Model</Name> <Name>Model</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>
\ No newline at end of file \ No newline at end of file
...@@ -301,7 +301,7 @@ namespace BLL ...@@ -301,7 +301,7 @@ namespace BLL
get => config.Read<string>(IOModule); get => config.Read<string>(IOModule);
set => config.Write(IOModule, value); set => config.Write(IOModule, value);
} }
static Config() static Config()
{ {
ConfigHelper.Config.LoadMyConfig(typeof(Config)); ConfigHelper.Config.LoadMyConfig(typeof(Config));
...@@ -328,7 +328,7 @@ namespace BLL ...@@ -328,7 +328,7 @@ namespace BLL
public static MyConfig<bool> Func_EnabledOCR; public static MyConfig<bool> Func_EnabledOCR;
[MyConfigComment("允许修改打内容")] [MyConfigComment("允许修改打内容")]
public static MyConfig<bool> AllowModifyPrintInfo; public static MyConfig<bool> AllowModifyPrintInfo;
public void Save() public void Save()
{ {
config.Save(); config.Save();
...@@ -379,6 +379,6 @@ namespace BLL ...@@ -379,6 +379,6 @@ namespace BLL
private const string WEB_SERVICE = "WebService"; private const string WEB_SERVICE = "WebService";
private const string LIGHT_SERIAL_PORT = "LightSerialPort"; private const string LIGHT_SERIAL_PORT = "LightSerialPort";
private const string AUTO_PRINT = "AutoPrint"; private const string AUTO_PRINT = "AutoPrint";
} }
} }
...@@ -6,6 +6,8 @@ using System.Web.Script.Serialization; ...@@ -6,6 +6,8 @@ using System.Web.Script.Serialization;
using System.Reflection; using System.Reflection;
using Asa.FaceControl; using Asa.FaceControl;
using Model; using Model;
using System.Windows.Forms;
using DocumentFormat.OpenXml.Drawing;
namespace BLL namespace BLL
{ {
...@@ -31,7 +33,7 @@ namespace BLL ...@@ -31,7 +33,7 @@ namespace BLL
private FacePanel panel; private FacePanel panel;
private System.Drawing.Point startPoint; private System.Drawing.Point startPoint;
private Config config; private Config config;
public Extension(Config config) public Extension(Config config)
{ {
this.config = config; this.config = config;
...@@ -193,21 +195,43 @@ namespace BLL ...@@ -193,21 +195,43 @@ namespace BLL
} }
}; };
if (!string.IsNullOrEmpty(config.HttpReelID)) 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 }); listrow.Add(new object[] { B });
rows = listrow.ToArray(); rows = listrow.ToArray();
} }
else else
{ {
string json = System.IO.File.ReadAllText(FilePath.CONFIG_EXTENSION); string json = System.IO.File.ReadAllText(FilePath.CONFIG_EXTENSION);
JavaScriptSerializer serializer = new(); JavaScriptSerializer serializer = new();
rows = (object[])serializer.DeserializeObject(json); rows = (object[])serializer.DeserializeObject(json);
} }
ctlY = startPoint.Y; ctlY = startPoint.Y;
for (int i = 0; i < rows.Length; i++) for (int i = 0; i < rows.Length; i++)
LoadRow(rows[i]); LoadRow(rows[i]);
currentExtension.Load(ctlGroup); currentExtension.Load(ctlGroup);
} }
...@@ -221,13 +245,16 @@ namespace BLL ...@@ -221,13 +245,16 @@ namespace BLL
return currentExtension.SetKey(originalCode, key, hasMatch, out errmsg); return currentExtension.SetKey(originalCode, key, hasMatch, out errmsg);
} }
public void DrawTextBackground(Dictionary<string, string> key)
{
currentExtension.DrawTextBackground(key);
}
public void Update() public void Update()
{ {
currentExtension.Update(); currentExtension.Update();
} }
private void LoadRow(object row) private void LoadRow(object row)
{ {
object[] cols = (object[])row; object[] cols = (object[])row;
...@@ -357,7 +384,7 @@ namespace BLL ...@@ -357,7 +384,7 @@ namespace BLL
System.Windows.Forms.HorizontalAlignment alignment = (System.Windows.Forms.HorizontalAlignment)Enum.Parse(typeof(System.Windows.Forms.HorizontalAlignment), obj.ToString()); System.Windows.Forms.HorizontalAlignment alignment = (System.Windows.Forms.HorizontalAlignment)Enum.Parse(typeof(System.Windows.Forms.HorizontalAlignment), obj.ToString());
info.SetValue(ctl, alignment); info.SetValue(ctl, alignment);
} }
} }
} }
...@@ -382,6 +382,8 @@ namespace BLL ...@@ -382,6 +382,8 @@ namespace BLL
} }
public void DrawTextBackground(Dictionary<string, string> key)
{
}
} }
} }
...@@ -383,7 +383,8 @@ namespace BLL ...@@ -383,7 +383,8 @@ namespace BLL
} }
public void DrawTextBackground(Dictionary<string, string> key)
{
}
} }
} }
...@@ -271,6 +271,10 @@ namespace BLL ...@@ -271,6 +271,10 @@ namespace BLL
return ""; return "";
} }
public void DrawTextBackground(Dictionary<string, string> key)
{
}
public class InitPPID_Request_DPS public class InitPPID_Request_DPS
{ {
/* /*
......
...@@ -531,7 +531,8 @@ namespace BLL ...@@ -531,7 +531,8 @@ namespace BLL
} }
} }
public void DrawTextBackground(Dictionary<string, string> key)
{
}
} }
} }
...@@ -362,6 +362,9 @@ namespace BLL ...@@ -362,6 +362,9 @@ namespace BLL
//new FaceMessageBox("", Language.Dialog(LanguageDialogKey.SAVE_SUCCEED), System.Windows.Forms.MessageBoxButtons.OK).ShowDialog(); //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 ...@@ -445,7 +445,7 @@ namespace BLL
foreach (string regCode in regOcrCodes.Split(';')) foreach (string regCode in regOcrCodes.Split(';'))
{ {
if (string.IsNullOrEmpty(regCode)) continue; 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); Dictionary<string, string> matchKey = CodeMatch(x, codeMatch);
if (matchKey != null) if (matchKey != null)
{ {
...@@ -453,9 +453,10 @@ namespace BLL ...@@ -453,9 +453,10 @@ namespace BLL
{ {
if (!keyword.ContainsKey(key)) if (!keyword.ContainsKey(key))
{ {
keyword.Add(key, matchKey[key]); string value = $"<OCR>{matchKey[key]}";
keyword.Add(key, value);
ocrCount--; 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 @@ ...@@ -6,5 +6,6 @@
<package id="log4net" version="2.0.12" targetFramework="net461" /> <package id="log4net" version="2.0.12" targetFramework="net461" />
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net472" /> <package id="Microsoft.CSharp" version="4.7.0" targetFramework="net472" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net461" /> <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" /> <package id="ZXing.Net" version="0.16.6" targetFramework="net461" requireReinstallation="true" />
</packages> </packages>
\ No newline at end of file \ No newline at end of file
...@@ -20,6 +20,7 @@ namespace ExtensionGroup ...@@ -20,6 +20,7 @@ namespace ExtensionGroup
//private System.IO.FileStream streamID; //private System.IO.FileStream streamID;
public event IExtension.PrintDelegate Printing; public event IExtension.PrintDelegate Printing;
public event IExtension.PrintDelegate SaveRetrospect;
public Alcoelectro() public Alcoelectro()
{ {
...@@ -385,6 +386,9 @@ namespace ExtensionGroup ...@@ -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 @@ ...@@ -37,10 +37,15 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Asa.Face.Control"> <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>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Web.Extensions" /> <Reference Include="System.Web.Extensions" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
...@@ -66,5 +71,8 @@ ...@@ -66,5 +71,8 @@
<Name>Model</Name> <Name>Model</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>
\ No newline at end of file \ No newline at end of file
...@@ -9,6 +9,7 @@ using System.Linq; ...@@ -9,6 +9,7 @@ using System.Linq;
using Model; using Model;
using Asa.FaceControl; using Asa.FaceControl;
using System.Web.Script.Serialization; using System.Web.Script.Serialization;
using NLog.Fluent;
namespace ExtensionGroup 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 \ No newline at end of file
using Newtonsoft.Json; using Newtonsoft.Json;
using RestSharp; using RestSharp;
using RestSharp.Validation;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web;
namespace Model namespace Model
{ {
...@@ -34,7 +38,7 @@ namespace Model ...@@ -34,7 +38,7 @@ namespace Model
RestRequest request = new(Method.GET); RestRequest request = new(Method.GET);
IRestResponse response = client.Execute(request); IRestResponse response = client.Execute(request);
string s = response.Content; string s = response.Content;
///LogNet.log.Info($"[GET][URL:{url}][Return:{s}]"); LogNet.log.Info($"[GET][URL:{url}][Return:{s}]");
return FormatContent(s); return FormatContent(s);
} }
...@@ -90,9 +94,21 @@ namespace Model ...@@ -90,9 +94,21 @@ namespace Model
s = s.Replace(" ", " "); s = s.Replace(" ", " ");
return s; 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 public class CustSerialize : RestSharp.Serialization.IRestSerializer
{ {
...@@ -117,5 +133,5 @@ namespace Model ...@@ -117,5 +133,5 @@ namespace Model
return JsonConvert.SerializeObject(parameter.Value); return JsonConvert.SerializeObject(parameter.Value);
} }
} }
} }
...@@ -5,6 +5,7 @@ namespace Model ...@@ -5,6 +5,7 @@ namespace Model
{ {
public interface IExtension public interface IExtension
{ {
public delegate void PrintDelegate(Dictionary<string, string> content); public delegate void PrintDelegate(Dictionary<string, string> content);
public event PrintDelegate Printing; public event PrintDelegate Printing;
public event PrintDelegate SaveRetrospect; public event PrintDelegate SaveRetrospect;
...@@ -19,6 +20,6 @@ namespace Model ...@@ -19,6 +20,6 @@ namespace Model
public void Dispose(); public void Dispose();
public abstract void DrawTextBackground(Dictionary<string, string> key);
} }
} }
...@@ -44,9 +44,9 @@ ...@@ -44,9 +44,9 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedDll\Asa.Camera.VisionLib.dll</HintPath> <HintPath>..\SharedDll\Asa.Camera.VisionLib.dll</HintPath>
</Reference> </Reference>
<Reference Include="Asa.Face.Control, Version=1.0.8386.23079, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Asa.Face.Control, Version=1.0.8621.29649, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedDll\Asa.Face.Control.dll</HintPath> <HintPath>..\..\..\asa\FaceControl\FaceControl\bin\Debug\Asa.Face.Control.dll</HintPath>
</Reference> </Reference>
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL"> <Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath> <HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
......
...@@ -5,6 +5,21 @@ ...@@ -5,6 +5,21 @@
</startup> </startup>
<appSettings> <appSettings>
<add key="EnableWindowsFormsHighDpiAutoResizing" value="true"/> <add key="EnableWindowsFormsHighDpiAutoResizing" value="true"/>
<!--服务器查询PN_开始-->
<!--请求方式;大写POSTGET-->
<add key="CustomerName" value="1181"/>
<add key="RequestMethod" value="GET"/>
<add key="ContentType" value="application/json"/>
<add key="IsTokenRequired" value="TRUE"/>
<!--isTokenRequiredtrue时,tokenurl必填-->
<add key="Tokenurl" value="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> </appSettings>
<system.serviceModel> <system.serviceModel>
<bindings> <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 \ 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();
}
}
}
...@@ -122,7 +122,5 @@ namespace SmartScan ...@@ -122,7 +122,5 @@ namespace SmartScan
{ {
if (back) Hide(); if (back) Hide();
} }
} }
} }
...@@ -13,6 +13,8 @@ using System.Web.Script.Serialization; ...@@ -13,6 +13,8 @@ using System.Web.Script.Serialization;
using System.Threading.Tasks; using System.Threading.Tasks;
using DocumentFormat.OpenXml.Drawing.Charts; using DocumentFormat.OpenXml.Drawing.Charts;
using System.IO; using System.IO;
using System.Web.UI.WebControls;
using System.Windows.Interop;
namespace SmartScan namespace SmartScan
{ {
...@@ -456,5 +458,23 @@ namespace SmartScan ...@@ -456,5 +458,23 @@ namespace SmartScan
Common.frmWaitting.SetMessage(msg); Common.frmWaitting.SetMessage(msg);
Application.DoEvents(); 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();
}
} }
} }
...@@ -12,6 +12,9 @@ using System.Web.UI.WebControls; ...@@ -12,6 +12,9 @@ using System.Web.UI.WebControls;
using DocumentFormat.OpenXml.ExtendedProperties; using DocumentFormat.OpenXml.ExtendedProperties;
using DocumentFormat.OpenXml.Wordprocessing; using DocumentFormat.OpenXml.Wordprocessing;
using BLL; using BLL;
using System.Configuration;
using System.Diagnostics;
using System.IO;
namespace SmartScan namespace SmartScan
{ {
...@@ -130,6 +133,11 @@ namespace SmartScan ...@@ -130,6 +133,11 @@ namespace SmartScan
{ {
DtpLower.Value = DateTime.Now.Date; DtpLower.Value = DateTime.Now.Date;
DtpUpper.Value = DateTime.Now.Date; DtpUpper.Value = DateTime.Now.Date;
if (ConfigurationManager.AppSettings["CustomerName"] == "1181")
{
butt_startservice.Visible=true;
LstRecord.Height = 206;
}
} }
private void BtnSelect_Click(object sender, EventArgs e) private void BtnSelect_Click(object sender, EventArgs e)
...@@ -412,5 +420,23 @@ namespace SmartScan ...@@ -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 Asa.FaceControl;
using BLL; using BLL;
using Model; using Model;
using SmartScan.Form;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
...@@ -99,14 +100,14 @@ namespace SmartScan ...@@ -99,14 +100,14 @@ namespace SmartScan
{ {
AddCodeCenter(); AddCodeCenter();
}); });
Common.frmMain.SetWaittingMsg(Language.Dialog("MaterialTemplateMatching"));//模版匹配... Common.frmMain.SetWaittingMsg(Language.Dialog("MaterialTemplateMatching"));//模版匹配...
bool hasMatch = MatchingTemplate(); bool hasMatch = MatchingTemplate();
Common.frmMain.SetWaittingMsg(Language.Dialog("MaterialProcessing"));//计算结果... //Common.frmMain.SetWaittingMsg(Language.Dialog("MaterialProcessing"));//计算结果...
Common.frmMain.Invoke(delegate () Common.frmMain.Invoke(delegate ()
{ {
SetKey(hasMatch); SetKey(hasMatch);
}); });
isTouch = false; isTouch = false;
LogNet.log.Info("Work scan is done"); LogNet.log.Info("Work scan is done");
...@@ -244,8 +245,7 @@ namespace SmartScan ...@@ -244,8 +245,7 @@ namespace SmartScan
if (string.IsNullOrEmpty(filename)) if (string.IsNullOrEmpty(filename))
return false; return false;
Bitmap bmp = null; Bitmap bmp = null;
bmp = ObjConversion.ReadImageFile(filename);
bmp = ObjConversion.ReadImageFile(filename); ;
workCodeInfo = BLLCommon.cameraVision.GetBarCode(bmp); workCodeInfo = BLLCommon.cameraVision.GetBarCode(bmp);
Common.frmMain.Invoke(delegate () Common.frmMain.Invoke(delegate ()
{ {
...@@ -290,6 +290,17 @@ namespace SmartScan ...@@ -290,6 +290,17 @@ namespace SmartScan
BLL.MatchAnalysis.ShowResult(); BLL.MatchAnalysis.ShowResult();
Common.frmMain.Invoke(delegate () 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) if (rtn)
{ {
LogNet.log.Info("模板匹配 " + mateName + ",关键字个数 " + workCodeKeyword.Count); LogNet.log.Info("模板匹配 " + mateName + ",关键字个数 " + workCodeKeyword.Count);
...@@ -310,7 +321,7 @@ namespace SmartScan ...@@ -310,7 +321,7 @@ namespace SmartScan
fm.ShowDialog(Common.frmMain); fm.ShowDialog(Common.frmMain);
} }
} }
}); });
return rtn; return rtn;
} }
......
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;
using System.IO; using System.IO;
using System.Windows.Forms; using System.Windows.Forms;
using Asa.FaceControl; using Asa.FaceControl;
...@@ -93,7 +95,7 @@ namespace SmartScan ...@@ -93,7 +95,7 @@ namespace SmartScan
} }
TxtDataSource.Text = Config.DataSource_FilePath; TxtDataSource.Text = Config.DataSource_FilePath;
return facePanel1; return but_StartService;
} }
public void Save() public void Save()
...@@ -128,6 +130,6 @@ namespace SmartScan ...@@ -128,6 +130,6 @@ namespace SmartScan
} }
TxtDataSource.Text = fileDialog.FileName; TxtDataSource.Text = fileDialog.FileName;
} }
} }
} }
...@@ -147,6 +147,6 @@ namespace SmartScan ...@@ -147,6 +147,6 @@ namespace SmartScan
{ {
string key = "[datetime:yyyyMMddHHmmss]"; string key = "[datetime:yyyyMMddHHmmss]";
TxtReelIDMatch.AppendText(key); TxtReelIDMatch.AppendText(key);
} }
} }
} }
...@@ -296,7 +296,7 @@ namespace SmartScan ...@@ -296,7 +296,7 @@ namespace SmartScan
this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); 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.pnlCodeOp, 0, 1);
this.tableLayoutPanel4.Controls.Add(this.LstCode, 0, 0); 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.Name = "tableLayoutPanel4";
this.tableLayoutPanel4.RowCount = 2; this.tableLayoutPanel4.RowCount = 2;
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
...@@ -330,7 +330,7 @@ namespace SmartScan ...@@ -330,7 +330,7 @@ namespace SmartScan
this.BtnExtractCode.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230))))); this.BtnExtractCode.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnExtractCode.HoldPress = false; this.BtnExtractCode.HoldPress = false;
this.BtnExtractCode.Image = global::SmartScan.Properties.Resources.filter; 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.Margin = new System.Windows.Forms.Padding(4);
this.BtnExtractCode.Name = "BtnExtractCode"; this.BtnExtractCode.Name = "BtnExtractCode";
this.BtnExtractCode.Padding = new System.Windows.Forms.Padding(4); this.BtnExtractCode.Padding = new System.Windows.Forms.Padding(4);
......
...@@ -8,6 +8,7 @@ using Asa.FaceControl; ...@@ -8,6 +8,7 @@ using Asa.FaceControl;
using BLL; using BLL;
using CameraVisionLib.Model; using CameraVisionLib.Model;
using DocumentFormat.OpenXml.EMMA; using DocumentFormat.OpenXml.EMMA;
using DocumentFormat.OpenXml.Office2016.Drawing.ChartDrawing;
using Model; using Model;
namespace SmartScan namespace SmartScan
...@@ -68,7 +69,7 @@ namespace SmartScan ...@@ -68,7 +69,7 @@ namespace SmartScan
item.Add(FormatCode(i)); item.Add(FormatCode(i));
} }
return item.ToArray(); return item.ToArray();
} }
private string FormatCode(int index) private string FormatCode(int index)
{ {
MaterialCode code = mateCopy[mateIndex].Code[index]; MaterialCode code = mateCopy[mateIndex].Code[index];
...@@ -83,7 +84,7 @@ namespace SmartScan ...@@ -83,7 +84,7 @@ namespace SmartScan
List<string> arr = new(); List<string> arr = new();
if (mateCopy[mateIndex].Code[index].CodeType.Equals(Setting_Str.OCR)) if (mateCopy[mateIndex].Code[index].CodeType.Equals(Setting_Str.OCR))
{ {
s += "<OCR> "; s += "<OCR> ";
} }
s += text; s += text;
arr = new(); arr = new();
...@@ -227,7 +228,6 @@ namespace SmartScan ...@@ -227,7 +228,6 @@ namespace SmartScan
mateCopy[mateIndex].ImagePath = ""; mateCopy[mateIndex].ImagePath = "";
mateCopy[mateIndex].Image = bmp; mateCopy[mateIndex].Image = bmp;
ImgShow.Image = bmp; ImgShow.Image = bmp;
} }
private void BtnLocalImage_Click(object sender, EventArgs e) private void BtnLocalImage_Click(object sender, EventArgs e)
...@@ -795,5 +795,33 @@ namespace SmartScan ...@@ -795,5 +795,33 @@ namespace SmartScan
return key; return key;
} }
#endregion #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 @@ ...@@ -63,13 +63,13 @@
<Prefer32Bit>true</Prefer32Bit> <Prefer32Bit>true</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <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> <SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedDll\Asa.Camera.VisionLib.dll</HintPath> <HintPath>..\..\相机操作类\Camera\CameraVisionLibSetting\bin\Debug\Asa.Camera.VisionLib.dll</HintPath>
</Reference> </Reference>
<Reference Include="Asa.Face.Control, Version=1.0.8386.23079, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Asa.Face.Control, Version=1.0.8636.38287, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\SharedDll\Asa.Face.Control.dll</HintPath> <HintPath>..\..\..\asa\FaceControl\Test\bin\Debug\Asa.Face.Control.dll</HintPath>
</Reference> </Reference>
<Reference Include="ClosedXML, Version=0.96.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL"> <Reference Include="ClosedXML, Version=0.96.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b, processorArchitecture=MSIL">
<HintPath>..\packages\ClosedXML.0.96.0\lib\net46\ClosedXML.dll</HintPath> <HintPath>..\packages\ClosedXML.0.96.0\lib\net46\ClosedXML.dll</HintPath>
...@@ -84,9 +84,16 @@ ...@@ -84,9 +84,16 @@
<Reference Include="ExcelNumberFormat, Version=1.1.0.0, Culture=neutral, PublicKeyToken=23c6f5d73be07eca, processorArchitecture=MSIL"> <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> <HintPath>..\packages\ExcelNumberFormat.1.1.0\lib\net20\ExcelNumberFormat.dll</HintPath>
</Reference> </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"> <Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath> <HintPath>..\packages\log4net.2.0.12\lib\net45\log4net.dll</HintPath>
</Reference> </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"> <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> <HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference> </Reference>
...@@ -111,6 +118,12 @@ ...@@ -111,6 +118,12 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Common.cs" /> <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"> <Compile Include="Form\FrmWaitting.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
...@@ -270,6 +283,9 @@ ...@@ -270,6 +283,9 @@
<EmbeddedResource Include="Form\FrmCodeOCR.resx"> <EmbeddedResource Include="Form\FrmCodeOCR.resx">
<DependentUpon>FrmCodeOCR.cs</DependentUpon> <DependentUpon>FrmCodeOCR.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Form\FrmDrawText.resx">
<DependentUpon>FrmDrawText.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form\FrmFieldContent.resx"> <EmbeddedResource Include="Form\FrmFieldContent.resx">
<DependentUpon>FrmFieldContent.cs</DependentUpon> <DependentUpon>FrmFieldContent.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
...@@ -400,6 +416,9 @@ ...@@ -400,6 +416,9 @@
<None Include="Resources\create.png" /> <None Include="Resources\create.png" />
<None Include="Resources\NEO 64.png" /> <None Include="Resources\NEO 64.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>rem copy C:\Neotel\DLL\Halcon\halcondotnet.dll $(TargetDir)halcondotnet.dll <PostBuildEvent>rem copy C:\Neotel\DLL\Halcon\halcondotnet.dll $(TargetDir)halcondotnet.dll
......
...@@ -86,7 +86,9 @@ ...@@ -86,7 +86,9 @@
<Reference Include="PaddleOCRSharp, Version=2.3.0.0, Culture=neutral, processorArchitecture=AMD64"> <Reference Include="PaddleOCRSharp, Version=2.3.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\PaddleOCRSharp.2.3.0\lib\net472\PaddleOCRSharp.dll</HintPath> <HintPath>..\packages\PaddleOCRSharp.2.3.0\lib\net472\PaddleOCRSharp.dll</HintPath>
</Reference> </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.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Runtime.Serialization" /> <Reference Include="System.Runtime.Serialization" />
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!