Commit 4426c22f 贾鹏旭

1

1 个父辈 481b5723
正在显示 62 个修改的文件 包含 1627 行增加308 行删除
......@@ -56,8 +56,9 @@
<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="IDHIKCamera">
<HintPath>..\SharedDll\IDHIKCamera.dll</HintPath>
<Reference Include="IDHIKCamera, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\IDHK\IDHIKCamera\IDHIKCamera\bin\Debug\IDHIKCamera.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>
......@@ -114,10 +115,12 @@
<Compile Include="Extension\Item_KaiFa.cs" />
<Compile Include="Extension\Item_PanaCIM.cs" />
<Compile Include="ExtraFileData.cs" />
<Compile Include="InvokePlugin.cs" />
<Compile Include="IO\IOManage.cs" />
<Compile Include="IO\IO_Interface.cs" />
<Compile Include="IO\KND.cs" />
<Compile Include="IO\NiRenIO.cs" />
<Compile Include="LabelingPosition.cs" />
<Compile Include="LightSource.cs" />
<Compile Include="MatchAnalysis.cs" />
<Compile Include="MonitorMouseKeyboard.cs" />
......
using CameraVisionLib.Model;
using DocumentFormat.OpenXml.EMMA;
using DocumentFormat.OpenXml.Wordprocessing;
using IDHIKCamera;
using Model;
using System;
......@@ -39,6 +40,7 @@ namespace BLL
// LogNet.log.Info("加载到IDHIK相机:" + name);
//}
cameraName = names.Find(s => s.Contains("ID"));
LogNet.log.Info("加载到扫码相机:" + cameraName);
}
//IDHIK.Instance.OpenAll();
}
......@@ -50,7 +52,7 @@ namespace BLL
else
{
cameraVision = new Asa.Camera.VisionLib(FilePath.CONFIG_CAMERA, BLLCommon.config.EnabledCamera);
LogNet.log.Info("加载相机,数量:" + cameraVision.Count);
LogNet.log.Info("加载拍照相机,数量:" + cameraVision.Count);
}
}
......@@ -116,7 +118,12 @@ namespace BLL
if (useIDCamera)
{
barcodeInfos = grabOne(out Bitmap bitmap);
if (bitmap==null)
{
LogNet.log.Info("扫码相机获取图片为空!");
}
result[0] = bitmap;
}
else
{
......@@ -181,6 +188,7 @@ namespace BLL
List<BarcodeInfo> barcodeInfos = new List<BarcodeInfo>();
if (string.IsNullOrEmpty(cameraName))
{
LogNet.log.Error($"{cameraName}名称为空!");
return barcodeInfos;
}
try
......@@ -200,11 +208,15 @@ namespace BLL
});
}
if (bitmap == null)
{
LogNet.log.Error($"{cameraName}:扫码相机获取图片为空" + cc.Count);
}
}
catch (Exception e)
{
LogNet.log.Error($"{cameraName}取图失败:", e);
}
}
return barcodeInfos;
}
}
......
......@@ -311,9 +311,6 @@ namespace BLL
/// </summary>
[MyConfigComment("软件后台运行")]
public static MyConfig<bool> Backgrounder;
[MyConfigComment("是否http替换条码内容")]
public static MyConfig<bool> isReplaceData;
[MyConfigComment("数据源类型")]
public static MyConfig<string> DataSource_Type;
[MyConfigComment("数据源文件路径")]
......@@ -347,7 +344,6 @@ namespace BLL
public partial class Config
{
private const string LANGUAGE = "Language";
private const string Smf_Server = "SmfServer";
private const string ClientID = "CID";
......
......@@ -199,7 +199,7 @@ namespace BLL
#region 显示替换数据按钮
string pnkey = ConfigHelper.Config.Get("SelectHttpPN_KeyWords", "");
string pnurl=ConfigHelper.Config.Get("SelectHttpPN_Url","");
if (BLLCommon.config.SelectHttpPN == true&&
if (BLLCommon.config.SelectHttpPN&&
!string.IsNullOrEmpty(pnkey)&&!string.IsNullOrEmpty(pnurl))
{
Dictionary<string, object> C = new(){
......@@ -209,7 +209,7 @@ namespace BLL
{ "Font", "Arial,12,B,"},
{"Width", -1},
{"Height", 40},
{"Text", Asa.FaceControl.Language.Dialog("ReplaceData","替换数据")},}
{"Text", Asa.FaceControl.Language.Dialog("ReplaceData","ReplaceData")},}
},
{
"Event",
......@@ -222,6 +222,30 @@ namespace BLL
listrow.Add(new object[] { C });
}
#endregion
#region 显示重新获取数据源按钮
bool isdisplaybut = ConfigHelper.Config.Get<bool>("DataSource_isdisplaybut", false);
if (isdisplaybut)
{
Dictionary<string, object> displaybut = new(){
{ "Type", "Button" },
{"Attribute",new Dictionary<string, object>(){
{ "Name", "GetDataButton" },
{ "Font", "Arial,12,B,"},
{"Width", -1},
{"Height", 40},
{"Text", Asa.FaceControl.Language.Dialog("RetrieveDataAgain","重新获取数据")},}
},
{
"Event",
new Dictionary<string, object>()
{
{ "Click", "GetDataButtonClick" }
}
}
};
listrow.Add(new object[] { displaybut });
}
#endregion
listrow.Add(new object[] { B });
rows = listrow.ToArray();
}
......
using DocumentFormat.OpenXml.Spreadsheet;
using log4net;
using log4net.Repository.Hierarchy;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
public class InvokePlugin
{
static Assembly assembly;
static Type type;
static object instantiation;
static bool isLoadok = false;
private ILog _log=null;
static Dictionary<string, MethodInfo> MethodInfos = new Dictionary<string, MethodInfo>();
public bool LoadDLL(string plugname, ILog log)
{
if (!isLoadok)
{
_log = log;
isLoadok = _LoadDLL(plugname);
}
return isLoadok;
}
private bool _LoadDLL(string plugname)
{
if (!File.Exists("Config\\" + plugname + ".dll"))
{
_log.Error($"LoadDLL 未找到{plugname}.DLL");
return false;
}
try
{
assembly = Assembly.LoadFrom("config\\" + plugname + ".dll");
}
catch (Exception e)
{
_log.Error("LoadDLL", e);
return false;
}
type = assembly.GetType("Plugin.Plugin");
if (type == null)
{
return false;
}
instantiation = Activator.CreateInstance(type);
_log.Info("LoadDLL success");
string[] methods = new string[] { "RequestServer" };
foreach (var meths in methods)
{
var method = type.GetMethod(meths);
if (method != null)
MethodInfos.Add(meths, method);
}
_log.Info("LoadDLL Method:" + string.Join(",", MethodInfos.Keys));
return true;
}
/// <summary>
/// 替换键值对 值的数据
/// </summary>
/// <param name="dic"></param>
/// <param name="httpmaeth">请求方式:0为httpget;1为httppost;2为soappost</param>
/// <returns></returns>
public Dictionary<string, string> RequestServer(Dictionary<string, string> dic,int httpmaeth)
{
if (!MethodInfos.ContainsKey("RequestServer"))
return null;
return (Dictionary<string, string>)MethodInfos["RequestServer"].Invoke(instantiation, new object[] { dic, httpmaeth });
}
}
}
此文件的差异被折叠, 点击展开。
......@@ -46,8 +46,6 @@ namespace BLL
loop = false;
}
/// <summary>
/// 计时线程
/// </summary>
......@@ -65,7 +63,7 @@ namespace BLL
double mSec = (DateTime.Now - startTime).TotalMilliseconds;
if (mSec >= ms)
{
System.Threading.Tasks.Task.Run(() => Timeout?.Invoke(this, EventArgs.Empty));
System.Threading.Tasks.Task.Run(() => Timeout?.Invoke(this, EventArgs.Empty));
loop = false;
}
}
......
......@@ -37,7 +37,7 @@ namespace BLL
Process process = new Process();
process.StartInfo = new ProcessStartInfo();
process.StartInfo.FileName = paddle;
process.StartInfo.WorkingDirectory = ".\\paddle";
process.StartInfo.WorkingDirectory =Application.StartupPath+"\\paddle";
process.Start();
}
catch (Exception ex)
......@@ -58,7 +58,7 @@ namespace BLL
Process process = new Process();
process.StartInfo = new ProcessStartInfo();
process.StartInfo.FileName = paddle;
process.StartInfo.WorkingDirectory = ".\\paddle";
process.StartInfo.WorkingDirectory = Application.StartupPath + "\\paddle";
process.Start();
}
catch (Exception ex)
......@@ -72,7 +72,9 @@ namespace BLL
[HandleProcessCorruptedStateExceptions]
static string StartCplusOcr(string imgPath)
{
LogNet.log.Error("进入OcrGet请求");
string json=Http.Get($"{baseUrl}?ver=cplus&imgPath={imgPath}");
LogNet.log.Error($"返回数据为:{json}");
Result result= JsonConvert.DeserializeObject<Result>(json);
return result?.data??"";
}
......
......@@ -14,8 +14,6 @@ namespace BLL
private List<PrintLabelTemplate> labelTemp; //所有模板文件
private PrintLabelTemplate interimLabel; //临时的
////private string _path;
//private int labelIdx = -1;
//private int fieldIdx = -1;
......@@ -43,7 +41,6 @@ namespace BLL
//public event SelectEvent Selected;
//public event LabelSizeEvent LabelSize;
public PrintLabelEdit()
{
LogNet.log.Info("读取打印标签");
......@@ -59,7 +56,6 @@ namespace BLL
PrintLabelTemplate temp = LoadFile(xmlFile[i]);
labelTemp.Add(temp);
}
}
public string[] Name
......@@ -368,25 +364,6 @@ namespace BLL
}
//====================================
///// <summary>
///// 标签名称
///// </summary>
......
......@@ -21,23 +21,23 @@ namespace BLL
if (macroKey == null || macroKey.Count < 0)
{
LogNet.log.Error("更换关键字:未找到任何关键字信息,请重新设置!");
throw new Exception("未找到任何关键字信息,请重新设置!");
return jsondata;
}
if (config.Method != Method.POST && config.Method != Method.GET)
{
LogNet.log.Error("更换关键字:请求方式参数不正确!");
throw new Exception("请求方式参数不正确!");
return jsondata;
}
if (config.IsTokenRequired && config.Tokenurl == null)
{
LogNet.log.Error("更换关键字:需要请求token,请填写tokenurl!");
throw new Exception("需要请求token,请填写tokenurl!");
return jsondata;
}
if (string.IsNullOrWhiteSpace(config.Url) || config.KeyWords.Length < 0)
{
LogNet.log.Error("更换关键字:URL和关键字不能为空");
throw new Exception("URL和关键字不能为空");
return jsondata;
}
config.filteredData = macroKey
.Where(kvp => config.KeyWords.Contains(kvp.Key))
......@@ -48,7 +48,7 @@ namespace BLL
{
LogNet.log.Error($"更换关键字:关键字未包含;{config.KeyWords}");
throw new Exception($"关键字未包含;{config.KeyWords}");
return jsondata;
}
#endregion
......@@ -69,7 +69,7 @@ namespace BLL
jsondata = SendHttpRequest(config, request);
if (string.IsNullOrWhiteSpace(jsondata))
{
throw new Exception("返回信息为空请检查请求!");
return jsondata;
}
#endregion
return jsondata;
......
using DataHandling;
using log4net;
using MemoryRead;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Xml;
namespace Plugin
{
public class Plugin
{
private static ILog log = LogManager.GetLogger("SmartScan");
public Dictionary<string, string> CompleteData = new Dictionary<string, string>();
/// <summary>
/// 请求webserver获取替换数据
/// </summary>
/// <param name="pasr">请求的关键字和内容</param>
/// <param name="method">0:http_get;1:http_post;2:soap</param>
/// <returns>返回键值对</returns>
public Dictionary<string, string> RequestServer(Dictionary<string, string> pasr, int method)
{
try
{
log.Info($"WebServer_请求参数:{JsonConvert.SerializeObject(pasr)}");
if (pasr == null || pasr.Count <= 0)
{
log.Info("WebServer_传入参数为空");
return pasr;
}
CompleteData = pasr;
if (!ConfigHelper.Config.Get("WebServer_Isformal", true))
{
pasr = MatchDicData(pasr);
log.Info($"对应关系处理后数据:{JsonConvert.SerializeObject(pasr)}");
}
Dictionary<string, string> dic = new Dictionary<string, string>();
String Url = ConfigHelper.Config.Get("WebServer_Url", "http://10.159.150.10/EIWebService/Service1.asmx");
String MethodName = ConfigHelper.Config.Get("WebServer_MethodName", "VmsizBarkodOlusturUserName");
WebServiceHelper webService = new WebServiceHelper(log);
switch (method)
{
case 0:
dic = webService.QueryGetWebService(Url, MethodName, pasr);
break;
case 1:
dic = webService.QueryPostWebService(Url, MethodName, pasr);
break;
case 2:
dic = webService.QuerySoapWebService(Url, MethodName, pasr);
break;
default:
break;
}
//foreach (var item in dic)
//{
// if (CompleteData.ContainsKey(item.Key))
// {
// CompleteData[item.Key] = item.Value;
// }
//}
//return CompleteData;
if (dic != null || dic.Count != 0)
{
string json = JsonConvert.SerializeObject(dic);
log.Info($"WebServer_返回数据:{json}");
}
else
{
log.Info($"WebServer_返回数据:为空!");
}
return YourMethod(dic);
}
catch (Exception ex)
{
log.Info($"WebServer请求出错:{ex.Message}");
return CompleteData;
}
//string[] shuz = { "Material code", "Tracibilty Serial Number", "Qty", "Supplier Code", "Code for who printed this label", "Qr barcode" };
}
/// <summary>
/// 对应键值对信息
/// </summary>
/// <param name="dic"></param>
/// <returns></returns>
public Dictionary<string, string> MatchDicData(Dictionary<string, string> dic)
{
Dictionary<string, string> parameterToContent = new Dictionary<string, string>();
string json = ConfigHelper.Config.Get("WebServer_Match", "{\"malzemeKodu\":\"\",\"firmaKodu\":\"\",\"malzemeAdet\":\"\",\"lot\":\"\",\"firmaUrunKodu\":\"PN\"}");
Dictionary<string, string> matchdata = JsonConvert.DeserializeObject<Dictionary<string, string>>(json);
foreach (var item in matchdata)
{
if (dic.ContainsKey(item.Value))
{
parameterToContent.Add(item.Key, dic[item.Value]);
}
}
parameterToContent.Add("barkodAdet", "1");
parameterToContent.Add("printerMacId", "0F0F0F0F0F0F");
parameterToContent.Add("userName", "bekoservice");
parameterToContent.Add("pass", "beko1209tyu");
parameterToContent.Add("basanUserName", "579");
return parameterToContent;
}
/// <summary>
/// 对应返回的键值对数据
/// </summary>
/// <param name="dic"></param>
/// <returns></returns>
public Dictionary<string, string> YourMethod(Dictionary<string, string> dic)
{
List<string> strings = new List<string>();
foreach (var item in dic)
{
strings.Add(item.Value);
}
log.Info($"请求完成数据:{string.Join(",", strings)}");
if (strings.Contains("OK"))
{
string[] arr = strings[1].Split('$');
if (ConfigHelper.Config.Get("WebServer_Isformal", true))
{
Dictionary<string, string> keys = new Dictionary<string, string>()
{
{"Material code", arr[1]},
{"Tracibilty Serial Number", arr[2]},
{"Qty", arr[3]},
{"Supplier Code", arr[4]},
{"Code for who printed this label", "579579"},
{"Qr barcode", strings[1]}
};
return keys;
}
else
{
try
{
Dictionary<string, int> valuePairs = new Dictionary<string, int>()
{
{"Material code", 0},
{"Tracibilty Serial Number", 1},
{"Qty", 2},
{"Supplier Code", 3},
{"Code for who printed this label", 4},
{"Qr barcode", 5}
};
foreach (var item in valuePairs)
{
if (CompleteData.ContainsKey(item.Key))
{
if (valuePairs.Count > 4)
{
CompleteData[item.Key] = arr[item.Value];
}
}
}
if (CompleteData.ContainsKey("Code for who printed this label"))
{
CompleteData["Code for who printed this label"] = "579579";
}
if (CompleteData.ContainsKey("Qr barcode"))
{
CompleteData["Qr barcode"] = strings[1];
}
log.Info($"请求对应完成数据:{string.Join(",", CompleteData.Values)}");
}
catch (Exception ex)
{
log.Error($"处理返回数据报错:{ex.Message}");
}
}
}
return CompleteData;
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{0F23B7DB-9953-46ED-9166-115646467647}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>DataHandling</RootNamespace>
<AssemblyName>DataHandling</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="ConfigHelper">
<HintPath>..\..\..\..\类库\ConfigHelper.dll</HintPath>
</Reference>
<Reference Include="log4net, Version=2.0.12.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\CameraLibraryProject\CameraLibraryProject\CodeLibraryProject\CodeLibrary\bin\Debug\log4net.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>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CallImplementation.cs" />
<Compile Include="LogUtil.cs" />
<Compile Include="WebServiceHelper.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
using log4net.Config;
using log4net;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace MemoryRead
{
public class LogUtil
{
public static ILog LOGGER;
static LogUtil()
{
XmlConfigurator.Configure(new FileInfo("log4net.config"));
LOGGER = LogManager.GetLogger("SmartScan");
}
public static void info(string str, Color color)
{
LOGGER.Info(str);
}
public static void info(string str)
{
LOGGER.Info(str);
}
public static void error(string str, Exception err)
{
LOGGER.Error(str, err);
}
public static void error(string str)
{
LOGGER.Error(str);
}
public static void debug(string str)
{
LOGGER.Debug(str);
}
}
}
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("DataHandling")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DataHandling")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("0f23b7db-9953-46ed-9166-115646467647")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", Watch = true)]
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="2.0.15" targetFramework="net472" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net472" />
</packages>
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
public class AMatch
{
/// <summary>
/// 条码匹配结果
/// </summary>
public bool[] IsCodeUsed { get; set; }
/// <summary>
/// 第一个匹配条码的坐标
/// </summary>
public Point Points { get; set; }=new Point(-1,-1);
/// <summary>
/// 第一个匹配条码的角度
/// </summary>
public int Angle { get; set; } = 0;
}
/// <summary>
/// 计算完成新的XY坐标及角度
/// </summary>
public class NewPositionAngle()
{
public int X { get; set; }
public int Y { get; set; }
public int Angle { get; set; }
public bool[] IsCodeUsed { get; set; }
}
}
......@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Model
{
......@@ -13,7 +14,7 @@ namespace Model
{
public static readonly string LANGUAGE_DIR = Environment.CurrentDirectory + "\\Language\\";
public static readonly string MATERIAL_DIR = Environment.CurrentDirectory + "\\Material\\";
public static readonly string RETROSPECT_DIR = Environment.CurrentDirectory + "\\Retrospect\\";
public static readonly string RETROSPECT_DIR = Application.StartupPath + "\\Retrospect\\";
public static readonly string PRINT_LABEL_DIR = Environment.CurrentDirectory + "\\PrintLabel\\";
public static readonly string CONFIG_DIR = Environment.CurrentDirectory + "\\Config\\";
......
......@@ -33,11 +33,15 @@ namespace Model
public static string Get(string url)
{
RestClient client = new(url) { Timeout = 60000 };
RestRequest request = new(Method.GET);
IRestResponse response = client.Execute(request);
string s = response.Content;
//RestClient client = new(url) { Timeout = 60000 };
//RestRequest request = new(Method.GET);
//IRestResponse response = client.Execute(request);
//string s = response.Content;
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, url);
var response = client.SendAsync(request).Result;
response.EnsureSuccessStatusCode();
string s= response.Content.ReadAsStringAsync().Result;
LogNet.log.Info($"[GET][URL:{url}][Return:{s}]");
return FormatContent(s);
}
......
......@@ -4,6 +4,8 @@ using System.ServiceModel.Web;
using System.Runtime.Serialization;
using System.Collections.Generic;
using CameraVisionLib.Model;
using System.Drawing;
using System.Reflection;
namespace Model
{
......@@ -28,6 +30,12 @@ namespace Model
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "NeoScan/ProcessBitmap?param={param}", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
WebResultCode ProcessBitmap(Stream info, string param);
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "NeoScan/ProcessBitmaps",
BodyStyle = WebMessageBodyStyle.Bare,
RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
WebResultCode ProcessBitmaps(BitmapData bitmapData);
}
[DataContract]
......@@ -61,6 +69,8 @@ namespace Model
[DataMember]
public List<BarcodeInfo> workCodeInfo = new List<BarcodeInfo>();
[DataMember]
public NewPositionAngle PositionAngle { get; set; }
public WebResultCode()
{
ErrorCode = 0;
......@@ -87,4 +97,71 @@ namespace Model
public bool IsUsed { get; set; } = false;
}
[DataContract]
public class BitmapData
{
[DataMember]
public string ImageData { get; set; }
[DataMember]
public List<BarcodeInfos> BarCodeList { get; set; }
/// <summary>
/// 中心点xy
/// </summary>
[DataMember]
public int X { get; set; }
[DataMember]
public int Y { get; set; }
[DataMember]
public bool IsIDCamera { get; set; }
[DataMember]
public int PlateW { get; set; }
}
[DataContract]
public class BarcodeInfos
{
//
// 摘要:
// 文本
[DataMember]
public string Text { get; set; }
//
// 摘要:
// 条码类型
[DataMember]
public string CodeType { get; set; }
//
// 摘要:
// 中心点
//[DataMember]
//public PointF Center { get; set; }
[DataMember]
public int X { get; set; }
[DataMember]
public int Y { get; set; }
////
//// 摘要:
//// 条码尺寸大小
//[DataMember]
//public SizeF Size { get; set; }
//
// 摘要:
// 角度,3点钟方向0°,逆时针为正,顺时针为负。
[DataMember]
public float Angle { get; set; }
//
// 摘要:
// 原点垂直于经过中心点的直线的距离
[DataMember]
public float Distance { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
public class LabelingData
{
/// <summary>
/// 标签名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 是否覆盖圆标签
/// </summary>
public bool IsOverlaylabel { get; set; } = true;
/// <summary>
/// X轴偏移量
/// </summary>
public int Xoffset { get; set; } = 0;
/// <summary>
/// Y轴偏移量
/// </summary>
public int Yoffset { get; set; } = 0;
/// <summary>
/// 是否顺时针旋转
/// </summary>
public bool IscIockwise { get; set; } = false;
/// <summary>
/// 是否顺时针旋转
/// </summary>
public bool IsCounterclockwise { get; set; } = false;
/// <summary>
/// 旋转角度
/// </summary>
public int RotationAngle { get; set; } = 0;
/// <summary>
/// 标签角度
/// </summary>
public int LabelRotationAngle { get; set; } = 0;
}
}
......@@ -52,6 +52,10 @@ namespace Model
public int SplitPart { get; set; } = 1;
public bool MatchISNumber { get; set; } = false;
/// <summary>
/// 特征条码
/// </summary>
public bool Characteristic { get; set; } = false;
public MaterialCodeMatch Clone()
{
MaterialCodeMatch node = new();
......
......@@ -77,6 +77,7 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AMatch.cs" />
<Compile Include="AutoGenRule.cs" />
<Compile Include="ExtensionControl.cs" />
<Compile Include="ExtensionFunction.cs" />
......@@ -86,6 +87,7 @@
<Compile Include="IExtension.cs" />
<Compile Include="ISetMenu.cs" />
<Compile Include="IWeb.cs" />
<Compile Include="LabelingData.cs" />
<Compile Include="LanguageDialogKey.cs" />
<Compile Include="Log.cs" />
<Compile Include="MaterialAsciiCode.cs" />
......
......@@ -15,6 +15,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Model", "Model\Model.csproj
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "paddleOCR", "paddleOCR\paddleOCR.csproj", "{7178A902-E193-40CB-8AF5-4EEA05876522}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataHandling", "DataHandling\DataHandling.csproj", "{0F23B7DB-9953-46ED-9166-115646467647}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
......@@ -97,6 +99,18 @@ Global
{7178A902-E193-40CB-8AF5-4EEA05876522}.Release|x64.Build.0 = Release|Any CPU
{7178A902-E193-40CB-8AF5-4EEA05876522}.Release|x86.ActiveCfg = Release|x86
{7178A902-E193-40CB-8AF5-4EEA05876522}.Release|x86.Build.0 = Release|x86
{0F23B7DB-9953-46ED-9166-115646467647}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0F23B7DB-9953-46ED-9166-115646467647}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0F23B7DB-9953-46ED-9166-115646467647}.Debug|x64.ActiveCfg = Debug|Any CPU
{0F23B7DB-9953-46ED-9166-115646467647}.Debug|x64.Build.0 = Debug|Any CPU
{0F23B7DB-9953-46ED-9166-115646467647}.Debug|x86.ActiveCfg = Debug|Any CPU
{0F23B7DB-9953-46ED-9166-115646467647}.Debug|x86.Build.0 = Debug|Any CPU
{0F23B7DB-9953-46ED-9166-115646467647}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0F23B7DB-9953-46ED-9166-115646467647}.Release|Any CPU.Build.0 = Release|Any CPU
{0F23B7DB-9953-46ED-9166-115646467647}.Release|x64.ActiveCfg = Release|Any CPU
{0F23B7DB-9953-46ED-9166-115646467647}.Release|x64.Build.0 = Release|Any CPU
{0F23B7DB-9953-46ED-9166-115646467647}.Release|x86.ActiveCfg = Release|Any CPU
{0F23B7DB-9953-46ED-9166-115646467647}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
using Model;
using System;
using System.Collections.Generic;
using System.Drawing;
namespace SmartScan
namespace SmartScan
{
public static class Common
{
public static FrmMain frmMain;
public static FrmWaitting frmWaitting;
}
}
......@@ -54,6 +54,7 @@ namespace SmartScan
ChkCaseSensitivity.Checked = matchShared.CaseSensitive;
ChoMatchMiddleType.SelectedIndex = matchShared.MatchMiddleType + 1;
ChkCheckCodeType.Checked = matchShared.CheckCodeType;
Characteristicbarcode.Checked = matchShared.Characteristic;
LblCodeType.Text = codeType;
for (int i = 0; i < match.Count; i++)
......@@ -64,6 +65,13 @@ namespace SmartScan
BtnAddMatch_Click(null, EventArgs.Empty);
myStringArray = strings;
//if (BLL.Config.Backgrounder)
//{
// Characteristicbarcode.Visible = true;
//}
Characteristicbarcode.Visible = true;
}
public List<MaterialCodeMatch> CodeMatch { get; private set; }
......@@ -232,7 +240,7 @@ namespace SmartScan
match.CodeType = LblCodeType.Text;
match.MatchMiddleType = ChoMatchMiddleType.SelectedIndex - 1;
match.CodeID = codeID;
match.Characteristic = Characteristicbarcode.Checked;
var hasmatchselect = match.MatchISNumber || match.CheckCodeType || match.MatchEnd || match.MatchMaxLength || match.MatchMiddle || match.MatchMinLength || match.MatchSplit || match.MatchStart;
if (!hasmatchselect)
{
......
......@@ -3,6 +3,7 @@ using Model;
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Threading;
using System.Windows.Forms;
......@@ -21,10 +22,11 @@ namespace SmartScan
private void Init()
{
Process current = Process.GetCurrentProcess();
FileInfo fileInfo = new FileInfo(current.MainModule.FileName);
DateTime dateTime = fileInfo.LastWriteTime;
FileInfo fileInfo = new FileInfo(current.MainModule.FileName);
LogNet.log = log4net.LogManager.GetLogger("SmartScan");
string version = $"{dateTime.Year%10}.{dateTime.Month}.{dateTime.Day.ToString("00")}{dateTime.Hour.ToString("00")}";
//DateTime dateTime = fileInfo.LastWriteTime;
//string version = $"{dateTime.Year%10}.{dateTime.Month}.{dateTime.Day.ToString("00")}{dateTime.Hour.ToString("00")}";
string version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
LogNet.log.Info($"===== 程序开始 {version} =====");
BLLCommon.config = new BLL.Config();
......@@ -35,7 +37,6 @@ namespace SmartScan
Asa.FaceControl.Language.LoadPath(FilePath.LANGUAGE_DIR);
LogNet.log.Debug("加载语言文件夹:" + FilePath.LANGUAGE_DIR);
Asa.FaceControl.Language.LoadLanguage(BLLCommon.config.Language);
Camera.LoadCamera();
if (BLLCommon.config.EnabledIO)
......@@ -55,7 +56,8 @@ namespace SmartScan
BLLCommon.extension = new(BLLCommon.config);
BLLCommon.labelEdit = new();
BLLCommon.mateEdit = new();
WebService.Open();
//如果是直接启动ns100就不需要开启条码规则服务
//WebService.Open();
ReadMacro();
Shortcut();
......
......@@ -122,7 +122,7 @@ namespace SmartScan
this.BtnTriggerIO.BorderWidth = 2;
this.BtnTriggerIO.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnTriggerIO.HoldPress = false;
this.BtnTriggerIO.Location = new System.Drawing.Point(11, 643);
this.BtnTriggerIO.Location = new System.Drawing.Point(11, 616);
this.BtnTriggerIO.Name = "BtnTriggerIO";
this.BtnTriggerIO.Padding = new System.Windows.Forms.Padding(3);
this.BtnTriggerIO.Size = new System.Drawing.Size(160, 40);
......@@ -137,7 +137,7 @@ namespace SmartScan
this.LblCameraExist.BorderStyle = Asa.FaceControl.ControlShape.EllipseRectangle;
this.LblCameraExist.BorderWidth = 2;
this.LblCameraExist.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblCameraExist.Location = new System.Drawing.Point(11, 689);
this.LblCameraExist.Location = new System.Drawing.Point(11, 662);
this.LblCameraExist.Name = "LblCameraExist";
this.LblCameraExist.Padding = new System.Windows.Forms.Padding(3);
this.LblCameraExist.Size = new System.Drawing.Size(160, 40);
......@@ -151,7 +151,7 @@ namespace SmartScan
this.LblIOExist.BorderStyle = Asa.FaceControl.ControlShape.EllipseRectangle;
this.LblIOExist.BorderWidth = 2;
this.LblIOExist.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblIOExist.Location = new System.Drawing.Point(11, 735);
this.LblIOExist.Location = new System.Drawing.Point(11, 708);
this.LblIOExist.Name = "LblIOExist";
this.LblIOExist.Padding = new System.Windows.Forms.Padding(3);
this.LblIOExist.Size = new System.Drawing.Size(160, 40);
......@@ -170,7 +170,7 @@ namespace SmartScan
this.PicShow.Location = new System.Drawing.Point(177, 55);
this.PicShow.Name = "PicShow";
this.PicShow.Padding = new System.Windows.Forms.Padding(3);
this.PicShow.Size = new System.Drawing.Size(667, 749);
this.PicShow.Size = new System.Drawing.Size(667, 722);
this.PicShow.TabIndex = 10;
this.PicShow.Text = "facePictureBox1";
//
......@@ -185,7 +185,7 @@ namespace SmartScan
this.PnlExtension.Location = new System.Drawing.Point(850, 55);
this.PnlExtension.Name = "PnlExtension";
this.PnlExtension.Padding = new System.Windows.Forms.Padding(3);
this.PnlExtension.Size = new System.Drawing.Size(235, 749);
this.PnlExtension.Size = new System.Drawing.Size(235, 722);
this.PnlExtension.TabIndex = 11;
this.PnlExtension.Text = "facePanel1";
this.PnlExtension.TextHeight = 36;
......@@ -234,12 +234,13 @@ namespace SmartScan
this.LblVersion.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.LblVersion.BorderWidth = 0;
this.LblVersion.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblVersion.Location = new System.Drawing.Point(11, 781);
this.LblVersion.Location = new System.Drawing.Point(11, 754);
this.LblVersion.Name = "LblVersion";
this.LblVersion.Padding = new System.Windows.Forms.Padding(3);
this.LblVersion.Size = new System.Drawing.Size(160, 23);
this.LblVersion.TabIndex = 14;
this.LblVersion.Text = "Version";
this.LblVersion.Click += new System.EventHandler(this.LblVersion_Click);
//
// LblUserName
//
......@@ -249,7 +250,7 @@ namespace SmartScan
this.LblUserName.BorderWidth = 0;
this.LblUserName.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.LblUserName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.LblUserName.Location = new System.Drawing.Point(11, 614);
this.LblUserName.Location = new System.Drawing.Point(11, 587);
this.LblUserName.Name = "LblUserName";
this.LblUserName.Padding = new System.Windows.Forms.Padding(3);
this.LblUserName.Size = new System.Drawing.Size(160, 23);
......@@ -259,7 +260,7 @@ namespace SmartScan
// FrmMain
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(1096, 815);
this.ClientSize = new System.Drawing.Size(1096, 788);
this.Controls.Add(this.PicShow);
this.Controls.Add(this.LblUserName);
this.Controls.Add(this.LblVersion);
......
using System;
using Asa.FaceControl;
using BLL;
using DocumentFormat.OpenXml.Bibliography;
using Model;
using Newtonsoft.Json;
using SmartScan.Form;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using Asa.FaceControl;
using System.Windows.Forms;
using BLL;
using Model;
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;
using System.Web.Script.Serialization;
using System.Windows.Forms;
namespace SmartScan
{
......@@ -167,7 +164,6 @@ namespace SmartScan
//LogNet.log.Info(string.Format("打印标签 Label[{0}] Printer[{1}]", Common.config.DefaultPrintLabel, Common.config.PrinterName));
var barcode = content.Values.ToArray();
SaveRetrospect(labelBmp, barcode, content);
}
catch (Exception ex)
{
......@@ -209,7 +205,10 @@ namespace SmartScan
try
{
foreach (string key in content.Keys)
str += string.Format("({0}:{1})", key, content[key]);
{
str += string.Format("({0}:{1})", key, content[key]);
}
LogNet.log.Info(str);
SaveResult(content);
//Bitmap labelBmp = Common.labelEdit.PrintImage(Common.config.DefaultPrintLabel, content, out _);
......@@ -218,7 +217,7 @@ namespace SmartScan
//SaveRetrospect(labelBmp, barcode);
if (BLLCommon.config.PrintCompletedClear)
BLLCommon.extension.Clear();
BLLCommon.extension.Clear();
}
catch (Exception ex)
{
......@@ -250,6 +249,7 @@ namespace SmartScan
LblUserName.Visible = false;
BtnSet.Enabled = BLLCommon.config.UserLevel == UserLevel.Admin;
FrmRetrospect.Print += Extension_Printing;
//扩展面板
PnlExtension.Width = BLLCommon.config.ExtensionWidth;
PnlExtension.Left = Width - PnlExtension.Width - 12;
......@@ -289,7 +289,7 @@ namespace SmartScan
}
else
{
Hide();
//Hide();
bool rtn = UserLoginWindow.Show();
if (rtn)
{
......@@ -386,9 +386,9 @@ namespace SmartScan
private void BtnSet_Click(object sender, EventArgs e)
{
monitor.Pause = true;
FrmSet set =new FrmSet();
set.Width=PicShow.Width;
set.Height=PicShow.Height;
FrmSet set = new FrmSet();
set.Width = PicShow.Width;
set.Height = PicShow.Height;
set.ShowDialog();
monitor.Pause = false;
}
......@@ -401,15 +401,14 @@ namespace SmartScan
}
private void BtnTriggerIO_Click(object sender, EventArgs e)
{
{
LogNet.log.Info("按钮点击触发Work");
Task.Run(() =>
{
scanWork.Scan();
//scanWork.TouchOff();
});
}
}
private void BtnMatchedName_Click(object sender, EventArgs e)
{
......@@ -442,9 +441,8 @@ namespace SmartScan
}
Common.frmWaitting.Close();
}
public void SetWaittingMsg(string msg)
public void SetWaittingMsg(string msg,int keepsec=3)
{
if (Common.frmMain.InvokeRequired)
{
Common.frmMain.Invoke(delegate ()
......@@ -453,12 +451,11 @@ namespace SmartScan
});
return;
}
BLLCommon.SCMM.ShowMsg(msg, 3, msgType.INFO);
//BLLCommon.SCMM.ShowMsg(msg, keepsec, msgType.INFO);
Common.frmWaitting.SetMessage(msg);
Application.DoEvents();
}
public void DrawTextForm(Dictionary<string,string> valuePairs)
{
//
......@@ -475,5 +472,15 @@ namespace SmartScan
BLLCommon.extension.DrawTextBackground(valuePairs);
Application.DoEvents();
}
private void LblVersion_Click(object sender, EventArgs e)
{
//var HCEditor = new HCEditor();
//if (Config.Get<int>("HB_ENABLE") >= 1)
// new HBEditor();
ConfigHelper.AdvanceConfigForm.ShowEditDialog(this, true);
}
}
}
using System;
using Asa.FaceControl;
using BLL;
using Model;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.ConstrainedExecution;
using System.Text;
using Asa.FaceControl;
using System.Windows.Forms;
using System.Reflection;
using System.Web.UI.WebControls;
using DocumentFormat.OpenXml.ExtendedProperties;
using DocumentFormat.OpenXml.Wordprocessing;
using BLL;
using System.Configuration;
using System.Diagnostics;
using System.IO;
using System.Xml.Linq;
namespace SmartScan
{
public partial class FrmRetrospect : FaceFormFixed
{
public delegate void RestrPrint(Dictionary<string, string> keys);
public static event RestrPrint Print;
private List<HistoryPath> fileFull = new();
public FrmRetrospect()
{
InitializeComponent();
}
private class HistoryPath
{
public string cameraPath = "";
......@@ -132,13 +125,23 @@ namespace SmartScan
private void FrmRetrospect_Load(object sender, EventArgs e)
{
int SH = Screen.PrimaryScreen.Bounds.Height; //1080
int SW = Screen.PrimaryScreen.Bounds.Width; //1920
if (SH>=1080&&SW>=1920)
{
this.Width = 1200;
this.Height = 800;
}
DtpLower.Value = DateTime.Now.Date;
DtpUpper.Value = DateTime.Now.Date;
tableLayoutPanel1.Width = this.Width-20;
tableLayoutPanel1.Height = this.Height - 60;
if (ConfigHelper.Config.Get("Display_EnableGetData", "1181")=="1181")
{
butt_getData.Visible = true;
LstRecord.Height = 206;
butt_startserver.Visible = true;
}
this.StartPosition = FormStartPosition.CenterScreen;
}
private void BtnSelect_Click(object sender, EventArgs e)
......@@ -197,8 +200,10 @@ namespace SmartScan
LstRecord.Items.Clear();
LstRecord.Items.AddRange(items);
LstRecord.SelectedFirst();
faceLabel1.Text = string.Format(Language.Dialog("information"), fileFull.Count);
}
Dictionary<string, string> printdic = new Dictionary<string, string>();
private void LstRecord_SelectedIndexChanged(object sender, EventArgs e)
{
if (LstRecord.Items.Count == 0)
......@@ -213,27 +218,30 @@ namespace SmartScan
LstCode.Items.Clear();
PicShow.CodeCenterClear();
LstLabel.Items.Clear();
string json = System.IO.File.ReadAllText(path.codePath);
System.Web.Script.Serialization.JavaScriptSerializer serializer = new();
Dictionary<string, object> dic = (Dictionary<string, object>)serializer.DeserializeObject(json);
if (dic.ContainsKey("Code"))
{
object[] obj = (object[])dic["Code"];
string[] items = new string[obj.Length];
PointF[] center = new PointF[obj.Length];
for (int i = 0; i < obj.Length; i++)
if (dic["Code"]!=null)
{
Dictionary<string, object> dicCode = (Dictionary<string, object>)obj[i];
items[i] = dicCode["Text"].ToString().Replace("\r", "");
items[i] = items[i].Replace("\n", "");
items[i] = string.Format("({0}) {1}", i + 1, items[i]);
center[i] = new(Convert.ToSingle(dicCode["X"]), Convert.ToSingle(dicCode["Y"]));
object[] obj = (object[])dic["Code"];
string[] items = new string[obj.Length];
PointF[] center = new PointF[obj.Length];
for (int i = 0; i < obj.Length; i++)
{
Dictionary<string, object> dicCode = (Dictionary<string, object>)obj[i];
items[i] = dicCode["Text"].ToString().Replace("\r", "");
items[i] = items[i].Replace("\n", "");
items[i] = string.Format("({0}) {1}", i + 1, items[i]);
center[i] = new(Convert.ToSingle(dicCode["X"]), Convert.ToSingle(dicCode["Y"]));
}
LstCode.Items.AddRange(items);
PicShow.AddCodeCenter(center);
LstCode.SelectedIndex = -1;
}
LstCode.Items.AddRange(items);
PicShow.AddCodeCenter(center);
LstCode.SelectedIndex = -1;
}
if (dic.ContainsKey("Label"))
......@@ -246,6 +254,28 @@ namespace SmartScan
LstLabel.SelectedIndex = -1;
}
//添加关键字键值对,用于打印
printdic.Clear();
try
{
if (dic.ContainsKey("Content"))
{
var content = (object[])dic["Content"];
var dictionary = (Dictionary<string, object>)content[0];
foreach (var item in dictionary)
{
if (!string.IsNullOrWhiteSpace((string)item.Value))
{
printdic.Add(item.Key, (string)item.Value);
}
}
}
}
catch (Exception)
{
LogNet.log.Info("打印内容加载出错");
printdic = new Dictionary<string, string>();
}
}
/// <summary>
/// 导出文件格式
......@@ -334,12 +364,11 @@ namespace SmartScan
return true;
else if (!BLLCommon.macroKey.Contains(pairs[0])) { return false; }
}
}
}
return true;
}
bool checkHasMacroKey(Dictionary<string, object> content)
{
for (int i = 0; i < BLLCommon.macroKey.Count; i++)
......@@ -434,13 +463,13 @@ namespace SmartScan
var pss = Process.GetProcessesByName(servicename);
if (pss.Length > 0)
return;
var f = ConfigHelper.Config.Get("Display_GetDataAppPath");
if (!File.Exists(f))
var serverpath =Application.StartupPath+"\\"+ConfigHelper.Config.Get("Display_GetDataAppPath");
if (!File.Exists(serverpath))
throw new Exception("未找到服务文件!");
proes.StartInfo = new ProcessStartInfo
{
FileName = f,
WorkingDirectory = System.IO.Path.Combine(Environment.CurrentDirectory, "ASTI"),
FileName = serverpath,
WorkingDirectory = System.IO.Path.Combine(Application.StartupPath, "ASTI"),
Verb = "runas" // 这里设置为 "runas" 表示以管理员身份运行
};
proes.StartInfo.UseShellExecute = false;
......@@ -448,10 +477,18 @@ namespace SmartScan
}
catch (Exception)
{
throw;
}
}
private void faceBut_prin_Click(object sender, EventArgs e)
{
if (printdic.Count==0)
{
LogNet.log.Info("打印参数为0");
return;
}
Print?.Invoke(printdic);
}
}
}
......@@ -47,10 +47,10 @@ namespace SmartScan
this.BtnGenneralSetting.BorderWidth = 2;
this.BtnGenneralSetting.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnGenneralSetting.HoldPress = false;
this.BtnGenneralSetting.Location = new System.Drawing.Point(11, 279);
this.BtnGenneralSetting.Location = new System.Drawing.Point(11, 292);
this.BtnGenneralSetting.Name = "BtnGenneralSetting";
this.BtnGenneralSetting.Padding = new System.Windows.Forms.Padding(3);
this.BtnGenneralSetting.Size = new System.Drawing.Size(160, 50);
this.BtnGenneralSetting.Size = new System.Drawing.Size(196, 50);
this.BtnGenneralSetting.TabIndex = 3;
this.BtnGenneralSetting.Text = "GeneralSetting";
this.BtnGenneralSetting.Click += new System.EventHandler(this.BtnMenu_Click);
......@@ -62,10 +62,10 @@ namespace SmartScan
this.BtnLabel.BorderWidth = 2;
this.BtnLabel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnLabel.HoldPress = false;
this.BtnLabel.Location = new System.Drawing.Point(11, 167);
this.BtnLabel.Location = new System.Drawing.Point(11, 178);
this.BtnLabel.Name = "BtnLabel";
this.BtnLabel.Padding = new System.Windows.Forms.Padding(3);
this.BtnLabel.Size = new System.Drawing.Size(160, 50);
this.BtnLabel.Size = new System.Drawing.Size(196, 50);
this.BtnLabel.TabIndex = 5;
this.BtnLabel.Text = "Label";
this.BtnLabel.Click += new System.EventHandler(this.BtnMenu_Click);
......@@ -77,10 +77,10 @@ namespace SmartScan
this.BtnMaterial.BorderWidth = 2;
this.BtnMaterial.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnMaterial.HoldPress = false;
this.BtnMaterial.Location = new System.Drawing.Point(11, 111);
this.BtnMaterial.Location = new System.Drawing.Point(11, 121);
this.BtnMaterial.Name = "BtnMaterial";
this.BtnMaterial.Padding = new System.Windows.Forms.Padding(3);
this.BtnMaterial.Size = new System.Drawing.Size(160, 50);
this.BtnMaterial.Size = new System.Drawing.Size(196, 50);
this.BtnMaterial.TabIndex = 6;
this.BtnMaterial.Text = "Material";
this.BtnMaterial.Click += new System.EventHandler(this.BtnMenu_Click);
......@@ -92,10 +92,10 @@ namespace SmartScan
this.BtnKeyword.BorderWidth = 2;
this.BtnKeyword.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnKeyword.HoldPress = false;
this.BtnKeyword.Location = new System.Drawing.Point(11, 55);
this.BtnKeyword.Location = new System.Drawing.Point(11, 64);
this.BtnKeyword.Name = "BtnKeyword";
this.BtnKeyword.Padding = new System.Windows.Forms.Padding(3);
this.BtnKeyword.Size = new System.Drawing.Size(160, 50);
this.BtnKeyword.Size = new System.Drawing.Size(196, 50);
this.BtnKeyword.TabIndex = 7;
this.BtnKeyword.Text = "Keyword";
this.BtnKeyword.Click += new System.EventHandler(this.BtnMenu_Click);
......@@ -141,10 +141,10 @@ namespace SmartScan
this.PnlTemp.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.PnlTemp.BorderWidth = 2;
this.PnlTemp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.PnlTemp.Location = new System.Drawing.Point(177, 55);
this.PnlTemp.Location = new System.Drawing.Point(213, 55);
this.PnlTemp.Name = "PnlTemp";
this.PnlTemp.Padding = new System.Windows.Forms.Padding(3);
this.PnlTemp.Size = new System.Drawing.Size(836, 656);
this.PnlTemp.Size = new System.Drawing.Size(800, 656);
this.PnlTemp.TabIndex = 11;
this.PnlTemp.Text = "facePanel1";
this.PnlTemp.TitleFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
......@@ -173,10 +173,10 @@ namespace SmartScan
this.BtnDataSource.BorderWidth = 2;
this.BtnDataSource.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnDataSource.HoldPress = false;
this.BtnDataSource.Location = new System.Drawing.Point(11, 223);
this.BtnDataSource.Location = new System.Drawing.Point(11, 235);
this.BtnDataSource.Name = "BtnDataSource";
this.BtnDataSource.Padding = new System.Windows.Forms.Padding(3);
this.BtnDataSource.Size = new System.Drawing.Size(160, 50);
this.BtnDataSource.Size = new System.Drawing.Size(196, 50);
this.BtnDataSource.TabIndex = 7;
this.BtnDataSource.Text = "Datasource";
this.BtnDataSource.Click += new System.EventHandler(this.BtnMenu_Click);
......
......@@ -18,6 +18,7 @@ namespace SmartScan
public FrmSet()
{
InitializeComponent();
//WebService.Open();//启动条码匹配服务
}
private void FrmSet_Load(object sender, EventArgs e)
{
......@@ -46,7 +47,7 @@ namespace SmartScan
menu[BtnKeyword].GetPanel().Visible = true;
Maximize();
}
private void BtnMenu_Click(object sender, EventArgs e)
{
foreach (FaceButton button in menu.Keys)
......
......@@ -38,6 +38,7 @@ namespace SmartScan
private void FrmWaitting_Load(object sender, EventArgs e)
{
this.Text = Language.Dialog("PleaseWaiting");//请稍后
this.label1.Text= Language.Dialog("PleaseWaiting");
faceLoading1.Start();
Task.Run(()=> {
Task.Delay(10 * 1000).Wait();
......
......@@ -63,7 +63,7 @@ FrmMain_BtnPrint 打印标签 打印标签 微软雅黑,12,,
FrmMain_DynamicButton 替换数据 替换数据 微软雅黑,12,,
FrmSet_FrmSet 设置 设置 微软雅黑,20,B,
FrmSet_BtnGenneralSetting 通用设置 通用设置 微软雅黑,12,B,
FrmSet_BtnIdentify 识别设备 识别设备 微软雅黑,12,B,
FrmSet_BtnIdentify 识别条码 识别条码 微软雅黑,12,B,
FrmSet_BtnLabel 打印模版 打印模版 微软雅黑,12,B,
FrmSet_BtnMaterial 物料模版 物料模版 微软雅黑,12,B,
FrmSet_BtnKeyword 关键字 关键字 微软雅黑,12,B,
......@@ -73,14 +73,16 @@ FrmSet_BtnApply 应用 应用 微软雅黑,12,,
FrmSet_BtnDataSource 数据源 数据源 微软雅黑,12,B,
FrmSetPlus_FrmSetPlus 条码规则设置 条码规则设置 微软雅黑,20,B,
FrmSetPlus_BtnWorkMode 工作模式 工作模式 微软雅黑,12,B,
FrmSetPlus_BtnIdentify 识别设备 识别设备 微软雅黑,12,B,
FrmSetPlus_BtnIdentify 识别条码 识别条码 微软雅黑,12,B,
FrmSetPlus_BtnLabel 打印模版 打印模版 微软雅黑,12,B,
FrmSetPlus_BtnMaterial 物料模版 物料模版 微软雅黑,12,B,
FrmSetPlus_BtnKeyword 关键字 关键字 微软雅黑,12,B,
FrmSetPlus_BtnOK 保存 保存 微软雅黑,12,,
FrmSetPlus_BtnCancel 取消 取消 微软雅黑,12,,
FrmSetPlus_BtnApply 应用 应用 微软雅黑,12,,
UsrWorkMode_UsrWorkMode
FrmSetPlus_BtnRetrospect 追溯历史 追溯历史 微软雅黑,12,B,
FrmSetPlus_but_Labeling 贴标参数 贴标参数 微软雅黑,12,B,
FrmSetPlus_Keywordlabeling 贴标 贴标 微软雅黑,12,B,
UsrWorkMode_LblPrint 打印机 打印机 微软雅黑,12,B,
UsrWorkMode_LblDefaultLabel 默认打印标签 默认打印标签 微软雅黑,12,B,
UsrWorkMode_RdoLandscape 横向打印 横向打印 微软雅黑,12,,
......@@ -102,12 +104,13 @@ UsrWorkMode_LstLabel 微软雅黑,12,,
UsrWorkMode_LblDefaultMate 优先匹配模板 优先匹配模板 微软雅黑,12,B,
UsrWorkMode_LstMate 微软雅黑,12,,
UsrWorkMode_ChkAllowModifyPrint 允许修改打印内容 允许修改打印内容 微软雅黑,12,,
UsrWorkMode2_LblDefaultMate 优先匹配模板 优先匹配模板 微软雅黑,12,B,
UsrCamera_UsrCamera
UsrCamera_BtnOpenLight 打开光源 打开光源 微软雅黑,12,,
UsrCamera_BtnCloseLight 关闭光源 关闭光源 微软雅黑,12,,
UsrCamera_BtnCameraImage 获取设备图像 获取设备图像 微软雅黑,12,,
UsrCamera_BtnLocalImage 打开本地图片 打开本地图片 微软雅黑,12,,
UsrCamera_BtnScanCode 识别 识别 微软雅黑,12,,
UsrCamera_BtnScanCode 识别条码 识别条码 微软雅黑,12,,
UsrCamera_BtnSaveImage 保存图像 保存图像 微软雅黑,12,,
UsrCamera_LstCode 微软雅黑,12,,
UsrPrintTemplate_UsrPrintTemplate
......@@ -120,7 +123,7 @@ UsrPrintTemplate_BtnAddField 添加字段 添加字段 微软雅黑,12,,
UsrPrintTemplate_BtnDelField 删除字段 删除字段 微软雅黑,12,,
UsrPrintTemplate_BtnFieldFont 字段字体 字段字体 微软雅黑,12,,
UsrPrintTemplate_BtnSetField 设置字段内容 设置字段内容 微软雅黑,12,,
UsrPrintTemplate_LblFieldType 码制 码制 微软雅黑,12,B,
UsrPrintTemplate_LblFieldType 条形码类型 条形码类型 微软雅黑,12,B,
UsrPrintTemplate_ChkFieldShowKey 显示关键字 显示关键字 微软雅黑,12,,
UsrPrintTemplate_LblFieldX X(mm) X(mm) 微软雅黑,12,B,
UsrPrintTemplate_LblFieldY Y(mm) Y(mm) 微软雅黑,12,B,
......@@ -174,20 +177,21 @@ UsrMacro_LblPlaces 数字位数 数字位数 微软雅黑,10,,
UsrMacro_ChkReelIDFillZero 位数不足前面补0 位数不足前面补0 微软雅黑,12,,
UsrMacro_btn_adddatetime 添加日期时间 添加日期时间 微软雅黑,12,,
UsrCodeExtractList_UsrCodeExtractList
UsrCodeExtractList_ChkMatchingStart 匹配开头字符 匹配开头字符 微软雅黑,12,,
UsrCodeExtractList_ChkMatchingEnd 匹配结尾字符 匹配结尾字符 微软雅黑,12,,
UsrCodeExtractList_ChkMatchingMiddle 匹配任意位置字符 匹配任意位置字符 微软雅黑,12,,
UsrCodeExtractList_ChkMatchingStart 开头字符 开头字符 微软雅黑,12,,
UsrCodeExtractList_ChkMatchingEnd 结尾字符 结尾字符 微软雅黑,12,,
UsrCodeExtractList_ChkMatchingMiddle 任意位置字符 任意位置字符 微软雅黑,12,,
UsrCodeExtractList_ChkMatchisnumber 检测并转换为数字 检测并转换为数字 微软雅黑,12,,
UsrCodeExtractList_ChkMatchingSplit 条码分割字符 条码分割字符 微软雅黑,12,,
UsrCodeExtractList_LblSplitPart 获取分割部分 获取分割部分 微软雅黑,12,,
UsrCodeExtractList_ChkCaseSensitivity 区分大小写 区分大小写 微软雅黑,12,,
UsrCodeExtractList_Characteristicbarcode 特征码 特征码 微软雅黑,12,,
UsrCodeExtractList_ChkMinLength 最小长度 最小长度 微软雅黑,12,,
UsrCodeExtractList_ChkMaxLength 最大长度 最大长度 微软雅黑,12,,
UsrCodeExtractList_LblKeyword 设置关键字 设置关键字 微软雅黑,12,,
UsrCodeExtractList_LblKeyword 选择关键字 选择关键字 微软雅黑,12,,
UsrCodeExtractList_LblStart 内容截取起始位 内容截取起始位 微软雅黑,12,,
UsrCodeExtractList_LblLength 内容截取长度 内容截取长度 微软雅黑,12,,
UsrCodeExtractList_ChkLengthEnd 截取至结尾 截取至结尾 微软雅黑,12,,
UsrCodeExtractList_ChkCheckCodeType 匹配条码编码类型 匹配条码编码类型 微软雅黑,12,,
UsrCodeExtractList_ChkCheckCodeType 条码类型 条码类型 微软雅黑,12,,
UsrCodeExtractList_BtnDel 删除 删除 微软雅黑,12,,
UsrCodeExtractList_BtnAdd 添加 添加 微软雅黑,12,,
UsrCodeExtractList_pnlExtractRule 提取 提取 微软雅黑,12,,
......@@ -203,12 +207,13 @@ FrmCodeExtract_FrmCodeExtract 提取条码 提取条码 微软雅黑,24,B,
FrmCodeExtract_BtnAddMatch + + 微软雅黑,12,,
FrmCodeExtract_BtnOK 确定 确定 微软雅黑,12,,
FrmCodeExtract_BtnCancel 取消 取消 微软雅黑,12,,
FrmCodeExtract_ChkMatchingStart 匹配开头字符 匹配开头字符 微软雅黑,12,,
FrmCodeExtract_ChkMatchingEnd 匹配结尾字符 匹配结尾字符 微软雅黑,12,,
FrmCodeExtract_ChkMatchingMiddle 匹配任意位置字符 匹配任意位置字符 微软雅黑,12,,
FrmCodeExtract_ChkMatchingStart 开头字符 开头字符 微软雅黑,12,,
FrmCodeExtract_ChkMatchingEnd 结尾字符 结尾字符 微软雅黑,12,,
FrmCodeExtract_ChkMatchingMiddle 任意位置字符 任意位置字符 微软雅黑,12,,
FrmCodeExtract_ChkMatchisnumber 必须为数字 必须为数字 微软雅黑,12,,
FrmCodeExtract_ChkCaseSensitivity 区分大小写 区分大小写 微软雅黑,12,,
FrmCodeExtract_ChkCheckCodeType 匹配条码编码类型 匹配条码编码类型 微软雅黑,12,,
FrmCodeExtract_Characteristicbarcode 特征码 特征码 微软雅黑,12,,
FrmCodeExtract_ChkCheckCodeType 条码类型 条码类型 微软雅黑,12,,
FrmCodeExtract_BtnDel 删除 删除 微软雅黑,12,,
FrmCodeExtract_BtnAdd 添加 添加 微软雅黑,12,,
FrmCodeExtract_LblStart 内容截取起始位 内容截取起始位 微软雅黑,12,,
......@@ -231,6 +236,30 @@ FrmRetrospect_LblCode 条码 条码 微软雅黑,12,,
FrmRetrospect_BtnSelect 查询 查询 微软雅黑,12,,
FrmRetrospect_BtnExport 导出 导出 微软雅黑,12,,
FrmRetrospect_BtnExportAll 导出所有 导出所有 微软雅黑,12,,
FrmRetrospect_butt_getData 启动服务 启动服务 微软雅黑,12,,
FrmRetrospect_butt_startserver 启动服务 启动服务 微软雅黑,12,,
FrmRetrospect_LblAllCode 物料条码 物料条码 微软雅黑,12,,
FrmRetrospect_LblAllLabel 标签内容 标签内容 微软雅黑,12,,
FrmRetrospect_faceBut_prin 打印 打印 微软雅黑,12,,
FrmRetrospect_faceLabel1 共查询到{0}条信息 共查询到{0}条信息 微软雅黑,12,,
Dialog_information 共查询到{0}条信息 共查询到{0}条信息 微软雅黑,12,,
UsrCustomlabeling_facePanel6 覆盖原标签 覆盖原标签 微软雅黑,12,,
UsrCustomlabeling_IsOverlaylabel 覆盖原标签 覆盖原标签 微软雅黑,12,,
UsrCustomlabeling_facePanel3 XY轴偏移量 XY轴偏移量 微软雅黑,12,,
UsrCustomlabeling_becurrentX X轴 X轴 微软雅黑,12,,
UsrCustomlabeling_becurrentY Y轴 Y轴 微软雅黑,12,,
UsrCustomlabeling_facePanel4 旋转方向及角度 旋转方向及角度 微软雅黑,12,,
UsrCustomlabeling_IscIockwise 顺时针 顺时针 微软雅黑,12,,
UsrCustomlabeling_faceRadioBox2 逆时针 逆时针 微软雅黑,12,,
UsrCustomlabeling_facePanel5 标签旋转角度 标签旋转角度 微软雅黑,12,,
UsrCustomlabeling_faceButton1 确认 确认 微软雅黑,12,,
Dialog_Res001 通用 通用 微软雅黑,12,,
Dialog_Res002 请选择关键字 请选择关键字 微软雅黑,12,,
UsrKeywordlabeling_AddLabel 添加 添加 微软雅黑,12,,
UsrKeywordlabeling_RotateAngle 以特征码顺时针旋转角度 以特征码顺时针旋转角度 微软雅黑,12,,
UsrKeywordlabeling_Xoffset X轴偏移量 X轴偏移量 微软雅黑,12,,
UsrKeywordlabeling_Yoffset Y轴偏移量 Y轴偏移量 微软雅黑,12,,
UsrKeywordlabeling_LabelRotation 标签旋转角度 标签旋转角度 微软雅黑,12,,
UsrKeywordlabeling_UpdateLabel 修改关键字 修改关键字 微软雅黑,12,,
UsrKeywordlabeling_SaveLabel 确认 确认 微软雅黑,12,,
FrmKeyCollection_FrmKeyCollection 选择关键字 选择关键字 微软雅黑,12,,
FrmKeyCollection_faceButton1 确认 确认 微软雅黑,12,,
namespace SmartScan.PlusSettingFrm
{
partial class FrmKeyCollection
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.keyList = new Asa.FaceControl.FaceComboBox();
this.faceButton1 = new Asa.FaceControl.FaceButton();
this.SuspendLayout();
//
// keyList
//
this.keyList.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.keyList.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.keyList.BorderWidth = 2;
this.keyList.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.keyList.Location = new System.Drawing.Point(70, 150);
this.keyList.Name = "keyList";
this.keyList.Padding = new System.Windows.Forms.Padding(3);
this.keyList.SelectedIndex = -1;
this.keyList.SelectedText = "";
this.keyList.Size = new System.Drawing.Size(667, 49);
this.keyList.TabIndex = 6;
this.keyList.Text = "faceComboBox1";
//
// 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(279, 287);
this.faceButton1.Name = "faceButton1";
this.faceButton1.Padding = new System.Windows.Forms.Padding(3);
this.faceButton1.Size = new System.Drawing.Size(201, 68);
this.faceButton1.TabIndex = 7;
this.faceButton1.Text = "确认";
this.faceButton1.Click += new System.EventHandler(this.faceButton1_Click);
//
// FrmKeyCollection
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.faceButton1);
this.Controls.Add(this.keyList);
this.Icon = global::SmartScan.Properties.Resources.App;
this.Name = "FrmKeyCollection";
this.Text = "选择关键字";
this.Controls.SetChildIndex(this.keyList, 0);
this.Controls.SetChildIndex(this.faceButton1, 0);
this.ResumeLayout(false);
}
#endregion
private Asa.FaceControl.FaceComboBox keyList;
private Asa.FaceControl.FaceButton faceButton1;
}
}
\ No newline at end of file
using BLL;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace SmartScan.PlusSettingFrm
{
public partial class FrmKeyCollection : Asa.FaceControl.FaceFormFixed
{
public string keyname = null;
public FrmKeyCollection()
{
InitializeComponent();
keyList.Items.AddRange(BLLCommon.macroKey.ToArray());
keyList.SelectedIndex = 0;
}
private void faceButton1_Click(object sender, EventArgs e)
{
if (keyList.SelectedIndex==-1)
{
MessageBox.Show("请选择关键字!");
return;
}
keyname = keyList.SelectedText;
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>
</root>
\ No newline at end of file
......@@ -38,6 +38,8 @@ namespace SmartScan
this.CboLanguage = new Asa.FaceControl.FaceComboBox();
this.BtnWorkMode = new Asa.FaceControl.FaceButton();
this.BtnRetrospect = new Asa.FaceControl.FaceButton();
this.but_Labeling = new Asa.FaceControl.FaceButton();
this.Keywordlabeling = new Asa.FaceControl.FaceButton();
this.SuspendLayout();
//
// BtnMaterial
......@@ -50,7 +52,7 @@ namespace SmartScan
this.BtnMaterial.Location = new System.Drawing.Point(11, 111);
this.BtnMaterial.Name = "BtnMaterial";
this.BtnMaterial.Padding = new System.Windows.Forms.Padding(3);
this.BtnMaterial.Size = new System.Drawing.Size(160, 50);
this.BtnMaterial.Size = new System.Drawing.Size(125, 50);
this.BtnMaterial.TabIndex = 6;
this.BtnMaterial.Text = "Material";
this.BtnMaterial.Click += new System.EventHandler(this.BtnMenu_Click);
......@@ -65,7 +67,7 @@ namespace SmartScan
this.BtnKeyword.Location = new System.Drawing.Point(11, 167);
this.BtnKeyword.Name = "BtnKeyword";
this.BtnKeyword.Padding = new System.Windows.Forms.Padding(3);
this.BtnKeyword.Size = new System.Drawing.Size(160, 50);
this.BtnKeyword.Size = new System.Drawing.Size(125, 50);
this.BtnKeyword.TabIndex = 7;
this.BtnKeyword.Text = "Keyword";
this.BtnKeyword.Click += new System.EventHandler(this.BtnMenu_Click);
......@@ -78,7 +80,7 @@ namespace SmartScan
this.BtnOK.BorderWidth = 2;
this.BtnOK.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnOK.HoldPress = false;
this.BtnOK.Location = new System.Drawing.Point(891, 827);
this.BtnOK.Location = new System.Drawing.Point(910, 737);
this.BtnOK.Name = "BtnOK";
this.BtnOK.Padding = new System.Windows.Forms.Padding(3);
this.BtnOK.Size = new System.Drawing.Size(120, 40);
......@@ -94,7 +96,7 @@ namespace SmartScan
this.BtnCancel.BorderWidth = 2;
this.BtnCancel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnCancel.HoldPress = false;
this.BtnCancel.Location = new System.Drawing.Point(1017, 827);
this.BtnCancel.Location = new System.Drawing.Point(1036, 737);
this.BtnCancel.Name = "BtnCancel";
this.BtnCancel.Padding = new System.Windows.Forms.Padding(3);
this.BtnCancel.Size = new System.Drawing.Size(120, 40);
......@@ -111,10 +113,10 @@ namespace SmartScan
this.PnlTemp.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.PnlTemp.BorderWidth = 2;
this.PnlTemp.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.PnlTemp.Location = new System.Drawing.Point(177, 55);
this.PnlTemp.Location = new System.Drawing.Point(142, 55);
this.PnlTemp.Name = "PnlTemp";
this.PnlTemp.Padding = new System.Windows.Forms.Padding(3);
this.PnlTemp.Size = new System.Drawing.Size(1086, 766);
this.PnlTemp.Size = new System.Drawing.Size(1140, 676);
this.PnlTemp.TabIndex = 11;
this.PnlTemp.Text = "facePanel1";
this.PnlTemp.TitleFont = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
......@@ -128,7 +130,7 @@ namespace SmartScan
this.BtnApply.BorderWidth = 2;
this.BtnApply.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnApply.HoldPress = false;
this.BtnApply.Location = new System.Drawing.Point(1143, 827);
this.BtnApply.Location = new System.Drawing.Point(1162, 737);
this.BtnApply.Name = "BtnApply";
this.BtnApply.Padding = new System.Windows.Forms.Padding(3);
this.BtnApply.Size = new System.Drawing.Size(120, 40);
......@@ -143,7 +145,7 @@ namespace SmartScan
this.CboLanguage.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.CboLanguage.BorderWidth = 2;
this.CboLanguage.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.CboLanguage.Location = new System.Drawing.Point(983, 11);
this.CboLanguage.Location = new System.Drawing.Point(1002, 11);
this.CboLanguage.Name = "CboLanguage";
this.CboLanguage.Padding = new System.Windows.Forms.Padding(3);
this.CboLanguage.ReadOnly = true;
......@@ -165,8 +167,9 @@ namespace SmartScan
this.BtnWorkMode.Location = new System.Drawing.Point(11, 55);
this.BtnWorkMode.Name = "BtnWorkMode";
this.BtnWorkMode.Padding = new System.Windows.Forms.Padding(3);
this.BtnWorkMode.Size = new System.Drawing.Size(160, 50);
this.BtnWorkMode.Size = new System.Drawing.Size(125, 50);
this.BtnWorkMode.TabIndex = 14;
this.BtnWorkMode.Tag = "not";
this.BtnWorkMode.Text = "Work";
this.BtnWorkMode.Click += new System.EventHandler(this.BtnMenu_Click);
//
......@@ -175,20 +178,60 @@ namespace SmartScan
this.BtnRetrospect.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.BtnRetrospect.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.BtnRetrospect.BorderWidth = 2;
this.BtnRetrospect.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.BtnRetrospect.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnRetrospect.HoldPress = false;
this.BtnRetrospect.Location = new System.Drawing.Point(11, 223);
this.BtnRetrospect.Location = new System.Drawing.Point(11, 279);
this.BtnRetrospect.Name = "BtnRetrospect";
this.BtnRetrospect.Padding = new System.Windows.Forms.Padding(3);
this.BtnRetrospect.Size = new System.Drawing.Size(160, 50);
this.BtnRetrospect.Size = new System.Drawing.Size(125, 50);
this.BtnRetrospect.TabIndex = 7;
this.BtnRetrospect.Tag = "not";
this.BtnRetrospect.Text = "Traceability";
this.BtnRetrospect.Visible = false;
this.BtnRetrospect.Click += new System.EventHandler(this.BtnHistory_Click);
//
// but_Labeling
//
this.but_Labeling.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.but_Labeling.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.but_Labeling.BorderWidth = 2;
this.but_Labeling.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.but_Labeling.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.but_Labeling.HoldPress = false;
this.but_Labeling.Location = new System.Drawing.Point(11, 335);
this.but_Labeling.Name = "but_Labeling";
this.but_Labeling.Padding = new System.Windows.Forms.Padding(3);
this.but_Labeling.Size = new System.Drawing.Size(125, 50);
this.but_Labeling.TabIndex = 15;
this.but_Labeling.Tag = "";
this.but_Labeling.Text = "贴标参数";
this.but_Labeling.Visible = false;
this.but_Labeling.Click += new System.EventHandler(this.BtnMenu_Click);
//
// Keywordlabeling
//
this.Keywordlabeling.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.Keywordlabeling.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.Keywordlabeling.BorderWidth = 2;
this.Keywordlabeling.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Keywordlabeling.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.Keywordlabeling.HoldPress = false;
this.Keywordlabeling.Location = new System.Drawing.Point(11, 223);
this.Keywordlabeling.Name = "Keywordlabeling";
this.Keywordlabeling.Padding = new System.Windows.Forms.Padding(3);
this.Keywordlabeling.Size = new System.Drawing.Size(125, 50);
this.Keywordlabeling.TabIndex = 16;
this.Keywordlabeling.Tag = "";
this.Keywordlabeling.Text = "关键字匹配";
this.Keywordlabeling.Click += new System.EventHandler(this.BtnMenu_Click);
//
// FrmSetPlus
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(1274, 878);
this.ClientSize = new System.Drawing.Size(1293, 788);
this.Controls.Add(this.but_Labeling);
this.Controls.Add(this.Keywordlabeling);
this.Controls.Add(this.BtnWorkMode);
this.Controls.Add(this.CboLanguage);
this.Controls.Add(this.BtnApply);
......@@ -212,6 +255,8 @@ namespace SmartScan
this.Controls.SetChildIndex(this.BtnApply, 0);
this.Controls.SetChildIndex(this.CboLanguage, 0);
this.Controls.SetChildIndex(this.BtnWorkMode, 0);
this.Controls.SetChildIndex(this.Keywordlabeling, 0);
this.Controls.SetChildIndex(this.but_Labeling, 0);
this.ResumeLayout(false);
}
......@@ -226,5 +271,7 @@ namespace SmartScan
private Asa.FaceControl.FaceComboBox CboLanguage;
private Asa.FaceControl.FaceButton BtnWorkMode;
private Asa.FaceControl.FaceButton BtnRetrospect;
private Asa.FaceControl.FaceButton but_Labeling;
private Asa.FaceControl.FaceButton Keywordlabeling;
}
}
\ No newline at end of file
using System;
using Asa.FaceControl;
using BLL;
using Model;
using SmartScan.PlusSettingFrm;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using Asa.FaceControl;
using System.Windows.Forms;
using BLL;
namespace SmartScan
{
public partial class FrmSetPlus : FaceFormNormal
{
private readonly Dictionary<FaceButton, Model.ISetMenu> menu = new();
private readonly Dictionary<FaceButton, Model.ISetMenu> menu = new();
public FrmSetPlus()
{
InitializeComponent();
......@@ -25,6 +21,8 @@ namespace SmartScan
this.Height = 738;
this.Top = 15;
this.Left = 0;
WebService.Open();//启动条码匹配服务
LogNet.log = log4net.LogManager.GetLogger("SmartScan");
}
private void FrmSetPlus_FormClosing(object sender, FormClosingEventArgs e)
......@@ -40,14 +38,10 @@ namespace SmartScan
{
this.Hide();
}
else {
}
}
private void FrmSet_Load(object sender, EventArgs e)
{
{
foreach (FaceButton button in menu.Keys)
{
Controls.Remove(menu[button].GetPanel());
......@@ -55,8 +49,10 @@ namespace SmartScan
menu.Clear();
menu.Add(BtnWorkMode, new UsrWorkMode2());
//menu.Add(BtnLabel, new UsrPrintTemplate());
menu.Add(BtnMaterial, new UsrMaterialTemplate());
menu.Add(BtnMaterial, new UsrMaterialTemplate(true));
menu.Add(BtnKeyword, new UsrMacro());
//menu.Add(but_Labeling, new UsrCustomlabeling());
menu.Add(Keywordlabeling, new UsrKeywordlabeling());
foreach (FaceButton button in menu.Keys)
{
......@@ -76,6 +72,7 @@ namespace SmartScan
CboLanguage.Items.Clear();
CboLanguage.Items.AddRange(Language.Name.ToArray());
CboLanguage.SelectedText = BLLCommon.config.Language;
Language.SetLanguage(this);
}
private void BtnMenu_Click(object sender, EventArgs e)
......@@ -115,8 +112,8 @@ namespace SmartScan
new FaceMessageBox("", text, MessageBoxButtons.OK).ShowDialog();
BLLCommon.extension.Update();
DialogResult = DialogResult.OK;
WindowState = FormWindowState.Minimized;
}
//WindowState = FormWindowState.Minimized;
}
private void BtnCancel_Click(object sender, EventArgs e)
{
......@@ -148,7 +145,9 @@ namespace SmartScan
private void BtnHistory_Click(object sender, EventArgs e)
{
new FrmRetrospect().ShowDialog();
FrmRetrospect frm = new FrmRetrospect();
frm.WindowState = FormWindowState.Maximized;
frm.Show();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
using Asa.FaceControl;
using Model;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace SmartScan
{
public partial class UsrLabeling : UserControl, ISetMenu
public partial class UsrLabeling : UserControl, ISetMenu
{
public UsrLabeling()
{
......
using System;
using BLL;
using HalconDotNet;
using Model;
using System.Windows.Forms;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
using System.Runtime.InteropServices;
using System.IO;
using BLL;
using log4net;
using System.Runtime.InteropServices;
using System.Text;
using System.Collections.Generic;
using log4net.Util;
using System.Threading;
using System.Windows.Forms;
namespace SmartScan
{
......@@ -34,7 +33,7 @@ namespace SmartScan
_ = new Mutex(true, Application.ProductName, out bool ret);
if (!ret)
{
IntPtr formhwnd = GetWindowHandle("BarCode Rule Setting");
IntPtr formhwnd = GetWindowHandle("Barcode Rule Setting");
if (formhwnd == IntPtr.Zero)
formhwnd = GetWindowHandle("条码规则设置");
......@@ -54,7 +53,7 @@ namespace SmartScan
foreach (Process process in processcollection)
{
if (process.Id != currentproc.Id)
{
{
// 如果进程的句柄为0,即代表没有找到该窗体,即该窗体隐藏的情况时
if (process.MainWindowHandle.ToInt32().Equals(0))
{
......@@ -96,7 +95,7 @@ namespace SmartScan
}
if (!isShow)
{
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
//BLL.Config.Backgrounder = true;
......@@ -110,8 +109,8 @@ namespace SmartScan
Process process = new Process();
process.StartInfo = new ProcessStartInfo();
process.StartInfo.FileName = paddle;
process.StartInfo.WorkingDirectory = ".\\paddle";
if (File.Exists(".\\paddle\\paddleOCR.exe"))
process.StartInfo.WorkingDirectory = Application.StartupPath+"\\paddle";
if (File.Exists(Application.StartupPath+"\\paddle\\paddleOCR.exe"))
process.Start();
}
//else
......@@ -119,31 +118,26 @@ namespace SmartScan
// var onnxexe = "onnx\\OcrLiteOnnxForm.exe";
// Process process1 = Process.Start(onnxexe);
//}
Application.Run(new FrmLoading(back)); //预加载,完成后自动退出
Common.frmMain = new FrmMain();
Common.frmWaitting = new FrmWaitting();
if (back)
{
var fsp = new FrmSetPlus();
if (hide)
{
fsp.WindowState = FormWindowState.Minimized;
}
Application.Run(fsp);
}
else
{
Application.Run(Common.frmMain);
}
}
Exit();
}
private static bool IsRun()
{
Process current = Process.GetCurrentProcess();
......@@ -153,7 +147,7 @@ namespace SmartScan
if (process.Id == current.Id) continue; //自己
if (process.MainModule.FileName == current.MainModule.FileName)
return true;
}
}
return false;
}
......
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Neo Scan")]
[assembly: AssemblyTitle("NS100_Client")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Neo Scan")]
[assembly: AssemblyProduct("NS100_Client")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
......@@ -31,7 +30,7 @@ using System.Runtime.InteropServices;
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
[assembly: AssemblyVersion("3.1.*")]
[assembly: AssemblyVersion("4.1.*")]
//[assembly: AssemblyVersion("3.0.0.0")]
//[assembly: AssemblyFileVersion("3.0.0.0")]
......
using Asa.FaceControl;
using BLL;
using DocumentFormat.OpenXml.Vml;
using Model;
using SmartScan.Form;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
......@@ -49,7 +47,7 @@ namespace SmartScan
else
BLLCommon.lightSource?.TurnOn();
}
public void Close()
{
isRun = false;
......@@ -70,69 +68,77 @@ namespace SmartScan
isTouch = false;
}
private readonly object lockObject = new object();
static System.Diagnostics.Stopwatch reckontime = new System.Diagnostics.Stopwatch();
public void Scan()
{
if (!isRun) return;
if (isTouch) return;
isTouch = true;
btnMatchedName.Invoke(delegate ()
{
if (!BLL.Config.Backgrounder)
btnMatchedName.Visible = false;
BLLCommon.extension.Clear();
});
var t = Task.Run(() =>
//此段代码加锁是因为,客户在连续点击识别设备按钮时,线程会同时生成rid=123并且rid赋值是重复的123123
//在测试时也遇到这个情况,但只成功复现了一次;故加锁。
lock (lockObject)
{
try
if (!isRun) return;
if (isTouch) return;
isTouch = true;
btnMatchedName.Invoke(delegate ()
{
workCodeInfo = new();
workCodeKeyword = new(StringComparer.OrdinalIgnoreCase);
originalCodeText = null;
originalCodeIsUsed = null;
Common.frmMain.SetWaittingMsg(Language.Dialog("MaterialScanning"));//拍照识别...
if (!GetCodeInfo())
if (!BLL.Config.Backgrounder)
btnMatchedName.Visible = false;
BLLCommon.extension.Clear();
});
Common.frmMain.SetWaittingMsg(Language.Dialog("MaterialScanning"));//拍照识别...
var t = Task.Run(() =>
{
reckontime.Restart();
try
{
Common.frmMain.SetWaittingMsg(Language.Dialog("MaterialScanning"));//拍照识别...
workCodeInfo = new();
workCodeKeyword = new(StringComparer.OrdinalIgnoreCase);
originalCodeText = null;
originalCodeIsUsed = null;
if (!GetCodeInfo())
{
isTouch = false;
Common.frmMain.CloseWaittingDialog();
return;
}
Common.frmMain.Invoke(delegate ()
{
AddCodeCenter();
});
LogNet.log.Info($"获取图片耗时{reckontime.ElapsedMilliseconds}ms");
Common.frmMain.SetWaittingMsg(Language.Dialog("MaterialTemplateMatching"),5);//模版匹配...
reckontime.Restart();
bool hasMatch = MatchingTemplate();
LogNet.log.Info($"模板匹配耗时{reckontime.ElapsedMilliseconds}ms");
reckontime.Restart();
Common.frmMain.SetWaittingMsg(Language.Dialog("MaterialProcessing"),5);//计算结果...
Common.frmMain.Invoke(delegate ()
{
SetKey(hasMatch);
});
isTouch = false;
Common.frmMain.CloseWaittingDialog();
return;
LogNet.log.Info("Work scan is done");
LogNet.log.Info($"渲染控件耗时{reckontime.ElapsedMilliseconds}ms");
}
Common.frmMain.Invoke(delegate ()
catch (Exception ex)
{
AddCodeCenter();
});
Common.frmMain.SetWaittingMsg(Language.Dialog("MaterialTemplateMatching"));//模版匹配...
bool hasMatch = MatchingTemplate();
Common.frmMain.SetWaittingMsg(Language.Dialog("MaterialProcessing"));//计算结果...
Common.frmMain.Invoke(delegate ()
LogNet.log.Error("Scan", ex);
}
finally
{
SetKey(hasMatch);
});
isTouch = false;
LogNet.log.Info("Work scan is done");
}
catch (Exception ex)
{
LogNet.log.Error("Scan", ex);
}
finally
isTouch = false;
Common.frmMain.CloseWaittingDialog();
}
});
Common.frmMain.Invoke(delegate ()
{
isTouch = false;
Common.frmMain.CloseWaittingDialog();
}
});
Common.frmMain.Invoke(delegate ()
{
Common.frmMain.ShowWaittingDialog();
});
Common.frmMain.ShowWaittingDialog();
});
}
}
public void Scan(string[] code)
{
try
......@@ -214,8 +220,6 @@ namespace SmartScan
return str;
}
private bool GetCodeInfo()
{
LogNet.log.Info("Work GetCodeInfo");
......@@ -238,6 +242,12 @@ namespace SmartScan
}
else
{
Common.frmMain.Invoke(delegate ()
{
if (!BLL.Config.Backgrounder)
picShow.Image?.Dispose();
BLLCommon.mateEdit.CurrntBitmap?.Dispose();
});
string filename = "";
Common.frmMain.Invoke(delegate ()
{
......@@ -290,7 +300,7 @@ namespace SmartScan
//if (workCodeInfo.Count == 0) return false;
originalCodeText = Camera.GetBarCodeText(workCodeInfo);
bool rtn = BLLCommon.mateEdit.MatchingTemplate(workCodeInfo, BLLCommon.config.DefaultMaterialName, false, out string mateName, out workCodeKeyword, out originalCodeIsUsed);
bool rtn = BLLCommon.mateEdit.MatchingTemplate(workCodeInfo, BLLCommon.config.DefaultMaterialName, false, out string mateName, out workCodeKeyword, out AMatch aMatch);
BLL.MatchAnalysis.ShowResult();
Common.frmMain.Invoke(delegate ()
......@@ -322,8 +332,9 @@ namespace SmartScan
private void SetKey(bool hasMatch)
{
LogNet.log.Info("Work SetKey hasMatch:" + hasMatch);
BLLCommon.extension.SetKey(originalCodeText, workCodeKeyword, hasMatch, out _);
if (workCodeKeyword.Count == 0) return;
BLLCommon.extension.SetKey(originalCodeText, workCodeKeyword, hasMatch, out _);
//if (workCodeKeyword.Count == 0) return;放前面执行
if (workCodeKeyword.Any(a => a.Value.StartsWith("<OCR>")))
{
BLLCommon.extension.DrawTextBackground(workCodeKeyword);
......@@ -339,7 +350,7 @@ namespace SmartScan
}
else
{
BLLCommon.extension.Print(hasMatch, workCodeKeyword);
BLLCommon.extension.Print(hasMatch, workCodeKeyword);
}
if (BLLCommon.config.PromptAfterPrinting && !BLL.Config.Backgrounder)
{
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using Asa.FaceControl;
using BLL;
using DocumentFormat.OpenXml.Wordprocessing;
using Model;
using SmartScan.PlusSettingFrm;
namespace SmartScan
{
......@@ -93,6 +96,12 @@ namespace SmartScan
if (LstKey.SelectedIndex == -1) return;
keyCopy.RemoveAt(LstKey.SelectedIndex);
LstKey.Items.RemoveAt(LstKey.SelectedIndex);
var keyname= ConfigHelper.Config.Get("Label_Key");
if (!string.IsNullOrWhiteSpace(keyname))
{
UsrKeywordlabeling.Deletskeyname();
}
}
private void BtnUpdateKey_Click(object sender, EventArgs e)
......@@ -103,6 +112,16 @@ namespace SmartScan
if (index == -1)
{
keyCopy[LstKey.SelectedIndex] = text;
var oldname=LstKey.Items[LstKey.SelectedIndex];
var keyname = ConfigHelper.Config.Get("Label_Key");
if (!string.IsNullOrWhiteSpace(keyname))
{
//ConfigHelper.Config.Set("Label_Key", "Part No");
if (oldname == keyname)
{
UsrKeywordlabeling.Updatekeyname(text);
}
}
LstKey.Items[LstKey.SelectedIndex] = text;
setRIkey();
}
......
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;
......@@ -11,6 +12,7 @@ using CameraVisionLib.Model;
using DocumentFormat.OpenXml.EMMA;
using DocumentFormat.OpenXml.Office2016.Drawing.ChartDrawing;
using Model;
using Newtonsoft.Json;
namespace SmartScan
{
......@@ -21,8 +23,10 @@ namespace SmartScan
private int codeIndex = -1;
private Bitmap bmp = null;
public UsrMaterialTemplate()
public bool isvisbles = false;
public UsrMaterialTemplate(bool isvisble=false)
{
isvisbles=isvisble;
InitializeComponent();
BtnOcrCode.Visible = Config.Func_EnabledOCR;
//if (!Config.Func_EnabledOCR)
......@@ -33,9 +37,57 @@ namespace SmartScan
mateCopy = BLLCommon.mateEdit.ToCopy();
Language.SetLanguage(this);
BtnCameraImage.Enabled = Camera.IsConnected();
//LstMate.SelectedFirst();
//LstMate.SelectedFirst();
if (isvisble)
{
ClearImagesInButtonsOnTableLayoutPanels();
}
}
#region 作为服务启动时
//递归查找指定类型的控件
private void ClearImagesInButtonsOnTableLayoutPanels()
{
string[] btuuarr = new string[]{ "BtnOpenLight", "BtnCloseLight", "BtnCameraImage"};
var tableLayoutPanels = FindControlsOfType<TableLayoutPanel>(this);
foreach (var tableLayoutPanel in tableLayoutPanels)
{
var buttons = FindControlsOfType<Asa.FaceControl.FaceButton>(tableLayoutPanel);
foreach (var button in buttons)
{
if (btuuarr.Contains(button.Name))
{
button.Visible = false;
}
button.Image = null;
}
}
}
private List<T> FindControlsOfType<T>(Control container) where T : Control
{
var controls = new List<T>();
foreach (Control control in container.Controls)
{
if (control is T tControl)
{
controls.Add(tControl);
}
// 递归查找嵌套控件
controls.AddRange(FindControlsOfType<T>(control));
}
return controls;
}
//递归设置所有控件字体大小
private void SetFontSizes(Control control, int fontSize)
{
control.Font = new Font(control.Font.FontFamily, fontSize);
foreach (Control childControl in control.Controls)
{
SetFontSizes(childControl, fontSize);
}
}
#endregion
public FacePanel GetPanel()
{
return facePanel1;
......@@ -124,15 +176,22 @@ namespace SmartScan
{
if (LstMate.SelectedIndex == -1) return;
mateIndex = LstMate.SelectedIndex;
BLLCommon.mateMaxCodeID = mateCopy[mateIndex].GetMaxID();
ImgShow.Image = mateCopy[mateIndex].Image;
BLLCommon.mateMaxCodeID = mateCopy[mateIndex].GetMaxID();
string iamgepath= mateCopy[mateIndex].ImagePath;
if (!string.IsNullOrEmpty(iamgepath))
{
if (System.IO.File.Exists(iamgepath))
{
ImgShow.Image = ObjConversion.ReadImageFile(iamgepath);
}
}
//ImgShow.Image = mateCopy[mateIndex].Image;
ImgShow.CodeCenterClear();
ImgShow.AddCodeCenter(LabelCenter());
LstCode.Items.Clear();
LstCode.Items.AddRange(FormatCode());
LstCode.SelectedIndex = -1;
bmp = mateCopy[mateIndex].Image;
bmp = ImgShow.Image;
}
private void BtnAddMate_Click(object sender, EventArgs e)
......@@ -227,13 +286,14 @@ namespace SmartScan
ImgShow.Image = bmp;
iscamp = true;
}
string nsimagepath = null;
private void BtnLocalImage_Click(object sender, EventArgs e)
{
if (mateIndex < 0) return;
using OpenFileDialog dlg = new() { Filter = "Image Files|*.jpg;*.jpeg;*.png;*.bmp;*.gif|All Files|*.*" };
if (dlg.ShowDialog() != DialogResult.OK) return;
nsimagepath = dlg.FileName;
bmp = ObjConversion.ReadImageFile(dlg.FileName);
LstCode.Items.Clear();
ImgShow.CodeCenterClear();
......@@ -268,7 +328,7 @@ namespace SmartScan
}
else
{
info = Camera.GetBarCode(bmp);
info = Camera.GetBarCode(bmp);
}
//info = Camera.GetBarCode(bmp);
......@@ -322,7 +382,6 @@ namespace SmartScan
return;
}
MaterialCode code = mateCopy[mateIndex].Code[codeIndex];
AsciiToCharReplacer asciiControl = new AsciiToCharReplacer();
string[] strings = null;
string codestring = asciiControl.StringToAscii(code.Text, out strings);
......@@ -339,9 +398,7 @@ namespace SmartScan
mateCopy[mateIndex].Match.RemoveAll(s => s.CodeID == code.ID);
mateCopy[mateIndex].Match.AddRange(frm.CodeMatch);
mateCopy[mateIndex].State = TemplateState.Unsaved;
mateCopy[mateIndex].Match.RemoveAll(x => { return mateCopy[mateIndex].Code.FindIndex(c => c.ID == x.CodeID) == -1 && mateCopy[mateIndex].Ocr.FindIndex(c => c.ID == x.CodeID) == -1; });
LstCode.Items[codeIndex] = FormatCode(codeIndex);
}
}
......
......@@ -129,12 +129,30 @@
<Compile Include="Form\FrmWaitting.Designer.cs">
<DependentUpon>FrmWaitting.cs</DependentUpon>
</Compile>
<Compile Include="PlusSettingFrm\FrmKeyCollection.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PlusSettingFrm\FrmKeyCollection.Designer.cs">
<DependentUpon>FrmKeyCollection.cs</DependentUpon>
</Compile>
<Compile Include="PlusSettingFrm\FrmSetPlus.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PlusSettingFrm\FrmSetPlus.Designer.cs">
<DependentUpon>FrmSetPlus.cs</DependentUpon>
</Compile>
<Compile Include="PlusSettingFrm\UsrCustomlabeling.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="PlusSettingFrm\UsrCustomlabeling.Designer.cs">
<DependentUpon>UsrCustomlabeling.cs</DependentUpon>
</Compile>
<Compile Include="PlusSettingFrm\UsrKeywordlabeling.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="PlusSettingFrm\UsrKeywordlabeling.Designer.cs">
<DependentUpon>UsrKeywordlabeling.cs</DependentUpon>
</Compile>
<Compile Include="PlusSettingFrm\UsrLabeling.cs">
<SubType>UserControl</SubType>
</Compile>
......@@ -309,9 +327,18 @@
<EmbeddedResource Include="Form\FrmWaitting.resx">
<DependentUpon>FrmWaitting.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PlusSettingFrm\FrmKeyCollection.resx">
<DependentUpon>FrmKeyCollection.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PlusSettingFrm\FrmSetPlus.resx">
<DependentUpon>FrmSetPlus.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PlusSettingFrm\UsrCustomlabeling.resx">
<DependentUpon>UsrCustomlabeling.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PlusSettingFrm\UsrKeywordlabeling.resx">
<DependentUpon>UsrKeywordlabeling.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PlusSettingFrm\UsrLabeling.resx">
<DependentUpon>UsrLabeling.cs</DependentUpon>
</EmbeddedResource>
......@@ -399,6 +426,10 @@
<Project>{f7499de9-5665-49fd-bdb6-602b9af98541}</Project>
<Name>BLL</Name>
</ProjectReference>
<ProjectReference Include="..\DataHandling\DataHandling.csproj">
<Project>{0F23B7DB-9953-46ED-9166-115646467647}</Project>
<Name>DataHandling</Name>
</ProjectReference>
<ProjectReference Include="..\Model\Model.csproj">
<Project>{20e61a3d-bf87-4a99-9756-7fe13d2daa6e}</Project>
<Name>Model</Name>
......
using BLL;
using System;
using System.Windows.Forms;
namespace SmartScan
......
......@@ -14,7 +14,7 @@
<appender-ref ref="VisionLib"/>
</root>
<appender name="SmartScan" type="log4net.Appender.RollingFileAppender">
<param name="File" value="Logs\\SmartScan.log" />
<param name="File" value="Logs\\NS100.log" />
<param name="Encoding" value="UTF-8"/>
<param name="AppendToFile" value="true" />
<param name="RollingStyle" value="Date" />
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!