Commit fc66978b 刘韬

1

1 个父辈 75d9da12
...@@ -250,7 +250,6 @@ namespace BLL ...@@ -250,7 +250,6 @@ namespace BLL
CheckText("等待中"); CheckText("等待中");
} }
islast = false; islast = false;
} }
// 创建不包含自增ID的临时字典进行比较 // 创建不包含自增ID的临时字典进行比较
//var keyWithoutReelID = new Dictionary<string, string>(key); //var keyWithoutReelID = new Dictionary<string, string>(key);
......
using Asa.FaceControl; using Asa.FaceControl;
using BLL; using BLL;
using DocumentFormat.OpenXml.Bibliography;
using HandyControl.Properties.Langs;
using HandyControl.Tools.Extension; using HandyControl.Tools.Extension;
using Model; using Model;
using Newtonsoft.Json; using Newtonsoft.Json;
using OnlineStore.Common.util; using OnlineStore.Common.util;
using SmartScan.Form;
using SmartScan.SetControl.WPF; using SmartScan.SetControl.WPF;
using SmartScan.SetControl.WPF.Model; using SmartScan.SetControl.WPF.Model;
using System; using System;
...@@ -15,14 +12,11 @@ using System.Data; ...@@ -15,14 +12,11 @@ using System.Data;
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Security.RightsManagement;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Web.Script.Serialization; using System.Web.Script.Serialization;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
using System.Windows.Forms; using System.Windows.Forms;
using System.Windows.Forms.Integration; using System.Windows.Forms.Integration;
using System.Windows.Input;
using static BLL.BLLCommon; using static BLL.BLLCommon;
using static SmartScan.SetControl.WPF.Model.NeoAlertBox; using static SmartScan.SetControl.WPF.Model.NeoAlertBox;
...@@ -258,7 +252,8 @@ namespace SmartScan ...@@ -258,7 +252,8 @@ namespace SmartScan
// 默认不显示WPF控件 // 默认不显示WPF控件
wpfImagePanel.Visible = true; wpfImagePanel.Visible = true;
// 注册SizeChanged事件 // 注册SizeChanged事件
wpfImagePanel.SizeChanged += (sender, args) => { wpfImagePanel.SizeChanged += (sender, args) =>
{
// 当Panel大小改变时,通知WPF控件重新适应图片 // 当Panel大小改变时,通知WPF控件重新适应图片
if (Imagetest != null) if (Imagetest != null)
{ {
...@@ -298,7 +293,7 @@ namespace SmartScan ...@@ -298,7 +293,7 @@ namespace SmartScan
ElementHost host = new ElementHost(); ElementHost host = new ElementHost();
host.Dock = DockStyle.Left; host.Dock = DockStyle.Left;
host.Width = 205; host.Width = 205;
host.Height = this.ClientSize.Height - 55-10; // 减去标题区域的高度(假设为40像素) host.Height = this.ClientSize.Height - 55 - 10; // 减去标题区域的高度(假设为40像素)
// wpfMenu.Button1Text = "设置"; // wpfMenu.Button1Text = "设置";
host.Location = new Point(10, 55); // 将控件放在标题区域下方 host.Location = new Point(10, 55); // 将控件放在标题区域下方
host.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom; // 确保在窗体大小调整时保持相对位置 host.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom; // 确保在窗体大小调整时保持相对位置
...@@ -322,13 +317,14 @@ namespace SmartScan ...@@ -322,13 +317,14 @@ namespace SmartScan
//scanWork.TouchOff(); //scanWork.TouchOff();
}); });
} }
else{ else
{
string YU = BLLCommon.config.Language; string YU = BLLCommon.config.Language;
if (YU=="English") if (YU == "English")
{ {
bool result = NeoAlertBox.Show("Camera Not Connected", "Unable to detect the camera device or the camera device is offline.\nPlease check the camera connection status.", AlertType.Warning, "NEO SCAN", true); bool result = NeoAlertBox.Show("Camera Not Connected", "Unable to detect the camera device or the camera device is offline.\nPlease check the camera connection status.", AlertType.Warning, "NEO SCAN", true);
} }
else if (YU=="日语") else if (YU == "日语")
{ {
bool result = NeoAlertBox.Show("カメラが接続されていません", "カメラデバイスが検出できませんでした/カメラデバイスがオフライン状態です。\nカメラの接続状態をご確認ください。", AlertType.Warning, "NEO SCAN", true); bool result = NeoAlertBox.Show("カメラが接続されていません", "カメラデバイスが検出できませんでした/カメラデバイスがオフライン状態です。\nカメラの接続状態をご確認ください。", AlertType.Warning, "NEO SCAN", true);
} }
...@@ -347,7 +343,8 @@ namespace SmartScan ...@@ -347,7 +343,8 @@ namespace SmartScan
monitor.Pause = false; monitor.Pause = false;
}; };
wpfMenu.BtnSetClicked += (s, e) => { wpfMenu.BtnSetClicked += (s, e) =>
{
monitor.Pause = true; monitor.Pause = true;
FrmSet set = new FrmSet(); FrmSet set = new FrmSet();
set.Width = PicShow.Width; set.Width = PicShow.Width;
...@@ -374,7 +371,8 @@ namespace SmartScan ...@@ -374,7 +371,8 @@ namespace SmartScan
if (YU == "English") if (YU == "English")
{ {
bool result = NeoAlertBox.Show("", $"Application not found: {appPath}", AlertType.Warning, "NEO SCAN", true); bool result = NeoAlertBox.Show("", $"Application not found: {appPath}", AlertType.Warning, "NEO SCAN", true);
}else if (YU == "日语") }
else if (YU == "日语")
{ {
bool result = NeoAlertBox.Show("", $"アプリケーションが見つかりません: {appPath}", AlertType.Warning, "NEO SCAN", true); bool result = NeoAlertBox.Show("", $"アプリケーションが見つかりません: {appPath}", AlertType.Warning, "NEO SCAN", true);
} }
...@@ -443,7 +441,7 @@ namespace SmartScan ...@@ -443,7 +441,7 @@ namespace SmartScan
YU = "en-US"; YU = "en-US";
} }
else if(YU=="日语") else if (YU == "日语")
{ {
YU = "ja-JP"; YU = "ja-JP";
} }
...@@ -510,7 +508,7 @@ namespace SmartScan ...@@ -510,7 +508,7 @@ namespace SmartScan
if (result) if (result)
{ {
wpfControl.ClearFieldContents(); // 这会将文本设置为空,颜色设置为白色 wpfControl.ClearFieldContents(); // 这会将文本设置为空,颜色设置为白色
scanWork.needPrint = false; scanWork.WaitLabelRecheck = false;
//lastKeys = null; //lastKeys = null;
string text = ""; string text = "";
if (BLLCommon.config.Language.Equals("English")) if (BLLCommon.config.Language.Equals("English"))
...@@ -544,7 +542,7 @@ namespace SmartScan ...@@ -544,7 +542,7 @@ namespace SmartScan
{ {
wpfControl.ClearFieldContents(); // 这会将文本设置为空,颜色设置为白色 wpfControl.ClearFieldContents(); // 这会将文本设置为空,颜色设置为白色
scanWork.needPrint = false; scanWork.WaitLabelRecheck = false;
//lastKeys = null; //lastKeys = null;
string text = ""; string text = "";
if (BLLCommon.config.Language.Equals("English")) if (BLLCommon.config.Language.Equals("English"))
...@@ -573,7 +571,7 @@ namespace SmartScan ...@@ -573,7 +571,7 @@ namespace SmartScan
if (result) if (result)
{ {
wpfControl.ClearFieldContents(); // 这会将文本设置为空,颜色设置为白色 wpfControl.ClearFieldContents(); // 这会将文本设置为空,颜色设置为白色
scanWork.needPrint = false; scanWork.WaitLabelRecheck = false;
//lastKeys = null; //lastKeys = null;
string text = ""; string text = "";
if (BLLCommon.config.Language.Equals("English")) if (BLLCommon.config.Language.Equals("English"))
...@@ -641,7 +639,7 @@ namespace SmartScan ...@@ -641,7 +639,7 @@ namespace SmartScan
{ {
bool result = NeoAlertBox.Show("Print Error", "Unable to print label, no valid identification data", AlertType.Warning, "NEO SCAN", true); bool result = NeoAlertBox.Show("Print Error", "Unable to print label, no valid identification data", AlertType.Warning, "NEO SCAN", true);
} }
else if (YU =="日语") else if (YU == "日语")
{ {
bool result = NeoAlertBox.Show("印刷に异常が発生しました", "ラベルを印刷できません。有効な認識データがありません", AlertType.Warning, "NEO SCAN", true); bool result = NeoAlertBox.Show("印刷に异常が発生しました", "ラベルを印刷できません。有効な認識データがありません", AlertType.Warning, "NEO SCAN", true);
} }
...@@ -690,7 +688,7 @@ namespace SmartScan ...@@ -690,7 +688,7 @@ namespace SmartScan
else else
{ {
LblCameraExist.ForeColor = Color.Lime; LblCameraExist.ForeColor = Color.Lime;
wpfMenu.LblCameraExist.Foreground= System.Windows.Media.Brushes.Lime; wpfMenu.LblCameraExist.Foreground = System.Windows.Media.Brushes.Lime;
// 更新状态卡片 - 相机已启用且已连接 // 更新状态卡片 - 相机已启用且已连接
wpfMenu.UpdateCameraStatus(true, true); wpfMenu.UpdateCameraStatus(true, true);
return true; return true;
...@@ -718,7 +716,7 @@ namespace SmartScan ...@@ -718,7 +716,7 @@ namespace SmartScan
{ {
LogNet.log.Info($"IO模块 {BLLCommon.ioModule.IP} 连接成功"); LogNet.log.Info($"IO模块 {BLLCommon.ioModule.IP} 连接成功");
wpfMenu.LblIOExist.Background = System.Windows.Media.Brushes.Lime; wpfMenu.LblIOExist.Background = System.Windows.Media.Brushes.Lime;
wpfMenu.LblIOExist.Content =$"IO模块 {BLLCommon.ioModule.IP} 连接成功"; wpfMenu.LblIOExist.Content = $"IO模块 {BLLCommon.ioModule.IP} 连接成功";
wpfMenu.UpdateIOStatus(true); wpfMenu.UpdateIOStatus(true);
LblIOExist.ForeColor = Color.Lime; LblIOExist.ForeColor = Color.Lime;
...@@ -885,7 +883,7 @@ namespace SmartScan ...@@ -885,7 +883,7 @@ namespace SmartScan
{ {
try try
{ {
LogNet.log.Info("打印内容:"+JsonConvert.SerializeObject(content)); LogNet.log.Info("打印内容:" + JsonConvert.SerializeObject(content));
SaveResult(content); SaveResult(content);
//Bitmap labelBmp = Common.labelEdit.PrintImage(Common.config.DefaultPrintLabel, content, out _); //Bitmap labelBmp = Common.labelEdit.PrintImage(Common.config.DefaultPrintLabel, content, out _);
BLLCommon.labelEdit.PrintLast(BLLCommon.config.DefaultPrintLabel, BLLCommon.config.PrinterName, BLLCommon.config.PrintLandscape, content, out List<string> barcode); BLLCommon.labelEdit.PrintLast(BLLCommon.config.DefaultPrintLabel, BLLCommon.config.PrinterName, BLLCommon.config.PrintLandscape, content, out List<string> barcode);
...@@ -1044,7 +1042,6 @@ namespace SmartScan ...@@ -1044,7 +1042,6 @@ namespace SmartScan
{ {
wpfControl.SetResultNG(); // 显示NG wpfControl.SetResultNG(); // 显示NG
} }
} }
private void OnBllKeySet(string templateName, string[] originalCode, Dictionary<string, string> key, bool hasMatch) private void OnBllKeySet(string templateName, string[] originalCode, Dictionary<string, string> key, bool hasMatch)
...@@ -1112,7 +1109,7 @@ namespace SmartScan ...@@ -1112,7 +1109,7 @@ namespace SmartScan
changeBtnStartText(); changeBtnStartText();
Language.SetLanguage(this); Language.SetLanguage(this);
LanguageWwitchover.LoadLanguage(CboLanguage.Text); LanguageWwitchover.LoadLanguage(CboLanguage.Text);
if (wpfMenu!=null&& wpfControl!=null) if (wpfMenu != null && wpfControl != null)
{ {
wpfMenu.ApplyLanguage(); wpfMenu.ApplyLanguage();
wpfControl.UpdateRight(); wpfControl.UpdateRight();
...@@ -1124,16 +1121,16 @@ namespace SmartScan ...@@ -1124,16 +1121,16 @@ namespace SmartScan
} }
void changeBtnStartText() void changeBtnStartText()
{ {
if(BLLCommon.config.Language.Equals("English")) if (BLLCommon.config.Language.Equals("English"))
{ {
BtnStart.Font = new Font("Arial",14,FontStyle.Bold); BtnStart.Font = new Font("Arial", 14, FontStyle.Bold);
} }
else else
{ {
BtnStart.Font = new Font("微软雅黑", 14, FontStyle.Bold); BtnStart.Font = new Font("微软雅黑", 14, FontStyle.Bold);
} }
if(scanWork?.isRun??false) if (scanWork?.isRun ?? false)
{ {
BtnStart.Text = Language.Dialog("Exit", "退出"); BtnStart.Text = Language.Dialog("Exit", "退出");
} }
...@@ -1177,7 +1174,7 @@ namespace SmartScan ...@@ -1177,7 +1174,7 @@ namespace SmartScan
monitor.Pause = true; monitor.Pause = true;
new FrmRetrospect().ShowDialog(); new FrmRetrospect().ShowDialog();
monitor.Pause = false; monitor.Pause = false;
WPF_Date_From wPF_Date_From=new WPF_Date_From(); WPF_Date_From wPF_Date_From = new WPF_Date_From();
wPF_Date_From.Show(); wPF_Date_From.Show();
} }
...@@ -1234,12 +1231,13 @@ namespace SmartScan ...@@ -1234,12 +1231,13 @@ namespace SmartScan
}); });
} }
catch { } catch { }
}; }
;
return; return;
} }
Common.frmWaitting.Close(); Common.frmWaitting.Close();
} }
public void SetWaittingMsg (string msg,int keepsec=3) public void SetWaittingMsg(string msg, int keepsec = 3)
{ {
if (Common.frmMain.InvokeRequired) if (Common.frmMain.InvokeRequired)
{ {
...@@ -1254,7 +1252,7 @@ namespace SmartScan ...@@ -1254,7 +1252,7 @@ namespace SmartScan
Application.DoEvents(); Application.DoEvents();
} }
public void DrawTextForm(Dictionary<string,string> valuePairs) public void DrawTextForm(Dictionary<string, string> valuePairs)
{ {
// //
if (Common.frmMain.InvokeRequired) if (Common.frmMain.InvokeRequired)
......
using Asa.FaceControl; using Asa.FaceControl;
using BLL; using BLL;
using DocumentFormat.OpenXml.Wordprocessing;
using HandyControl.Controls;
using MemoryRead; using MemoryRead;
using Model; using Model;
using OnlineStore.Common.util; using OnlineStore.Common.util;
using SmartScan.Form;
using SmartScan.SetControl.WPF;
using SmartScan.SetControl.WPF.Model; using SmartScan.SetControl.WPF.Model;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -17,7 +13,6 @@ using System.Linq; ...@@ -17,7 +13,6 @@ using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Web.Script.Serialization; using System.Web.Script.Serialization;
using System.Web.UI.WebControls; using System.Web.UI.WebControls;
using System.Windows;
using System.Windows.Forms; using System.Windows.Forms;
using static BLL.BLLCommon; using static BLL.BLLCommon;
using static SmartScan.SetControl.WPF.Model.NeoAlertBox; using static SmartScan.SetControl.WPF.Model.NeoAlertBox;
...@@ -101,7 +96,7 @@ namespace SmartScan ...@@ -101,7 +96,7 @@ namespace SmartScan
} }
public delegate void Check2(string text); public delegate void Check2(string text);
public event Check2 Check2s; public event Check2 Check2s;
public void Scan(bool fromlocalfile=false) public void Scan(bool fromlocalfile = false)
{ {
//此段代码加锁是因为,客户在连续点击识别设备按钮时,线程会同时生成rid=123并且rid赋值是重复的123123 //此段代码加锁是因为,客户在连续点击识别设备按钮时,线程会同时生成rid=123并且rid赋值是重复的123123
//在测试时也遇到这个情况,但只成功复现了一次;故加锁。 //在测试时也遇到这个情况,但只成功复现了一次;故加锁。
...@@ -147,8 +142,8 @@ namespace SmartScan ...@@ -147,8 +142,8 @@ namespace SmartScan
return; return;
} }
string YU= BLLCommon.config.Language; string YU = BLLCommon.config.Language;
if (YU=="English") if (YU == "English")
{ {
LoadingScreen.Instance.Show("Matching", "Please wait..."); LoadingScreen.Instance.Show("Matching", "Please wait...");
} }
...@@ -170,7 +165,8 @@ namespace SmartScan ...@@ -170,7 +165,8 @@ namespace SmartScan
reckontime.Restart(); reckontime.Restart();
//Common.frmMain.Showlogs("OCR识别中请稍后"); //Common.frmMain.Showlogs("OCR识别中请稍后");
Common.frmMain.Showlogs(""); Common.frmMain.Showlogs("");
if (needPrint&&BLLCommon.config.CheckFunction) LogNet.log.Info($"WaitLabelRecheck:{WaitLabelRecheck},CheckFunction:{BLLCommon.config.CheckFunction}");
if (WaitLabelRecheck && BLLCommon.config.CheckFunction)
{ {
LoadingScreen.Instance.Hide(); LoadingScreen.Instance.Hide();
originalCodeText = Camera.GetBarCodeText(workCodeInfo); originalCodeText = Camera.GetBarCodeText(workCodeInfo);
...@@ -186,7 +182,7 @@ namespace SmartScan ...@@ -186,7 +182,7 @@ namespace SmartScan
Check2s?.Invoke("2"); Check2s?.Invoke("2");
// Common.frmMain.wpfControl.SetResultOK(); // Common.frmMain.wpfControl.SetResultOK();
Check2s?.Invoke("OK"); Check2s?.Invoke("OK");
needPrint =false; WaitLabelRecheck = false;
} }
else else
{ {
...@@ -239,7 +235,7 @@ namespace SmartScan ...@@ -239,7 +235,7 @@ namespace SmartScan
} }
finally finally
{ {
bendi=false; bendi = false;
isTouch = false; isTouch = false;
Common.frmMain.CloseWaittingDialog(); Common.frmMain.CloseWaittingDialog();
} }
...@@ -318,9 +314,9 @@ namespace SmartScan ...@@ -318,9 +314,9 @@ namespace SmartScan
// 读取文件内容 // 读取文件内容
string fileContent = File.ReadAllText(FilePath.CONFIG_Code_Value); string fileContent = File.ReadAllText(FilePath.CONFIG_Code_Value);
List<string> lines = fileContent.Split(new[] { '\n' }, StringSplitOptions.RemoveEmptyEntries).Select(s=>s.Trim()).ToList(); List<string> lines = fileContent.Split(new[] { '\n' }, StringSplitOptions.RemoveEmptyEntries).Select(s => s.Trim()).ToList();
LogNet.log.Info("扫描到条码:"+string.Join(",", codeTexts)); LogNet.log.Info("扫描到条码:" + string.Join(",", codeTexts));
LogNet.log.Info("在以下条码中匹配:"+fileContent); LogNet.log.Info("在以下条码中匹配:" + fileContent);
// 检查文件内容是否包含任一条码文本 // 检查文件内容是否包含任一条码文本
foreach (string ln in lines.ToArray()) foreach (string ln in lines.ToArray())
{ {
...@@ -492,7 +488,7 @@ namespace SmartScan ...@@ -492,7 +488,7 @@ namespace SmartScan
} }
LogNet.log.Info("2"); LogNet.log.Info("2");
List<Bitmap> image = new List<Bitmap>(Camera.CaptureAndGetCode(out workCodeInfo)); List<Bitmap> image = new List<Bitmap>(Camera.CaptureAndGetCode(out workCodeInfo));
LogNet.log.Info("image"+image.Count); LogNet.log.Info("image" + image.Count);
LogNet.log.Info("image[0]" + image[0]); LogNet.log.Info("image[0]" + image[0]);
if (image.Count > 0 && image[0] != null) if (image.Count > 0 && image[0] != null)
{ {
...@@ -830,7 +826,7 @@ namespace SmartScan ...@@ -830,7 +826,7 @@ namespace SmartScan
if (!BLL.Config.Backgrounder) if (!BLL.Config.Backgrounder)
{ {
string text = Language.Dialog("MaterialTemplateNoMatch"); string text = Language.Dialog("MaterialTemplateNoMatch");
NeoAlertBox.Show("", text,AlertType.Warning,"NEO SCAN",true); NeoAlertBox.Show("", text, AlertType.Warning, "NEO SCAN", true);
//var fm = new FaceMessageBox("", text, MessageBoxButtons.OK); //var fm = new FaceMessageBox("", text, MessageBoxButtons.OK);
//fm.TopMost = true; //fm.TopMost = true;
...@@ -840,15 +836,15 @@ namespace SmartScan ...@@ -840,15 +836,15 @@ namespace SmartScan
}); });
return rtn; return rtn;
} }
public bool Ispring=true; public bool Ispring = true;
public bool needPrint = false; public bool WaitLabelRecheck = false;
public void SetKey(bool hasMatch,string templateName) public void SetKey(bool hasMatch, string templateName)
{ {
LogNet.log.Info("Work SetKey hasMatch:" + hasMatch); LogNet.log.Info("Work SetKey hasMatch:" + hasMatch);
//if (workCodeKeyword.Count == 0){ return;} //if (workCodeKeyword.Count == 0){ return;}
//if(hasMatch) //if(hasMatch)
Ispring = true; Ispring = true;
bool a= BLLCommon.extension.SetKey(templateName,originalCodeText, workCodeKeyword, hasMatch, out _); bool a = BLLCommon.extension.SetKey(templateName, originalCodeText, workCodeKeyword, hasMatch, out _);
LoadingScreen.Instance.Hide(); LoadingScreen.Instance.Hide();
Common.frmMain.Showlogs(""); Common.frmMain.Showlogs("");
// 通过检查结果状态来判断是否需要打印 // 通过检查结果状态来判断是否需要打印
...@@ -857,15 +853,15 @@ namespace SmartScan ...@@ -857,15 +853,15 @@ namespace SmartScan
// 检查结果是否为"等待中"/"Waiting"/"待機中",以判断是否是第一次拍照 // 检查结果是否为"等待中"/"Waiting"/"待機中",以判断是否是第一次拍照
if (BLLCommon.extension.labelText != null) if (BLLCommon.extension.labelText != null)
{ {
string status = BLLCommon.extension.labelText.ToLower(); string status = BLLCommon.extension.labelText;
needPrint = (status == "等待中" || status == "Waiting" || status == "待機中"); WaitLabelRecheck = (status == "等待中" || status == "Waiting" || status == "待機中");
} }
if (needPrint && BLLCommon.config.AutoPrint) if (WaitLabelRecheck && BLLCommon.config.AutoPrint)
{ {
if (workCodeKeyword.Any(a => a.Value.StartsWith("<OCR>"))) if (workCodeKeyword.Any(a => a.Value.StartsWith("<OCR>")))
{ {
BLLCommon.extension.DrawTextBackground(workCodeKeyword); BLLCommon.extension.DrawTextBackground(workCodeKeyword);
bool results = NeoAlertBox.Show("", Language.Dialog("Using_OCR_Result", "是否使用OCR识别结果?"),AlertType.Warning,"NEO SCAN",true); bool results = NeoAlertBox.Show("", Language.Dialog("Using_OCR_Result", "是否使用OCR识别结果?"), AlertType.Warning, "NEO SCAN", true);
//FrmDrawText frmDraw = new FrmDrawText(); //FrmDrawText frmDraw = new FrmDrawText();
if (results == true) if (results == true)
{ {
......
...@@ -323,7 +323,7 @@ namespace SmartScan.SetControl.WPF ...@@ -323,7 +323,7 @@ namespace SmartScan.SetControl.WPF
if (target != null) if (target != null)
{ {
int value; int value;
if (int.TryParse(target.Text, out value) && value > 1) if (int.TryParse(target.Text, out value) && value > 0)
{ {
target.Text = (value - 1).ToString(); target.Text = (value - 1).ToString();
CheckMatchForUserControl(match, userControl); CheckMatchForUserControl(match, userControl);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!