Commit 8b4735eb 刘韬

1

1 个父辈 71bf9456
正在显示 76 个修改的文件 包含 617 行增加216 行删除
......@@ -12,10 +12,7 @@ namespace BLL
config = new(Model.FilePath.CONFIG_APP);
}
/// <summary>
/// 软件后台运行
/// </summary>
public bool Backgrounder { get; set; } = false;
/// <summary>
/// 软件版本
......@@ -317,6 +314,11 @@ namespace BLL
static Config() {
ConfigHelper.Config.LoadMyConfig(typeof(Config));
}
/// <summary>
/// 软件后台运行
/// </summary>
[MyConfigComment("软件后台运行")]
public static MyConfig<bool> Backgrounder;
[MyConfigComment("数据源类型")]
public static MyConfig<string> DataSource_Type;
......
......@@ -67,7 +67,7 @@ namespace BLL
else
key.Add(config.ReelIDKeyWord, Reelidstr);
}
if (!extensions[0].Control.InvokeRequired)
if (extensions !=null && !extensions[0].Control.InvokeRequired)
{
//第一次刷新界面
for (int i = 0; i < extensions.Count; i++)
......@@ -80,12 +80,19 @@ namespace BLL
return false;
Application.DoEvents();
if (config.AutoPrint && hasMatch)
if (extensions != null && !extensions[0].Control.InvokeRequired)
{
//if (CanPrint())
if (config.AutoPrint && hasMatch)
{
//if (CanPrint())
PrintLabel(null, EventArgs.Empty);
}
}
else {
//PrintLabel(null, EventArgs.Empty);
}
SaveRetrospect?.Invoke(key);
return true;
}
bool updatereelid(Dictionary<string, string> key,out string errmsg) {
......@@ -99,7 +106,7 @@ namespace BLL
}
//key["ReelID"] = newid;
}
if (!extensions[0].Control.InvokeRequired)
if (extensions!=null && !extensions[0].Control.InvokeRequired)
{
for (int i = 0; i < extensions.Count; i++)
{
......@@ -238,6 +245,7 @@ namespace BLL
var keys =new List<string>(key.Keys);
Printing?.Invoke(key);
}
private bool GetHttpReelID(Dictionary<string, string> key,out string errmsg)
{
......@@ -246,7 +254,7 @@ namespace BLL
string json = Http.PostJson(url,null, key);
if (json == "") {
errmsg = "Api error";
if (!extensions[0].Control.InvokeRequired)
if (extensions != null && !extensions[0].Control.InvokeRequired)
new FaceMessageBox("BoxReelIDInfoMaintain", errmsg, System.Windows.Forms.MessageBoxButtons.OK, true).ShowDialog();
return false;
......@@ -259,7 +267,7 @@ namespace BLL
}
catch {
errmsg = "Api parse error:\r\n" + json;
if (!extensions[0].Control.InvokeRequired)
if (extensions != null && !extensions[0].Control.InvokeRequired)
new FaceMessageBox("BoxReelIDInfoMaintain", errmsg, System.Windows.Forms.MessageBoxButtons.OK, true).ShowDialog();
return false;
......@@ -267,7 +275,7 @@ namespace BLL
if (!dic.TryGetValue("CODE", out object value))
{
if (!extensions[0].Control.InvokeRequired)
if (extensions != null && !extensions[0].Control.InvokeRequired)
new FaceMessageBox("BoxReelIDInfoMaintain", "Api return data error:\r\n" + json, System.Windows.Forms.MessageBoxButtons.OK, true).ShowDialog();
else
errmsg="Api return data error:\r\n" + json;
......@@ -277,7 +285,7 @@ namespace BLL
if (Convert.ToInt32(value)!=0)
{
errmsg = "Api parse error:\r\n" + dic["MSG"].ToString();
if (!extensions[0].Control.InvokeRequired)
if (extensions != null && !extensions[0].Control.InvokeRequired)
new FaceMessageBox("BoxReelIDInfoMaintain", errmsg, System.Windows.Forms.MessageBoxButtons.OK, true).ShowDialog();
return false;
......
......@@ -149,7 +149,7 @@ namespace BLL
LogNet.log.Info("优先匹配 " + mateTemp[firstIndex].Name);
if (TemplateExtract(firstIndex, code, out keyword, out isCodeUsed))
{
if (string.IsNullOrEmpty(mateName))
//if (string.IsNullOrEmpty(mateName))
mateName = mateTemp[firstIndex].Name;
if (!analyisMode)
return true;
......@@ -167,7 +167,7 @@ namespace BLL
LogNet.log.Info("带主键[" + text + "]匹配 " + mateTemp[i].Name);
if (TemplateExtract(i, code, out keyword, out isCodeUsed))
{
if (string.IsNullOrEmpty(mateName))
//if (string.IsNullOrEmpty(mateName))
mateName = mateTemp[i].Name;
if (!analyisMode)
return true;
......@@ -182,7 +182,7 @@ namespace BLL
LogNet.log.Info("不带主键匹配 " + mateTemp[i].Name);
if (TemplateExtract(i, code, out keyword, out isCodeUsed))
{
if (string.IsNullOrEmpty(mateName))
//if (string.IsNullOrEmpty(mateName))
mateName = mateTemp[i].Name;
if (!analyisMode)
return true;
......
......@@ -11,20 +11,22 @@ namespace Model
public interface IWeb
{
[OperationContract]
[WebGet(UriTemplate = "SmartScan/CloseApp", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
[WebGet(UriTemplate = "NeoScan/CloseApp", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
void CloseApp();
[OperationContract]
[WebGet(UriTemplate = "SmartScan/WorkWithCamera", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
[WebGet(UriTemplate = "NeoScan/WorkWithCamera", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
WebResultCamera WorkWithCamera();
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "SmartScan/WorkWithCode", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
[WebInvoke(Method = "POST", UriTemplate = "NeoScan/WorkWithCode", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
WebResultCode WorkWithCode(Stream json);
[OperationContract]
[WebGet(UriTemplate = "alive", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
string alive();
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "SmartScan/ProcessBitmap?param={param}", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
[WebInvoke(Method = "POST", UriTemplate = "NeoScan/ProcessBitmap?param={param}", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
WebResultCode ProcessBitmap(Stream info, string param);
}
......
......@@ -61,3 +61,4 @@ D:\rick\vs\SmartScan\Model\bin\Debug\halcondotnet.dll
D:\rick\vs\SmartScan\Model\bin\Debug\Asa.Camera.VisionLib.pdb
D:\rick\vs\SmartScan\Model\bin\Debug\Asa.Camera.VisionLib.xml
D:\rick\vs\SmartScan\Model\bin\Debug\MvCameraControl.Net.xml
D:\rick\vs\SmartScan\Model\obj\Debug\Model.csproj.AssemblyReference.cache
......@@ -92,7 +92,8 @@ namespace SmartScan
public static void LoadXLSALlData() {
if (!File.Exists(Config.DataSource_String)) {
throw new FileNotFoundException(Config.DataSource_String);
return;
//throw new FileNotFoundException(Config.DataSource_String);
}
var titles = ParseXLSFileTitle(Config.DataSource_String);
Common.extraKey = titles;
......@@ -149,7 +150,9 @@ namespace SmartScan
{
List<string> titles = new List<string>();
int emptycolcount = 0;
if (!File.Exists(filename))
return titles;
XLWorkbook wb = new XLWorkbook(filename);
IXLWorksheet ws = wb.Worksheet(1);
......
......@@ -23,7 +23,7 @@ namespace SmartScan
Common.config = new BLL.Config();
Common.config.SoftVersion = version;
Common.config.Backgrounder = back;
//BLL.Config.Backgrounder = back;
ExtraFileData.Init();
Asa.FaceControl.Language.LoadPath(FilePath.LANGUAGE_DIR);
LogNet.log.Debug("加载语言文件夹:" + FilePath.LANGUAGE_DIR);
......
......@@ -164,8 +164,7 @@ namespace SmartScan
var barcode = content.Values.ToArray();
SaveRetrospect(labelBmp, barcode);
if (Common.config.PrintCompletedClear)
Common.extension.Clear();
}
catch (Exception ex)
{
......@@ -204,7 +203,7 @@ namespace SmartScan
return;
}
Common.SCMM = new();
if (!Common.config.Backgrounder)
if (!BLL.Config.Backgrounder)
{
monitor = new();
Application.AddMessageFilter(monitor);
......@@ -282,7 +281,7 @@ namespace SmartScan
private void FrmMain_Activated(object sender, EventArgs e)
{
if (Common.config.Backgrounder) Hide();
if (BLL.Config.Backgrounder) Hide();
}
private void CboLanguage_SelectedIndexChanged(object sender, EventArgs e)
......
......@@ -213,6 +213,7 @@ namespace SmartScan
this.Controls.Add(this.BtnWorkMode);
this.Icon = global::SmartScan.Properties.Resources.NEO_64;
this.Name = "FrmSet";
this.ShowIcon = false;
this.Text = "FrmSet";
this.Load += new System.EventHandler(this.FrmSet_Load);
this.Controls.SetChildIndex(this.BtnWorkMode, 0);
......
......@@ -18,7 +18,6 @@ namespace SmartScan
{
InitializeComponent();
}
private void FrmSet_Load(object sender, EventArgs e)
{
menu.Add(BtnWorkMode, new UsrWorkMode());
......@@ -54,25 +53,6 @@ namespace SmartScan
}
}
private void BtnUnlock_Click(object sender, EventArgs e)
{
//if (BtnUnlock.HoldPress)
//{
// BtnUnlock.HoldPress = false;
//}
//else
//{
// DialogResult dr = new FrmUnlock().ShowDialog();
// if (dr == DialogResult.OK)
// BtnUnlock.HoldPress = true;
// else
// return;
//}
//foreach (FaceButton button in menu.Keys)
// menu[button].SetUnlock(BtnUnlock.HoldPress);
}
private void BtnOK_Click(object sender, EventArgs e)
{
foreach (FaceButton button in menu.Keys)
......
......@@ -29,32 +29,17 @@ namespace SmartScan
/// </summary>
private void InitializeComponent()
{
this.BtnLabel = new Asa.FaceControl.FaceButton();
this.BtnMaterial = new Asa.FaceControl.FaceButton();
this.BtnKeyword = new Asa.FaceControl.FaceButton();
this.BtnOK = new Asa.FaceControl.FaceButton();
this.BtnCancel = new Asa.FaceControl.FaceButton();
this.PnlTemp = new Asa.FaceControl.FacePanel();
this.BtnApply = new Asa.FaceControl.FaceButton();
this.BtnLabeling = new Asa.FaceControl.FaceButton();
this.CboLanguage = new Asa.FaceControl.FaceComboBox();
this.BtnWorkMode = new Asa.FaceControl.FaceButton();
this.BtnRetrospect = new Asa.FaceControl.FaceButton();
this.SuspendLayout();
//
// BtnLabel
//
this.BtnLabel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.BtnLabel.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
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, 55);
this.BtnLabel.Name = "BtnLabel";
this.BtnLabel.Padding = new System.Windows.Forms.Padding(3);
this.BtnLabel.Size = new System.Drawing.Size(160, 50);
this.BtnLabel.TabIndex = 5;
this.BtnLabel.Text = "Label";
this.BtnLabel.Click += new System.EventHandler(this.BtnMenu_Click);
//
// BtnMaterial
//
this.BtnMaterial.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
......@@ -151,21 +136,6 @@ namespace SmartScan
this.BtnApply.Text = "Apply";
this.BtnApply.Click += new System.EventHandler(this.BtnApply_Click);
//
// BtnLabeling
//
this.BtnLabeling.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.BtnLabeling.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.BtnLabeling.BorderWidth = 2;
this.BtnLabeling.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnLabeling.HoldPress = false;
this.BtnLabeling.Location = new System.Drawing.Point(11, 223);
this.BtnLabeling.Name = "BtnLabeling";
this.BtnLabeling.Padding = new System.Windows.Forms.Padding(3);
this.BtnLabeling.Size = new System.Drawing.Size(160, 50);
this.BtnLabeling.TabIndex = 7;
this.BtnLabeling.Text = "Labeling";
this.BtnLabeling.Click += new System.EventHandler(this.BtnMenu_Click);
//
// CboLanguage
//
this.CboLanguage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
......@@ -185,45 +155,76 @@ namespace SmartScan
this.CboLanguage.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.CboLanguage.SelectedIndexChanged += new System.EventHandler(this.CboLanguage_SelectedIndexChanged);
//
// BtnWorkMode
//
this.BtnWorkMode.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(20)))));
this.BtnWorkMode.BorderStyle = Asa.FaceControl.ControlShape.Rectangle;
this.BtnWorkMode.BorderWidth = 2;
this.BtnWorkMode.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(230)))), ((int)(((byte)(230)))), ((int)(((byte)(230)))));
this.BtnWorkMode.HoldPress = false;
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.TabIndex = 14;
this.BtnWorkMode.Text = "Work";
this.BtnWorkMode.Click += new System.EventHandler(this.BtnMenu_Click);
//
// BtnRetrospect
//
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.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.Name = "BtnRetrospect";
this.BtnRetrospect.Padding = new System.Windows.Forms.Padding(3);
this.BtnRetrospect.Size = new System.Drawing.Size(160, 50);
this.BtnRetrospect.TabIndex = 7;
this.BtnRetrospect.Text = "Keyword";
this.BtnRetrospect.Click += new System.EventHandler(this.BtnHistory_Click);
//
// FrmSetPlus
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(1274, 878);
this.Controls.Add(this.BtnWorkMode);
this.Controls.Add(this.CboLanguage);
this.Controls.Add(this.BtnApply);
this.Controls.Add(this.PnlTemp);
this.Controls.Add(this.BtnCancel);
this.Controls.Add(this.BtnOK);
this.Controls.Add(this.BtnLabeling);
this.Controls.Add(this.BtnRetrospect);
this.Controls.Add(this.BtnKeyword);
this.Controls.Add(this.BtnMaterial);
this.Controls.Add(this.BtnLabel);
this.Icon = global::SmartScan.Properties.Resources.NEO_64;
this.MinimizeBox = false;
this.Name = "FrmSetPlus";
this.Text = "FrmSet";
this.Load += new System.EventHandler(this.FrmSet_Load);
this.Controls.SetChildIndex(this.BtnLabel, 0);
this.Controls.SetChildIndex(this.BtnMaterial, 0);
this.Controls.SetChildIndex(this.BtnKeyword, 0);
this.Controls.SetChildIndex(this.BtnLabeling, 0);
this.Controls.SetChildIndex(this.BtnRetrospect, 0);
this.Controls.SetChildIndex(this.BtnOK, 0);
this.Controls.SetChildIndex(this.BtnCancel, 0);
this.Controls.SetChildIndex(this.PnlTemp, 0);
this.Controls.SetChildIndex(this.BtnApply, 0);
this.Controls.SetChildIndex(this.CboLanguage, 0);
this.Controls.SetChildIndex(this.BtnWorkMode, 0);
this.ResumeLayout(false);
}
#endregion
private Asa.FaceControl.FaceButton BtnLabel;
private Asa.FaceControl.FaceButton BtnMaterial;
private Asa.FaceControl.FaceButton BtnKeyword;
private Asa.FaceControl.FaceButton BtnOK;
private Asa.FaceControl.FaceButton BtnCancel;
private Asa.FaceControl.FacePanel PnlTemp;
private Asa.FaceControl.FaceButton BtnApply;
private Asa.FaceControl.FaceButton BtnLabeling;
private Asa.FaceControl.FaceComboBox CboLanguage;
private Asa.FaceControl.FaceButton BtnWorkMode;
private Asa.FaceControl.FaceButton BtnRetrospect;
}
}
\ No newline at end of file
......@@ -17,7 +17,28 @@ namespace SmartScan
public FrmSetPlus()
{
InitializeComponent();
Language.SetLanguage(this);
//Language.SetLanguage(this);
this.SizeChanged += FrmSetPlus_SizeChanged;
this.FormClosing += FrmSetPlus_FormClosing;
}
private void FrmSetPlus_FormClosing(object sender, FormClosingEventArgs e)
{
e.Cancel = true;
this.WindowState = FormWindowState.Minimized;
this.Hide();
}
private void FrmSetPlus_SizeChanged(object sender, EventArgs e)
{
if (WindowState == FormWindowState.Minimized)
{
this.Hide();
}
else {
}
}
private void FrmSet_Load(object sender, EventArgs e)
......@@ -27,10 +48,10 @@ namespace SmartScan
Controls.Remove(menu[button].GetPanel());
}
menu.Clear();
menu.Add(BtnLabel, new UsrPrintTemplate());
menu.Add(BtnWorkMode, new UsrWorkMode2());
//menu.Add(BtnLabel, new UsrPrintTemplate());
menu.Add(BtnMaterial, new UsrMaterialTemplate());
menu.Add(BtnKeyword, new UsrMacro());
menu.Add(BtnLabeling, new UsrLabeling());
foreach (FaceButton button in menu.Keys)
{
......@@ -89,11 +110,15 @@ namespace SmartScan
new FaceMessageBox("", text, MessageBoxButtons.OK).ShowDialog();
Common.extension.Update();
DialogResult = DialogResult.OK;
WindowState = FormWindowState.Minimized;
}
private void BtnCancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
FrmSet_Load(this, EventArgs.Empty);
WindowState = FormWindowState.Minimized;
Hide();
}
private void BtnApply_Click(object sender, EventArgs e)
......@@ -115,5 +140,10 @@ namespace SmartScan
FrmSet_Load(this, EventArgs.Empty);
}
}
private void BtnHistory_Click(object sender, EventArgs e)
{
new FrmRetrospect().ShowDialog();
}
}
}
......@@ -2,6 +2,8 @@
using Model;
using System.Windows.Forms;
using System.Diagnostics;
using System.Threading;
using System.Runtime.InteropServices;
namespace SmartScan
{
......@@ -16,41 +18,53 @@ namespace SmartScan
{
Environment.CurrentDirectory = Application.StartupPath;
_ = new Mutex(true, Application.ProductName, out bool ret);
if (!ret)
{
IntPtr formhwnd = FindWindow(null, "BarCode Rule Setting");
if (formhwnd == IntPtr.Zero)
formhwnd = FindWindow(null, "条码规则设置");
ShowWindow(formhwnd, SW_RESTORE);
SwitchToThisWindow(formhwnd, true);
//MessageBox.Show("该程序已经启动", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
Application.ThreadException += Application_ThreadException;
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
if (IsRun()) return; //已运行
bool back = false;
//BLL.Config.Backgrounder = true;
bool back = BLL.Config.Backgrounder;
bool hide = false;
if (args.Length > 0)
back = args[0].ToLower() == "background" || args[0].ToLower() == "plussetting";
hide = args[0].ToLower() == "hide";
var onnxexe = "onnx\\OcrLiteOnnxForm.exe";
Process.Start(onnxexe);
Application.Run(new FrmLoading(back)); //预加载,完成后自动退出
if (args.Length > 0 && args[0].ToLower() == "plussetting")
{
Application.Run(new FrmSetPlus());
}
else
Common.frmMain = new FrmMain();
Common.frmWaitting = new FrmWaitting();
if (back)
{
Common.frmMain = new FrmMain();
Common.frmWaitting = new FrmWaitting();
if (back)
{
Common.frmMain.WindowState = FormWindowState.Minimized;
Common.frmWaitting.WindowState = FormWindowState.Minimized;
}
var fsp = new FrmSetPlus();
if (hide)
fsp.WindowState = FormWindowState.Minimized;
Application.Run(fsp);
}else
Application.Run(Common.frmMain);
}
Exit();
}
......@@ -87,5 +101,35 @@ namespace SmartScan
LogNet.log.Error("Application_ThreadException", e.Exception);
}
#region Win32函数的声明
/// <summary>
/// 找到某个窗口与给出的类别名和窗口名相同窗口
/// </summary>
/// <param name="lpClassName">类别名</param>
/// <param name="lpWindowName">窗口名</param>
/// <returns>成功找到返回窗口句柄,否则返回null</returns>
[DllImport("user32.dll")]
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
/// <summary>
/// 切换到窗口并把窗口设入前台,类似 SetForegroundWindow方法的功能
/// </summary>
/// <param name="hWnd">窗口句柄</param>
/// <param name="fAltTab">True代表窗口正在通过Alt/Ctrl +Tab被切换</param>
[DllImport("user32.dll ", SetLastError = true)]
static extern void SwitchToThisWindow(IntPtr hWnd, bool fAltTab);
/// <summary>
/// 设置窗口的显示状态
/// </summary>
/// <param name="hWnd">窗口句柄</param>
/// <param name="cmdShow">指示窗口如何被显示</param>
/// <returns>如果窗体之前是可见,返回值为非零;如果窗体之前被隐藏,返回值为零</returns>
[DllImport("user32.dll", EntryPoint = "ShowWindow", CharSet = CharSet.Auto)]
public static extern int ShowWindow(IntPtr hwnd, int nCmdShow);
public const int SW_RESTORE = 9;
#endregion
}
}
......@@ -72,7 +72,7 @@ namespace SmartScan
if (isTouch) return;
isTouch = true;
btnMatchedName.Invoke(delegate() {
if (!Common.config.Backgrounder)
if (!BLL.Config.Backgrounder)
btnMatchedName.Visible = false;
Common.extension.Clear();
});
......@@ -134,7 +134,7 @@ namespace SmartScan
if (!isRun) return;
if (isTouch) return;
if (!Common.config.Backgrounder)
if (!BLL.Config.Backgrounder)
btnMatchedName.Visible = false;
Common.extension.Clear();
workCodeInfo = new();
......@@ -222,7 +222,7 @@ namespace SmartScan
System.Threading.Thread.Sleep(2000); //光源打开有一个由暗变亮的过程
}
workCodeInfo = Common.cameraVision.GetBarCode(out List<Bitmap> image);
if (image.Count > 0 && !Common.config.Backgrounder) picShow.Image = image[0];
if (image.Count > 0 && !BLL.Config.Backgrounder) picShow.Image = image[0];
if (image.Count > 0)
Common.mateEdit.CurrntBitmap = image[0];
......@@ -247,14 +247,14 @@ namespace SmartScan
workCodeInfo = Common.cameraVision.GetBarCode(bmp);
Common.frmMain.Invoke(delegate ()
{
if (!Common.config.Backgrounder)
if (!BLL.Config.Backgrounder)
picShow.Image = bmp;
Common.mateEdit.CurrntBitmap = bmp;
});
return true;
}
if (workCodeInfo.Count == 0 && !Common.config.Backgrounder)
if (workCodeInfo.Count == 0 && !BLL.Config.Backgrounder)
{
string text = Language.Dialog(LanguageDialogKey.CODE_COUNT);
new FaceMessageBox("", text, MessageBoxButtons.OK).ShowDialog(Common.frmMain);
......@@ -267,13 +267,13 @@ namespace SmartScan
private void AddCodeCenter()
{
LogNet.log.Info("Work AddCodeCenter");
if (!Common.config.Backgrounder)
if (!BLL.Config.Backgrounder)
picShow.CodeCenterClear();
if (workCodeInfo.Count == 0) return;
PointF[] center = new PointF[workCodeInfo.Count];
for (int i = 0; i < workCodeInfo.Count; i++)
center[i] = workCodeInfo[i].Center;
if (!Common.config.Backgrounder)
if (!BLL.Config.Backgrounder)
picShow.AddCodeCenter(center);
Application.DoEvents();
}
......@@ -291,7 +291,7 @@ namespace SmartScan
if (rtn)
{
LogNet.log.Info("模板匹配 " + mateName + ",关键字个数 " + workCodeKeyword.Count);
if (!Common.config.Backgrounder)
if (!BLL.Config.Backgrounder)
{
btnMatchedName.Visible = true;
btnMatchedName.Text = mateName;
......@@ -300,7 +300,7 @@ namespace SmartScan
else
{
LogNet.log.Info("没有匹配到模板");
if (!Common.config.Backgrounder)
if (!BLL.Config.Backgrounder)
{
string text = Language.Dialog("MaterialTemplateNoMatch");
var fm = new FaceMessageBox("", text, MessageBoxButtons.OK);
......@@ -318,7 +318,7 @@ namespace SmartScan
Common.extension.SetKey(originalCodeText, workCodeKeyword, hasMatch,out _);
if (workCodeKeyword.Count == 0) return;
if (Common.config.PromptAfterPrinting && !Common.config.Backgrounder)
if (Common.config.PromptAfterPrinting && !BLL.Config.Backgrounder)
{
string text = Language.Dialog("SelectPrintContent");
new FaceMessageBox("", text, MessageBoxButtons.OK).ShowDialog();
......
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using Asa.FaceControl;
using Model;
namespace SmartScan
{
public partial class UsrWorkMode2 : UserControl, ISetMenu
{
public UsrWorkMode2()
{
InitializeComponent();
//打印机
LstPrinter.Items.AddRange(Printer.AllName);
LstPrinter.Text = Common.config.PrinterName;
if (Common.config.PrintLandscape)
RdoLandscape.Checked = true;
else
RdoVertical.Checked = true;
//图像保存
((FaceRadioBox)facePanel1.Controls["Rdo" + Common.config.HistoryImage.ToString()]).Checked = true;
//6个复选框
ChkSelectPN.Checked = Common.config.SelectHttpPN;
ChkLabelEmptyCheck.Checked = Common.config.LabelEmptyCheck;
ChkOpenEnterWork.Checked = Common.config.OpenStartWork;
ChkPrintCompletedClear.Checked = Common.config.PrintCompletedClear;
ChkOpenMaximize.Checked = Common.config.OpenMaximize;
ChkTriggerOpenLight.Checked = Common.config.TriggerOpenLight;
ChkPromptAfterPrinting.Checked = Common.config.PromptAfterPrinting;
ChkAutoPrint.Checked = Common.config.AutoPrint;
//默认标签
LstLabel.Items.AddRange(Common.labelEdit.Name);
LstLabel.Text = Common.config.DefaultPrintLabel;
//优先模板
LstMate.Items.AddRange(Common.mateEdit.Name);
LstMate.Text = Common.config.DefaultMaterialName;
Language.SetLanguage(this);
}
public FacePanel GetPanel()
{
return facePanel1;
}
public void Save()
{
//保存打印机
Common.config.PrintLandscape = RdoLandscape.Checked;
if (LstPrinter.SelectedIndex == -1)
{
if (LstPrinter.Items.Count == 1)
Common.config.PrinterName = LstPrinter.Items[0];
}
else
{
Common.config.PrinterName = LstPrinter.Text;
}
//追溯图像保存
if (RdoOriginal.Checked)
Common.config.HistoryImage = HistoryImage.Original;
else if (RdoCondense.Checked)
Common.config.HistoryImage = HistoryImage.Condense;
else if (RdoNoImage.Checked)
Common.config.HistoryImage = HistoryImage.NoImage;
//默认打印标签
if (LstLabel.SelectedIndex == -1)
{
if (LstLabel.Items.Count == 1)
Common.config.DefaultPrintLabel = LstLabel.Items[0];
}
else
{
Common.config.DefaultPrintLabel = LstLabel.Text;
}
//优先匹配模板
if (LstMate.SelectedIndex == -1)
{
if (LstMate.Items.Count == 1)
Common.config.DefaultMaterialName = LstMate.Items[0];
}
else
{
Common.config.DefaultMaterialName = LstMate.Text;
}
//6个复选框
Common.config.SelectHttpPN = ChkSelectPN.Checked;
Common.config.LabelEmptyCheck = ChkLabelEmptyCheck.Checked;
Common.config.OpenStartWork = ChkOpenEnterWork.Checked;
Common.config.OpenMaximize = ChkOpenMaximize.Checked;
Common.config.PrintCompletedClear = ChkPrintCompletedClear.Checked;
Common.config.TriggerOpenLight = ChkTriggerOpenLight.Checked;
Common.config.PromptAfterPrinting = ChkPromptAfterPrinting.Checked;
Common.config.AutoPrint = ChkAutoPrint.Checked;
Common.config.Save();
}
}
}
<?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
......@@ -127,6 +127,12 @@
<Compile Include="SetControl\UsrDataSource.Designer.cs">
<DependentUpon>UsrDataSource.cs</DependentUpon>
</Compile>
<Compile Include="SetControl\UsrWorkMode2.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="SetControl\UsrWorkMode2.Designer.cs">
<DependentUpon>UsrWorkMode2.cs</DependentUpon>
</Compile>
<Compile Include="UserLoginWindow.cs" />
<Compile Include="Form\FrmAbout.cs">
<SubType>Form</SubType>
......@@ -290,6 +296,9 @@
<EmbeddedResource Include="SetControl\UsrDataSource.resx">
<DependentUpon>UsrDataSource.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SetControl\UsrWorkMode2.resx">
<DependentUpon>UsrWorkMode2.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SetControl\UsrWorkMode.resx">
<DependentUpon>UsrWorkMode.cs</DependentUpon>
</EmbeddedResource>
......@@ -357,6 +366,7 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>rem copy C:\Neotel\DLL\Halcon\halcondotnet.dll $(TargetDir)halcondotnet.dll</PostBuildEvent>
<PostBuildEvent>rem copy C:\Neotel\DLL\Halcon\halcondotnet.dll $(TargetDir)halcondotnet.dll
start $(TargetDir)</PostBuildEvent>
</PropertyGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<StartArguments>background-</StartArguments>
<StartArguments>hide-</StartArguments>
</PropertyGroup>
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
......
......@@ -7,7 +7,7 @@ namespace SmartScan
{
public static bool Show()
{
if (Common.config.Backgrounder) //后台模式不需要登录
if (BLL.Config.Backgrounder) //后台模式不需要登录
return true;
if (Common.config.EnabledUserLogin)
......
......@@ -47,6 +47,10 @@ namespace SmartScan
Common.frmMain.Invoke(new Action(() => { msg = Common.frmMain.WebTouchWork(str); }));
return new WebResultCode() { Data = msg };
}
public string alive()
{
return "1";
}
public WebResultCode ProcessBitmap(Stream info, string param)
{
BinaryFormatter bf = new BinaryFormatter();
......
Reelid
PN
DATE
QTY
LOT
h1
h2
BAT
PRO
EXP
SP
test
1541
\ No newline at end of file
1561
\ No newline at end of file
......@@ -26,8 +26,9 @@
<ExtensionGroup>General</ExtensionGroup>
<HttpServer>
</HttpServer>
<HttpReelID>http://127.0.0.1:8888/test</HttpReelID>
<DefaultMaterialName>m2</DefaultMaterialName>
<HttpReelID>
</HttpReelID>
<DefaultMaterialName>t1</DefaultMaterialName>
<TriggerOpenLight>True</TriggerOpenLight>
<WebService>http://127.0.0.1:58137</WebService>
<PromptAfterPrinting>False</PromptAfterPrinting>
......
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Language Name="English">
<Dialog>
<LoginWrong>The login password is incorrect.</LoginWrong>
......@@ -34,7 +34,7 @@
<!--原文:请选择数据文件-->
<selectdatasource>Please select data source</selectdatasource>
<!--原文:文件状态:改文件不存在-->
<filenotexists>文件状态:The file doesn't exit</filenotexists>
<filenotexists>File:The file doesn't exit</filenotexists>
<!--原文:文件内容解析失败-->
<filepatseerror>File read fails</filepatseerror>
<!--原文:文件格式不正确-->
......@@ -66,7 +66,7 @@
<BtnCancel Text="Cancel" Font="Arial,12,," />
<BtnApply Text="Apply" Font="Arial,12,," />
<!--原文:Data Source-->
<BtnDataSource Text="Data Source" Font="微软雅黑,12,," />
<BtnDataSource Text="Data Source" Font="Arial,12,," />
</FrmSet>
<FrmSetPlus Text="BarCode Rule Setting" Font="Arial,24,B,">
<BtnWorkMode Text="Work Mode" Font="Arial,12,B," />
......@@ -74,9 +74,110 @@
<BtnLabel Text="Label Template" Font="Arial,12,B," />
<BtnMaterial Text="Material Template" Font="Arial,12,B," />
<BtnKeyword Text="Keyword" Font="Arial,12,B," />
<BtnRetrospect Text="Traceability" Font="Arial,14,B," />
<BtnOK Text="Save" Font="Arial,12,," />
<BtnCancel Text="Cancel" Font="Arial,12,," />
<BtnApply Text="Apply" Font="Arial,12,," />
<!--原文:自动打印-->
<ChkAutoPrint Text="自动打印" Font="微软雅黑,12,," />
<!--原文:打印完成后提示-->
<ChkPromptAfterPrinting Text="打印完成后提示" Font="微软雅黑,12,," />
<!--原文:触发信号亮灯-->
<ChkTriggerOpenLight Text="触发信号亮灯" Font="微软雅黑,12,," />
<!--原文:优先匹配模板-->
<LblDefaultMate Text="优先匹配模板" Font="微软雅黑,12,," />
<!--原文:标签打印完成后清除数据-->
<ChkPrintCompletedClear Text="标签打印完成后清除数据" Font="微软雅黑,12,," />
<!--原文:软件打开最大化-->
<ChkOpenMaximize Text="软件打开最大化" Font="微软雅黑,12,," />
<!--原文:软件打开自动进入工作-->
<ChkOpenEnterWork Text="软件打开自动进入工作" Font="微软雅黑,12,," />
<!--原文:标签空内容校验-->
<ChkLabelEmptyCheck Text="标签空内容校验" Font="微软雅黑,12,," />
<!--原文:通过服务器查询PN-->
<ChkSelectPN Text="通过服务器查询PN" Font="微软雅黑,12,," />
<!--原文:默认打印标签-->
<LblDefaultLabel Text="默认打印标签" Font="微软雅黑,12,," />
<!--原文:纵向打印-->
<RdoVertical Text="纵向打印" Font="微软雅黑,12,," />
<!--原文:横向打印-->
<RdoLandscape Text="横向打印" Font="微软雅黑,12,," />
<!--原文:打印机-->
<LblPrint Text="打印机" Font="微软雅黑,12,," />
<!--原文:不保存-->
<RdoNoImage Text="不保存" Font="微软雅黑,12,," />
<!--原文:压缩图-->
<RdoCondense Text="压缩图" Font="微软雅黑,12,," />
<!--原文:原始图-->
<RdoOriginal Text="原始图" Font="微软雅黑,12,," />
<!--原文:追溯图像保存-->
<LblHistoryImage Text="追溯图像保存" Font="微软雅黑,12,," />
<!--原文:复制标签-->
<BtnCopyLabel Text="复制标签" Font="微软雅黑,12,," />
<!--原文:显示关键字-->
<ChkFieldShowKey Text="显示关键字" Font="微软雅黑,12,," />
<!--原文:码制-->
<LblFieldType Text="码制" Font="微软雅黑,12,," />
<!--原文:设置字段内容-->
<BtnSetField Text="设置字段内容" Font="微软雅黑,12,," />
<!--原文:字段字体-->
<BtnFieldFont Text="字段字体" Font="微软雅黑,12,," />
<!--原文:删除字段-->
<BtnDelField Text="删除字段" Font="微软雅黑,12,," />
<!--原文:添加字段-->
<BtnAddField Text="添加字段" Font="微软雅黑,12,," />
<!--原文:打印测试-->
<BtnPrintTest Text="打印测试" Font="微软雅黑,12,," />
<!--原文:重命名-->
<BtnRenameLabel Text="重命名" Font="微软雅黑,12,," />
<!--原文:删除标签-->
<BtnDelLabel Text="删除标签" Font="微软雅黑,12,," />
<!--原文:新建标签-->
<BtnAddLabel Text="新建标签" Font="微软雅黑,12,," />
<!--原文:提取条码-->
<BtnExtractCode Text="提取条码" Font="微软雅黑,12,," />
<!--原文:特征码-->
<BtnPrimaryCode Text="特征码" Font="微软雅黑,12,," />
<!--原文:识别条码-->
<BtnScanCode Text="识别条码" Font="微软雅黑,12,," />
<!--原文:打开本地图片-->
<BtnLocalImage Text="打开本地图片" Font="微软雅黑,12,," />
<!--原文:获取设备图像-->
<BtnCameraImage Text="获取设备图像" Font="微软雅黑,12,," />
<!--原文:关闭光源-->
<BtnCloseLight Text="关闭光源" Font="微软雅黑,12,," />
<!--原文:打开光源-->
<BtnOpenLight Text="打开光源" Font="微软雅黑,12,," />
<!--原文:重命名-->
<BtnRenameMate Text="重命名" Font="微软雅黑,12,," />
<!--原文:删除模板-->
<BtnDelMate Text="删除模板" Font="微软雅黑,12,," />
<!--原文:新建模板-->
<BtnAddMate Text="新建模板" Font="微软雅黑,12,," />
<!--原文:添加日期时间-->
<btn_adddatetime Text="添加日期时间" Font="微软雅黑,12,," />
<!--原文:生成条件-->
<LblContent Text="生成条件" Font="微软雅黑,12,," />
<!--原文:数字位数-->
<LblPlaces Text="数字位数" Font="微软雅黑,12,," />
<!--原文:序号每日重置-->
<ChkResetidbydate Text="序号每日重置" Font="微软雅黑,12,," />
<!--原文:位数不足前面补0-->
<ChkReelIDFillZero Text="位数不足前面补0" Font="微软雅黑,12,," />
<!--原文:开头字符串-->
<LblPrefix Text="开头字符串" Font="微软雅黑,12,," />
<!--原文:结尾字符串-->
<LblPostfix Text="结尾字符串" Font="微软雅黑,12,," />
<!--原文:切换自动RI-->
<btn_setriid Text="切换自动RI" Font="微软雅黑,12,," />
<!--原文:添加到生成条件-->
<BtnAppendKey Text="添加到生成条件" Font="微软雅黑,12,," />
<!--原文:更新-->
<BtnUpdateKey Text="更新" Font="微软雅黑,12,," />
<!--原文:删除-->
<BtnDelKey Text="删除" Font="微软雅黑,12,," />
<!--原文:添加-->
<BtnAddKey Text="添加" Font="微软雅黑,12,," />
</FrmSetPlus>
<UsrWorkMode>
<LblPrint Text="Printer" Font="Arial,12,B," />
......@@ -100,6 +201,28 @@
<LblDefaultMate Text="First matching template" Font="Arial,12,B," />
<LstMate Text="" Font="Arial,12,," />
</UsrWorkMode>
<UsrWorkMode2>
<LblPrint Text="Printer" Font="Arial,12,B," />
<LblDefaultLabel Text="Default Print Label" Font="Arial,12,B," />
<RdoLandscape Text="Landscape" Font="Arial,12,," />
<RdoVertical Text="Vertical" Font="Arial,12,," />
<LblHistoryImage Text="Traceability image save" Font="Arial,12,B," />
<RdoOriginal Text="Original" Font="Arial,12,," />
<RdoCondense Text="Compressed" Font="Arial,12,," />
<RdoNoImage Text="Not Saving" Font="Arial,12,," />
<ChkSelectPN Text="Query PN from the server" Font="Arial,12,," />
<ChkLabelEmptyCheck Text="Print empy content reminder" Font="Arial,12,," />
<ChkPrintCompletedClear Text="Clear the contents after printed the label" Font="Arial,12,," />
<ChkOpenEnterWork Text="Enter working mode when software is opened" Font="Arial,12,," />
<ChkOpenMaximize Text="Open software maximized window" Font="Arial,12,," />
<ChkTriggerOpenLight Text="Turn on light after triggering device" Font="Arial,12,," />
<ChkPromptAfterPrinting Text="Prompt message after identification is complete" Font="Arial,12,," />
<ChkAutoPrint Text="Auto Print" Font="Arial,12,," />
<LstPrinter Text="" Font="Arial,12,," />
<LstLabel Text="" Font="Arial,12,," />
<LblDefaultMate Text="First matching template" Font="Arial,12,B," />
<LstMate Text="" Font="Arial,12,," />
</UsrWorkMode2>
<UsrCamera>
<BtnOpenLight Text="Turn on light" Font="Arial,12,," />
<BtnCloseLight Text="Turn off light" Font="Arial,12,," />
......@@ -141,19 +264,19 @@
</UsrMaterialTemplate>
<UsrDataSource>
<!--原文:遍历同目录-->
<ChkRecursive Text="Search files in the same directory" Font="微软雅黑,12,," />
<ChkRecursive Text="Search files in the same directory" Font="Arial,12,," />
<!--原文:标签可用字段-->
<groupBox_lblkey Text="Label Available Fields" Font="微软雅黑,12,," />
<groupBox_lblkey Text="Label Available Fields" Font="Arial,12,," />
<!--原文:选择文件-->
<BtnSelectFile Text="Select File" Font="微软雅黑,12,," />
<BtnSelectFile Text="Select File" Font="Arial,12,," />
<!--原文:关键字匹配数据标题-->
<faceLabel2 Text="Keyword matches the data title" Font="微软雅黑,12,," />
<faceLabel2 Text="Keyword matches the data title" Font="Arial,12,," />
<!--原文:识别关键词-->
<faceLabel1 Text="Identify Key Words" Font="微软雅黑,12,," />
<faceLabel1 Text="Identify Key Words" Font="Arial,12,," />
<!--原文:文件状态:-->
<LblFilestatus Text="File Status:" Font="微软雅黑,12,," />
<LblFilestatus Text="File Status:" Font="Arial,12,," />
<!--原文:Label Data Source-->
<LblContent Text="Label Data Source" Font="微软雅黑,12,," />
<LblContent Text="Label Data Source" Font="Arial,12,," />
</UsrDataSource>
<UsrMacro>
<BtnAddKey Text="Add key" Font="Arial,12,," />
......
......@@ -68,9 +68,46 @@
<BtnLabel Text="打印模版" Font="微软雅黑,12,B," />
<BtnMaterial Text="物料模版" Font="微软雅黑,12,B," />
<BtnKeyword Text="关键字" Font="微软雅黑,12,B," />
<BtnRetrospect Text="追溯" Font="微软雅黑,14,B," />
<BtnOK Text="保存" Font="微软雅黑,12,," />
<BtnCancel Text="取消" Font="微软雅黑,12,," />
<BtnApply Text="应用" Font="微软雅黑,12,," />
<!--原文:简体中文-->
<CboLanguage Text="简体中文" Font="微软雅黑,12,," />
<!--原文:自动打印-->
<ChkAutoPrint Text="自动打印" Font="微软雅黑,12,," />
<!--原文:打印完成后提示-->
<ChkPromptAfterPrinting Text="打印完成后提示" Font="微软雅黑,12,," />
<!--原文:触发信号亮灯-->
<ChkTriggerOpenLight Text="触发信号亮灯" Font="微软雅黑,12,," />
<!--原文:优先匹配模板-->
<LblDefaultMate Text="优先匹配模板" Font="微软雅黑,12,," />
<!--原文:标签打印完成后清除数据-->
<ChkPrintCompletedClear Text="标签打印完成后清除数据" Font="微软雅黑,12,," />
<!--原文:软件打开最大化-->
<ChkOpenMaximize Text="软件打开最大化" Font="微软雅黑,12,," />
<!--原文:软件打开自动进入工作-->
<ChkOpenEnterWork Text="软件打开自动进入工作" Font="微软雅黑,12,," />
<!--原文:标签空内容校验-->
<ChkLabelEmptyCheck Text="标签空内容校验" Font="微软雅黑,12,," />
<!--原文:通过服务器查询PN-->
<ChkSelectPN Text="通过服务器查询PN" Font="微软雅黑,12,," />
<!--原文:默认打印标签-->
<LblDefaultLabel Text="默认打印标签" Font="微软雅黑,12,," />
<!--原文:纵向打印-->
<RdoVertical Text="纵向打印" Font="微软雅黑,12,," />
<!--原文:横向打印-->
<RdoLandscape Text="横向打印" Font="微软雅黑,12,," />
<!--原文:打印机-->
<LblPrint Text="打印机" Font="微软雅黑,12,," />
<!--原文:不保存-->
<RdoNoImage Text="不保存" Font="微软雅黑,12,," />
<!--原文:压缩图-->
<RdoCondense Text="压缩图" Font="微软雅黑,12,," />
<!--原文:原始图-->
<RdoOriginal Text="原始图" Font="微软雅黑,12,," />
<!--原文:追溯图像保存-->
<LblHistoryImage Text="追溯图像保存" Font="微软雅黑,12,," />
</FrmSetPlus>
<UsrWorkMode>
<LblPrint Text="打印机" Font="微软雅黑,12,B," />
......
<?xml version="1.0" encoding="utf-8"?>
<Label Name="test1" Size="50,70">
<Field Type="QRCode" Text="QRCode[ORDERNO];[ORDERNUM];[MATERIALNO];[MATERIALDEC];[LOT];[STORAGE];[QTY];[BATCHNO];[SN]" Rectangle="1.52,1.522,20,20" Font="宋体,9,," />
<Field Type="Text" Text="订单号:[ORDERNO]" Rectangle="23.368,2.032,25.24,6.698" Font="宋体,9,," />
<Field Type="Text" Text="订单行号:[ORDERNUM]" Rectangle="23.622,10.668,24.986,8.476" Font="宋体,9,," />
<Field Type="Text" Text="物料编码:[MATERIALNO]" Rectangle="1.524,22.606,46.83,4.666" Font="宋体,9,," />
<Field Type="Text" Text="物料描述:[MATERIALDEC]" Rectangle="1.524,29.972,47.084,8.222" Font="宋体,9,," />
<Field Type="Text" Text="厂家批次:[LOT]" Rectangle="1.524,39.37,46.83,4.412" Font="宋体,9,," />
<Field Type="Text" Text="库位:[STORAGE]" Rectangle="1.778,45.212,46.576,5.174" Font="宋体,9,," />
<Field Type="Text" Text="数量:[QTY]" Rectangle="1.778,51.054,46.83,5.174" Font="宋体,9,," />
<Field Type="Text" Text="批次号:[BATCHNO]" Rectangle="1.778,57.658,46.322,10" Font="微软雅黑,12,," />
</Label>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Label Name="南京南瑞" Size="80,65">
<Field Type="QRCode" Text="[PURCHASEORDERNO];[PURCHASEORDERNUMBER];[MATERIALNO];[MATERIALDEC];[FACTORYLOT];[STORAGE];[SN];[QTY];[BATCHNO]" Rectangle="54.864,1.016,19.572,18.716" Font="宋体,9,," />
<Field Type="Text" Text="采购订单号: [PURCHASEORDERNO]" Rectangle="2.286002,6.35,38.622,3.476001" Font="宋体,9,," />
<Field Type="Text" Text="数量: [QTY]" Rectangle="1.778,22.606,26.176,3.222" Font="宋体,9,," />
<Field Type="Text" Text="批次号: [BATCHNO]" Rectangle="1.778002,16.00199,49.544,3.222" Font="宋体,9,," />
<Field Type="Text" Text="库位: [STORAGE]" Rectangle="2.032,12.7,39.13,3.222" Font="宋体,9,," />
<Field Type="Text" Text="厂家批次: [FACTORYLOT]" Rectangle="2.032,19.812,63.514,2.968" Font="宋体,9,," />
<Field Type="Text" Text="物料描述: [MATERIALDEC]" Rectangle="2.286,26.162,73.67401,9.825999" Font="宋体,9,," />
<Field Type="Text" Text="物料编码: [MATERIALNO]" Rectangle="2.286,2.540002,38.876,3.476" Font="宋体,9,," />
<Field Type="Text" Text="订单行号: [PURCHASEORDERNUMBER]" Rectangle="2.54,9.905999,38.622,2.714" Font="宋体,9,," />
</Label>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Label Name="fuzhi" Size="52,22">
<Field Type="QRCode" Text="[CurrentDate];[Reelid];[OrderNumber];[OrderLine];[MaterielNo];[Qty];[Batch]" Rectangle="35.068,3.524003,15.634,15.364" Font="宋体,9,," />
<Field Type="Text" Text="P/N:[PN]" Rectangle="2.286,7.62,29.986,8.476" Font="宋体,9,," />
</Label>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Label Name="DapuStor" Size="70,35">
<Field Type="Text" Text="DapuStor" Rectangle="0.5000005,0.2460005,25,5.024001" Font="Segoe UI,9,B," />
<Field Type="PDF417" Text="[PART]{enter}[QTY]{enter}[LOT]{enter}[ASL]{enter}[VEN]{enter}[TRACE]{enter}[DCODE]" Rectangle="1.5,4.826,67.07,6.952" Font="宋体,9,," />
<Field Type="Text" Text="PART#:[PART]" Rectangle="1.5,12,67,3.5" Font="宋体,9,," />
<Field Type="Text" Text="QTY :[QTY]" Rectangle="1.5,15.7,28.97,3.5" Font="宋体,9,," />
<Field Type="Text" Text="ASL :[ASL]" Rectangle="1.5,19.2,28.97,3.5" Font="宋体,9,," />
<Field Type="Text" Text="TRACE:[TRACE]" Rectangle="1.5,23,29.478,3.5" Font="宋体,9,," />
<Field Type="Text" Text="DCODE:[DCODE]" Rectangle="1.778,26.7,29.986,3.5" Font="宋体,9,," />
<Field Type="Code128" Text="[PART]" Rectangle="4.826,30.746,58.126,3.961999" Font="宋体,9,," />
<Field Type="Text" Text="LOT#:[LOT]" Rectangle="33.02,15.7,34.558,3.5" Font="宋体,9,," />
<Field Type="Text" Text="VEN :[VEN]" Rectangle="33.528,19.2,34.558,3.5" Font="宋体,9,," />
<Field Type="Text" Text="REV :[REV]" Rectangle="34.036,23,34.304,3.5" Font="宋体,9,," />
</Label>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Label Name="SEAGATE" Size="75,35">
<Field Type="Text" Text="SEAGATE" Rectangle="3.556,0.762,21.35,5.428" Font="宋体,9,B," />
<Field Type="PDF417" Text="[PART]1&#xD;&#xA;[QTY]2&#xD;&#xA;[ASL]3&#xD;&#xA;[LOT]4&#xD;&#xA;[VEN][REV][TRACE][DCODE]" Rectangle="3.556,4.826,65.546,6.19" Font="宋体,9,," />
<Field Type="Text" Text="PAPT#:" Rectangle="3.302,11.43,37.352,3.65" Font="宋体,9,," />
<Field Type="Text" Text="QTY :" Rectangle="3.302,14.478,36.082,3.142" Font="宋体,9,," />
<Field Type="Code128" Text="[PART]" Rectangle="7.62,29.21,53.354,4.158" Font="宋体,9,," />
<Field Type="Text" Text="LOT#:" Rectangle="43.688,14.224,25.922,3.904001" Font="宋体,9,," />
<Field Type="Text" Text="ASL :" Rectangle="3.302,18.034,35.574,3.65" Font="宋体,9,," />
<Field Type="Text" Text="TRACE:" Rectangle="3.302,21.59,33.796,3.142" Font="宋体,9,," />
<Field Type="Text" Text="DCODE:" Rectangle="3.302,25.4,31.764,3.142" Font="宋体,9,," />
<Field Type="Text" Text="VEN :" Rectangle="43.17999,18.034,27.7,3.65" Font="宋体,9,," />
<Field Type="Text" Text="REV :" Rectangle="43.688,22.098,26.43,3.142" Font="宋体,9,," />
</Label>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Label Name="asasas" Size="52,22">
<Field Type="QRCode" Text="[CurrentDate];[Reelid];[OrderNumber];[OrderLine];[MaterielNo];[Qty];[Batch]" Rectangle="35.068,3.524003,15.634,15.364" Font="宋体,9,," />
<Field Type="Text" Text="P/N:[PN]" Rectangle="2.286,7.62,29.986,8.476" Font="宋体,9,," />
</Label>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Label Name="DapuStor2" Size="70,35">
<Field Type="Text" Text="DapuStor2" Rectangle="0.5000005,0.2460005,25,5.024001" Font="Segoe UI,9,B," />
<Field Type="PDF417" Text="[PART]{enter}[QTY]{enter}[LOT]{enter}[ASL]{enter}[VEN]{enter}[TRACE]{enter}[DCODE]" Rectangle="1.5,4.826,67.07,6.952" Font="宋体,9,," />
<Field Type="Text" Text="PART#:[PART]" Rectangle="1.5,12,67,3.5" Font="宋体,9,," />
<Field Type="Text" Text="QTY :[QTY]" Rectangle="1.5,15.7,28.97,3.5" Font="宋体,9,," />
<Field Type="Text" Text="ASL :[ASL]" Rectangle="1.5,19.2,28.97,3.5" Font="宋体,9,," />
<Field Type="Text" Text="TRACE:[TRACE]" Rectangle="1.5,23,29.478,3.5" Font="宋体,9,," />
<Field Type="Text" Text="DCODE:[DCODE]" Rectangle="1.778,26.7,29.986,3.5" Font="宋体,9,," />
<Field Type="Code128" Text="[PART]" Rectangle="4.826,30.746,58.126,3.961999" Font="宋体,9,," />
<Field Type="Text" Text="LOT#:[LOT]" Rectangle="33.02,15.7,34.558,3.5" Font="宋体,9,," />
<Field Type="Text" Text="VEN :[VEN]" Rectangle="33.528,19.2,34.558,3.5" Font="宋体,9,," />
<Field Type="Text" Text="REV :[REV]" Rectangle="34.036,23,34.304,3.5" Font="宋体,9,," />
</Label>
\ No newline at end of file
29118a0e85ae73ebe328af796212ada2655bcbd6
40d30dc58bb153c56f0b5b321dc42e4baea98bcf
......@@ -177,3 +177,4 @@ D:\rick\vs\SmartScan\SmartScan\bin\Debug\ClosedXML.xml
D:\rick\vs\SmartScan\SmartScan\bin\Debug\DocumentFormat.OpenXml.xml
D:\rick\vs\SmartScan\SmartScan\bin\Debug\ExcelNumberFormat.xml
D:\rick\vs\SmartScan\SmartScan\obj\Debug\SmartScan.FrmDataFilePreview.resources
D:\rick\vs\SmartScan\SmartScan\obj\Debug\SmartScan.UsrWorkMode2.resources
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!