From d5f80f2bae790fd13c159ff59568766b22495e30 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周日, 09 6月 2024 14:09:10 +0800 Subject: [PATCH] 修复bug --- DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_DataCaptureV3/FormMain.cs | 408 +++++++++++++++++++++++++++++----------------------------- 1 files changed, 204 insertions(+), 204 deletions(-) diff --git a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_DataCaptureV3/FormMain.cs b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_DataCaptureV3/FormMain.cs index 1031a94..cb1da00 100644 --- a/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_DataCaptureV3/FormMain.cs +++ b/DataCapture/iWare_SCADA_DataCapture/iWare_SCADA_DataCaptureV3/FormMain.cs @@ -26,6 +26,7 @@ { public partial class FormMain : Form { + #region 淇℃伅鑾峰彇绾跨▼ Thread tskSetLableText;//鍚勭lable鍔ㄦ�佹樉绀� Thread tskSetGridSource;//鍚勭lable鍔ㄦ�佹樉绀� @@ -172,7 +173,7 @@ DataCaptureHandler.RefreshDataCommonStatic(); foreach (var dataCapturehandler in this._dataCaptureHandler) { - Thread tskdataCapture=new Thread(dataCapturehandler.DataCaptureStart); + Thread tskdataCapture = new Thread(dataCapturehandler.DataCaptureStart); tskdataCapture.Start(); } } @@ -199,7 +200,7 @@ dgv_DataCaptureConfig.AutoGenerateColumns = false; LoadItemType(); var ip = Dns.GetHostAddresses(Dns.GetHostName()); - if(ip.Select(o=>o.ToString()).Contains("192.168.216.203")|| ip.Select(o => o.ToString()).Contains("10.135.75.70")) + if (ip.Select(o => o.ToString()).Contains("192.168.216.203") || ip.Select(o => o.ToString()).Contains("10.135.75.70")) { button24_Click(sender, e); } @@ -261,28 +262,28 @@ { //while (true) //{ - try + try + { + Action action = () => { - Action action = () => + using (DbModel db = new DbModel()) { - using (DbModel db = new DbModel()) - { - sourcelist = db.ThreadStatusMonitor.Where(o => o.IsDeleted == false).ToList(); - dataGridView2.DataSource = sourcelist.OrderBy(o=>o.Threadcode); - dataGridView2.Refresh(); - } - //dataGridView2.DataSource = null; - //dataGridView2.DataSource = SystemValue.MainList; - }; - Invoke(action); + sourcelist = db.ThreadStatusMonitor.Where(o => o.IsDeleted == false).ToList(); + dataGridView2.DataSource = sourcelist.OrderBy(o => o.Threadcode); + dataGridView2.Refresh(); + } + //dataGridView2.DataSource = null; + //dataGridView2.DataSource = SystemValue.MainList; + }; + Invoke(action); - } - catch (Exception ex) - { - Log4NetHelper.WriteErrorLog(LogType.FormMain, "鏂规硶GridRefresh鍑虹幇寮傚父锛�" + ex.Message, ex); - //continue; - } - //Thread.Sleep(10000); + } + catch (Exception ex) + { + Log4NetHelper.WriteErrorLog(LogType.FormMain, "鏂规硶GridRefresh鍑虹幇寮傚父锛�" + ex.Message, ex); + //continue; + } + //Thread.Sleep(10000); //} } /// <summary> @@ -412,7 +413,7 @@ var endTime = DateTimeHelper.GetDateTime(); var newFiles = FileHelper.DetectNewFilesCSV(textBox10.Text, 100000000, Convert.ToDateTime(startTime), endTime); - var list=newFiles.GetEnumerator(); + var list = newFiles.GetEnumerator(); foreach (System.IO.FileInfo file in newFiles) { @@ -457,7 +458,7 @@ private void txt_PLCPort_KeyPress(object sender, KeyPressEventArgs e) { - if(((int)e.KeyChar < 48 || (int)e.KeyChar > 57)&& (int)e.KeyChar !=8) + if (((int)e.KeyChar < 48 || (int)e.KeyChar > 57) && (int)e.KeyChar != 8) { e.Handled = true; } @@ -501,10 +502,10 @@ txt_EquipmentID.Text = ""; txt_EquipmentID.Focus(); - cbox_WorkingProcedure.SelectedIndex = -1 ; + cbox_WorkingProcedure.SelectedIndex = -1; cbox_DataCaptureColumnType.SelectedIndex = -1; cbox_DataCapturePLCType.SelectedIndex = 0; - cbox_DataCaptureType.SelectedIndex = 0; + cbox_DataCaptureType.SelectedIndex = 0; } @@ -522,7 +523,7 @@ try { - if (dgv_DataCaptureConfig.CurrentRow==null||dgv_DataCaptureConfig.CurrentRow.Index < 0) + if (dgv_DataCaptureConfig.CurrentRow == null || dgv_DataCaptureConfig.CurrentRow.Index < 0) { MessageBox.Show("璇烽�夋嫨涓�鏉¢渶淇敼鐨勬暟鎹紒"); return; @@ -549,7 +550,7 @@ cbox_DataCaptureColumnType.Text = model.DataCaptureColumnType; } - catch(Exception ex) + catch (Exception ex) { MessageBox.Show($"淇敼鏀堕泦鐐逛俊鎭け璐ワ紒 {ex.Message}"); btn_Update.Enabled = true; @@ -574,8 +575,8 @@ } var model = dgv_DataCaptureConfig.SelectedRows[0].DataBoundItem as DataCaptureConfig; - var num=DataCaptureConfigManager.DeleteDataCaptureConfig(model); - if(num>0) + var num = DataCaptureConfigManager.DeleteDataCaptureConfig(model); + if (num > 0) { MessageBox.Show($"鍒犻櫎鎴愬姛{num}鏉�"); @@ -601,7 +602,7 @@ //} } - catch(Exception ex) + catch (Exception ex) { MessageBox.Show($"鍒犻櫎鏀堕泦鐐逛俊鎭紓甯革紒{ex.Message}"); } @@ -615,7 +616,7 @@ var itemType2 = ComboBoxHelper.GetComboxSelectValue(cbox_DataCapturePLCType, ref DataCapturePLCTypeFlag); DataCaptureConfig model = new DataCaptureConfig(); - model.Id= string.IsNullOrEmpty(txt_ID.Text.Trim())?0:Convert.ToInt32(txt_ID.Text.Trim()); + model.Id = string.IsNullOrEmpty(txt_ID.Text.Trim()) ? 0 : Convert.ToInt32(txt_ID.Text.Trim()); model.EquipmentID = txt_EquipmentID.Text.Trim(); model.WorkingProcedure = cbox_WorkingProcedure.Text.Trim(); model.DataCapturePointCode = txt_DataCapturePointCode.Text.Trim(); @@ -677,7 +678,7 @@ MessageBox.Show($"璇烽�夋嫨鑺傜偣鏁版嵁绫诲瀷"); return; } - if(cbox_DataCaptureType.SelectedIndex<1) + if (cbox_DataCaptureType.SelectedIndex < 1) { MessageBox.Show($"璇烽�夋嫨鏀堕泦鏂瑰紡"); return; @@ -691,7 +692,7 @@ {//淇敼 string message = ""; DataCaptureConfigManager.UpdateDataCaptureConfig(data, out message); - if(message.Length==0) + if (message.Length == 0) { setControlsVisible(false); btn_Update.Enabled = true; @@ -707,7 +708,7 @@ } } - else if(btn_Save.Tag.Equals("create")) + else if (btn_Save.Tag.Equals("create")) {//鏂板 DataCaptureConfigManager.InsertDataCaptureConfig(data); setControlsVisible(false); @@ -736,7 +737,7 @@ DataCaptureHandler.RefreshDataCommonStatic(); button8.Text = "妯℃嫙宸插惎鍔�"; button8.BackColor = Color.Green; - SystemValue.isStartedModel=true; + SystemValue.isStartedModel = true; #region 鏁版嵁閲囬泦椤圭‘瀹� var dataCaptureConfigslist = DataCaptureConfigManager.GetDataCaptureConfigs(); var columnList = DataCaptureConfigManager.GetDataCaptureColumnConfig(); @@ -881,7 +882,7 @@ { try { - if(!SystemValue.isStartedModel) + if (!SystemValue.isStartedModel) { MessageBox.Show("璇风偣鍑昏皟璇曟ā寮忔寜閽�"); return; @@ -1031,7 +1032,7 @@ textBox10.Text = EnumberHelper.GetEnumName<WorkingProcedureForHMI>(int.Parse(textBox12.Text)).ToString(); var bb = EnumberHelper.GetEnumForString<WorkingProcedureForHMI>(textBox12.Text); - var A =EnumberHelper.GetEnumName<WorkingProcedureForHMI>(1); + var A = EnumberHelper.GetEnumName<WorkingProcedureForHMI>(1); WorkingProcedureForHMI t = default(WorkingProcedureForHMI); bool isRight = EnumberHelper.GetEnumObject<WorkingProcedureForHMI>("OP10", out t); @@ -1057,7 +1058,7 @@ //wplog.GetType().GetProperty("workpieceid").SetValue(wplog, "WorkPieceIDGONGJIANMA");//缁欏姩鎬佸瓧娈佃祴鍊� } - catch(Exception ex) + catch (Exception ex) { } @@ -1270,10 +1271,10 @@ default: break; } - + } - + } catch (Exception ex) @@ -1315,7 +1316,7 @@ } - // DataCaptureHandler.WorkPieceID = textBox10.Text.Trim(); + // DataCaptureHandler.WorkPieceID = textBox10.Text.Trim(); } catch (Exception ex) @@ -1815,7 +1816,7 @@ { MessageBox.Show(ex.Message); } - + } private void button26_Click(object sender, EventArgs e) @@ -1836,18 +1837,17 @@ { switch (config.DataCapturePointCode) { - case "OP3002CH3": - case "OP3002CH4": - case "OP3002CH5": - case "OP3002CH6": + case "OP2002A": + //case "OP2002B": + //case "OP2002C": DataCaptureHandler_02 dc02 = new DataCaptureHandler_02(); dc02._dataCaptureConfig = config; _dataCaptureHandler.Add(dc02); break; - //case "OP6002": - // DataCaptureHandler_OP6002.Instance._dataCaptureConfig = config; - // _dataCaptureHandler.Add(DataCaptureHandler_OP6002.Instance); - // break; + //case "OP6002": + // DataCaptureHandler_OP6002.Instance._dataCaptureConfig = config; + // _dataCaptureHandler.Add(DataCaptureHandler_OP6002.Instance); + // break; } @@ -2174,123 +2174,123 @@ #endregion - #region OP30 + #region OP30 - //////var QualityStateStr = FileHelper.ReadPdfFileForSpire(textBox10.Text, "Result"); - //////var QualityOP30To6 = FileHelper.ReadPdfFileForSpire(textBox10.Text, "Y-Maximum");//琛鍘嬭鍔涚煩 - //////var QualityOP30To7 = FileHelper.ReadPdfFileForSpire(textBox10.Text, "Block X");//琛鍘嬭浣嶇Щ + //////var QualityStateStr = FileHelper.ReadPdfFileForSpire(textBox10.Text, "Result"); + //////var QualityOP30To6 = FileHelper.ReadPdfFileForSpire(textBox10.Text, "Y-Maximum");//琛鍘嬭鍔涚煩 + //////var QualityOP30To7 = FileHelper.ReadPdfFileForSpire(textBox10.Text, "Block X");//琛鍘嬭浣嶇Щ - ////var dt = CSVHelper.ReadCSV(textBox10.Text); - //////var datatable = CSVHelper.ReadCSVList(textBox10.Text); + ////var dt = CSVHelper.ReadCSV(textBox10.Text); + //////var datatable = CSVHelper.ReadCSVList(textBox10.Text); - //////List<string> rowFirst = new List<string>(); - //////List<string> rowSecond = new List<string>(); - //////if(datatable.Count==2) - //////{ - ////// rowFirst = datatable[0].Split(',').ToList(); - ////// rowSecond = datatable[1].Split(',').ToList(); + //////List<string> rowFirst = new List<string>(); + //////List<string> rowSecond = new List<string>(); + //////if(datatable.Count==2) + //////{ + ////// rowFirst = datatable[0].Split(',').ToList(); + ////// rowSecond = datatable[1].Split(',').ToList(); - //////} + //////} - //string d = DateTime.Now.AddHours(-10).ToString("yyyy-MM-dd_HH"); - ////鎵弿鍏变韩鐩綍骞跺皢鏂扮殑鏂囦欢鎵弿杩斿洖 涓�鑸妭鎷嶅湪15绉掑乏鍙筹紙鍙互纭涓�涓嬶級 - ////鎵弿淇敼鏃堕棿鍦ㄤ笂娆℃壂鎻忔椂闂翠箣鍓�10绉掑埌褰撳墠鏃堕棿鐨勪箣闂寸殑鏂囦欢 - //var startTime = DateTimeHelper.GetDateTime().AddYears(-1); - //var endTime = DateTimeHelper.GetDateTime(); - ////var newFiles = FileHelper.DetectNewFilesCSV(textBox10.Text+@"\"+d, 10, Convert.ToDateTime(startTime), endTime); - ////List<FileInfo> files = new List<FileInfo>(); - ////foreach (var file in newFiles) - ////{ - //// files.Add((FileInfo)file); - ////} - ////files = files.OrderByDescending(o => o.LastAccessTime).ToList(); - ////foreach (var file in files) - ////{ - //// //var datatable = CSVHelper.ReadCSV(file.FullName); - ////} - //var newFiles = FileHelper.DetectNewFiles(textBox10.Text, "*.txt", 10, Convert.ToDateTime(startTime), endTime); + //string d = DateTime.Now.AddHours(-10).ToString("yyyy-MM-dd_HH"); + ////鎵弿鍏变韩鐩綍骞跺皢鏂扮殑鏂囦欢鎵弿杩斿洖 涓�鑸妭鎷嶅湪15绉掑乏鍙筹紙鍙互纭涓�涓嬶級 + ////鎵弿淇敼鏃堕棿鍦ㄤ笂娆℃壂鎻忔椂闂翠箣鍓�10绉掑埌褰撳墠鏃堕棿鐨勪箣闂寸殑鏂囦欢 + //var startTime = DateTimeHelper.GetDateTime().AddYears(-1); + //var endTime = DateTimeHelper.GetDateTime(); + ////var newFiles = FileHelper.DetectNewFilesCSV(textBox10.Text+@"\"+d, 10, Convert.ToDateTime(startTime), endTime); + ////List<FileInfo> files = new List<FileInfo>(); + ////foreach (var file in newFiles) + ////{ + //// files.Add((FileInfo)file); + ////} + ////files = files.OrderByDescending(o => o.LastAccessTime).ToList(); + ////foreach (var file in files) + ////{ + //// //var datatable = CSVHelper.ReadCSV(file.FullName); + ////} + //var newFiles = FileHelper.DetectNewFiles(textBox10.Text, "*.txt", 10, Convert.ToDateTime(startTime), endTime); - //List<FileInfo> files = new List<FileInfo>(); - //foreach (var file in newFiles) - //{ - // files.Add((FileInfo)file); - //} - //files = files.OrderByDescending(o => o.LastAccessTime).ToList(); - //foreach (var file in files) - //{ - // //string[] lines = File.ReadAllLines(file.FullName); - // //foreach (string line in lines) - // //{ - // // // 澶勭悊姣忎竴琛岀殑閫昏緫 - // //} - // ////var datatable = CSVHelper.ReadCSV(file.FullName); - // //using (StreamReader reader = new StreamReader(file.FullName)) - // //{ - // // string line; - // // while ((line = reader.ReadLine()) != null) - // // { - // // // 澶勭悊姣忎竴琛岀殑閫昏緫 - // // } - // //} + //List<FileInfo> files = new List<FileInfo>(); + //foreach (var file in newFiles) + //{ + // files.Add((FileInfo)file); + //} + //files = files.OrderByDescending(o => o.LastAccessTime).ToList(); + //foreach (var file in files) + //{ + // //string[] lines = File.ReadAllLines(file.FullName); + // //foreach (string line in lines) + // //{ + // // // 澶勭悊姣忎竴琛岀殑閫昏緫 + // //} + // ////var datatable = CSVHelper.ReadCSV(file.FullName); + // //using (StreamReader reader = new StreamReader(file.FullName)) + // //{ + // // string line; + // // while ((line = reader.ReadLine()) != null) + // // { + // // // 澶勭悊姣忎竴琛岀殑閫昏緫 + // // } + // //} - // string fileContent = File.ReadAllText(file.FullName); - // string[] lines2 = fileContent.Split('\n'); - // bool IDCodeIndex = false; - // int Mcount = 0; - // foreach (string line in lines2) - // { - // // 澶勭悊姣忎竴琛岀殑閫昏緫 - // if (line.Contains("ID-Code"))//涓や釜鎷х揣锛屾瘡涓墠闈㈤兘鏈塈D-Code - // { - // IDCodeIndex = true; - // Mcount = 0; - // } - // if(IDCodeIndex) - // { - // if (line.Contains(" M "))//绗笁涓狹琛屾槸鎷х揣鏁版嵁 - // { - // Mcount++; - // if(Mcount==3) - // { - // var str=line.Replace("+", "").Replace("-", ""); - // var list = str.Split('M'); - // if(list.Count()==4) - // { + // string fileContent = File.ReadAllText(file.FullName); + // string[] lines2 = fileContent.Split('\n'); + // bool IDCodeIndex = false; + // int Mcount = 0; + // foreach (string line in lines2) + // { + // // 澶勭悊姣忎竴琛岀殑閫昏緫 + // if (line.Contains("ID-Code"))//涓や釜鎷х揣锛屾瘡涓墠闈㈤兘鏈塈D-Code + // { + // IDCodeIndex = true; + // Mcount = 0; + // } + // if(IDCodeIndex) + // { + // if (line.Contains(" M "))//绗笁涓狹琛屾槸鎷х揣鏁版嵁 + // { + // Mcount++; + // if(Mcount==3) + // { + // var str=line.Replace("+", "").Replace("-", ""); + // var list = str.Split('M'); + // if(list.Count()==4) + // { - // } - // IDCodeIndex = false; - // } - // } - // } - // } - //} - #endregion + // } + // IDCodeIndex = false; + // } + // } + // } + // } + //} + #endregion - #region OP60 - WorkPieceLogMiddle wplog = new WorkPieceLogMiddle(); - string path = "C:\\Users\\SY-PC\\Desktop\\FO";//OP80鐨勫湴鍧� - var time = DateTimeHelper.GetDateTime(); - DateTime? fileFindTime = null; - if (fileFindTime == null) - { - fileFindTime = time.AddMinutes(-100); - } - //OP60 闇�瑕佹壂鎻忔枃浠惰鍙栬川閲忎俊鎭� - //鎵弿淇敼鏃堕棿鍦ㄤ笂娆℃壂鎻忔椂闂翠箣鍓�30绉掑埌褰撳墠鏃堕棿鐨勪箣闂寸殑鏂囦欢 - List<FileInfo> files = new List<FileInfo>(); - var newFiles = FileHelper.DetectNewFiles(path, "*.dfq", 300000, fileFindTime.Value, time.AddHours(2)); - foreach (var file in newFiles) - { - files.Add((FileInfo)file); - } - files = files.OrderByDescending(o => o.LastWriteTime).ToList(); + #region OP60 + WorkPieceLogMiddle wplog = new WorkPieceLogMiddle(); + string path = "C:\\Users\\SY-PC\\Desktop\\FO";//OP80鐨勫湴鍧� + var time = DateTimeHelper.GetDateTime(); + DateTime? fileFindTime = null; + if (fileFindTime == null) + { + fileFindTime = time.AddMinutes(-100); + } + //OP60 闇�瑕佹壂鎻忔枃浠惰鍙栬川閲忎俊鎭� + //鎵弿淇敼鏃堕棿鍦ㄤ笂娆℃壂鎻忔椂闂翠箣鍓�30绉掑埌褰撳墠鏃堕棿鐨勪箣闂寸殑鏂囦欢 + List<FileInfo> files = new List<FileInfo>(); + var newFiles = FileHelper.DetectNewFiles(path, "*.dfq", 300000, fileFindTime.Value, time.AddHours(2)); + foreach (var file in newFiles) + { + files.Add((FileInfo)file); + } + files = files.OrderByDescending(o => o.LastWriteTime).ToList(); List<OP60Info> op60Infos = new List<OP60Info>(); - foreach (var file in files) - {//鍙栧�掑簭鍖归厤鐨勬枃浠跺悕涓哄伐浠跺彿鐨勬枃浠� + foreach (var file in files) + {//鍙栧�掑簭鍖归厤鐨勬枃浠跺悕涓哄伐浠跺彿鐨勬枃浠� string DataCapturePointCode = "OP6002A"; if (file.Name.Contains("SP-" + DataCapturePointCode.Substring(DataCapturePointCode.Length - 1, 1))) @@ -2298,7 +2298,7 @@ } var datatable = CSVHelper.ReadCSVList(file.FullName); - if(datatable.Count<106) + if (datatable.Count < 106) {//璐ㄩ噺鏁版嵁浠�106琛屽紑濮� } @@ -2312,7 +2312,7 @@ foreach (var item in list) { var listitem = item.Split(new String[] { strCharacter2 }, StringSplitOptions.None); - if(listitem.Count()==3) + if (listitem.Count() == 3) { OP60Info info = new OP60Info(); info.datetime = listitem[2]; @@ -2336,62 +2336,62 @@ break; } } - #endregion + #endregion - #region QITA + #region QITA - //var WorkingProcedure = "OP20"; - //var EquipmentID = "EOP20"; - //var DataCapturePointCode = "OP2002A"; - ////var DataCapturePointCode = "OP3002CH3"; - //WorkPieceLogMiddle wplog = new WorkPieceLogMiddle(); - //wplog.Id = Yitter.IdGenerator.YitIdHelper.NextId(); - //wplog.WorkingProcedure = WorkingProcedure; - //wplog.EquipmentID = EquipmentID; - //wplog.Remarks = WorkingProcedure; - //wplog.MonitoringPoint = DataCapturePointCode; - //wplog.WorkPieceID = "DZ045L2312150101041CAO"; - //wplog.CreatedTime = DateTimeHelper.GetDateTime(); - //wplog.CreatedUserName = DataCapturePointCode; - //wplog.UpdatedUserName = Environment.MachineName + "鑷姩" + Thread.CurrentThread.ManagedThreadId.ToString(); - //wplog.UpdatedTime = DateTimeHelper.GetDateTime(); - //wplog.IsDeleted = false; - //wplog.QualityStateStr = "OK"; - ////try - ////{ - //// using (DbModel db = new DbModel()) - //// { - //// var info = db.KnifeToolEquipmentInfo.Where(o => o.EquipmentID.Equals(wplog.EquipmentID)).ToList(); - //// foreach (var item in info) - //// { - //// item.CurrentLife++; - //// item.UpdatedTime = DateTime.Now; - //// } - //// //db.SaveChanges(); - //// } + //var WorkingProcedure = "OP20"; + //var EquipmentID = "EOP20"; + //var DataCapturePointCode = "OP2002A"; + ////var DataCapturePointCode = "OP3002CH3"; + //WorkPieceLogMiddle wplog = new WorkPieceLogMiddle(); + //wplog.Id = Yitter.IdGenerator.YitIdHelper.NextId(); + //wplog.WorkingProcedure = WorkingProcedure; + //wplog.EquipmentID = EquipmentID; + //wplog.Remarks = WorkingProcedure; + //wplog.MonitoringPoint = DataCapturePointCode; + //wplog.WorkPieceID = "DZ045L2312150101041CAO"; + //wplog.CreatedTime = DateTimeHelper.GetDateTime(); + //wplog.CreatedUserName = DataCapturePointCode; + //wplog.UpdatedUserName = Environment.MachineName + "鑷姩" + Thread.CurrentThread.ManagedThreadId.ToString(); + //wplog.UpdatedTime = DateTimeHelper.GetDateTime(); + //wplog.IsDeleted = false; + //wplog.QualityStateStr = "OK"; + ////try + ////{ + //// using (DbModel db = new DbModel()) + //// { + //// var info = db.KnifeToolEquipmentInfo.Where(o => o.EquipmentID.Equals(wplog.EquipmentID)).ToList(); + //// foreach (var item in info) + //// { + //// item.CurrentLife++; + //// item.UpdatedTime = DateTime.Now; + //// } + //// //db.SaveChanges(); + //// } - ////} - ////catch (Exception ex) - ////{ + ////} + ////catch (Exception ex) + ////{ - ////} - ////wplog.Remarks = ""; - ////wplog.Remarks = (wplog.Remarks ?? "") + $"璐ㄩ噺锛歿wplog.Remarks ?? "绌�"}"; - ////wplog.Remarks = null; - ////wplog.Remarks = (wplog.Remarks ?? "") + $"璐ㄩ噺锛歿wplog.Remarks ?? "绌�"}"; - ////wplog.Remarks = "111"; - ////wplog.Remarks = (wplog.Remarks ?? "") + $"璐ㄩ噺锛歿wplog.Remarks ?? "绌�"}"; - ////wplog = GetCH4Info(textBox10.Text, wplog); - //WorkPieceInfoManager.QualityInfoComplete(wplog, PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure)); + ////} + ////wplog.Remarks = ""; + ////wplog.Remarks = (wplog.Remarks ?? "") + $"璐ㄩ噺锛歿wplog.Remarks ?? "绌�"}"; + ////wplog.Remarks = null; + ////wplog.Remarks = (wplog.Remarks ?? "") + $"璐ㄩ噺锛歿wplog.Remarks ?? "绌�"}"; + ////wplog.Remarks = "111"; + ////wplog.Remarks = (wplog.Remarks ?? "") + $"璐ㄩ噺锛歿wplog.Remarks ?? "绌�"}"; + ////wplog = GetCH4Info(textBox10.Text, wplog); + //WorkPieceInfoManager.QualityInfoComplete(wplog, PLCManger.GetLogTypeForWorkingProcedure(WorkingProcedure)); - ////WorkPieceLogMiddle log = new WorkPieceLogMiddle(); - ////log = GetCH5Info(textBox10.Text, log); - #endregion + ////WorkPieceLogMiddle log = new WorkPieceLogMiddle(); + ////log = GetCH5Info(textBox10.Text, log); + #endregion - } + } catch (Exception ex) { MessageBox.Show(ex.Message); @@ -2402,7 +2402,7 @@ public enum test { test1, - test2=3, - test3=4 + test2 = 3, + test3 = 4 } } -- Gitblit v1.9.3