schangxiang@126.com
2024-06-09 d5f80f2bae790fd13c159ff59568766b22495e30
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"))//两个拧紧,每个前面都有ID-Code
            //        {
            //            IDCodeIndex = true;
            //            Mcount = 0;
            //        }
            //        if(IDCodeIndex)
            //        {
            //            if (line.Contains(" M "))//第三个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"))//两个拧紧,每个前面都有ID-Code
                //        {
                //            IDCodeIndex = true;
                //            Mcount = 0;
                //        }
                //        if(IDCodeIndex)
                //        {
                //            if (line.Contains(" M "))//第三个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
    }
}