| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 点击按钮【启动模拟】 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void button8_Click(object sender, EventArgs e) |
| | | { |
| | | try |
| | |
| | | DataCaptureHandler.RefreshDataCommonStatic(); |
| | | button8.Text = "模拟已启动"; |
| | | button8.BackColor = Color.Green; |
| | | SystemValue.isStartedModel = true; |
| | | SystemValue.isStartedImitateModel = true; |
| | | #region 数据采集项确定 |
| | | var dataCaptureConfigslist = DataCaptureConfigManager.GetDataCaptureConfigs(); |
| | | var columnList = DataCaptureConfigManager.GetDataCaptureColumnConfig(); |
| | |
| | | { |
| | | try |
| | | { |
| | | if (!SystemValue.isStartedModel) |
| | | if (!SystemValue.isStartedImitateModel) |
| | | { |
| | | MessageBox.Show("请点击调试模式按钮"); |
| | | return; |
| | |
| | | |
| | | try |
| | | { |
| | | if (!SystemValue.isStartedModel) |
| | | if (!SystemValue.isStartedImitateModel) |
| | | { |
| | | MessageBox.Show("请点击调试模式按钮"); |
| | | return; |
| | |
| | | |
| | | try |
| | | { |
| | | if (!SystemValue.isStartedModel) |
| | | if (!SystemValue.isStartedImitateModel) |
| | | { |
| | | MessageBox.Show("请点击调试模式按钮"); |
| | | return; |
| | |
| | | |
| | | try |
| | | { |
| | | if (!SystemValue.isStartedModel) |
| | | if (!SystemValue.isStartedImitateModel) |
| | | { |
| | | MessageBox.Show("请点击调试模式按钮"); |
| | | return; |
| | |
| | | |
| | | try |
| | | { |
| | | if (!SystemValue.isStartedModel) |
| | | if (!SystemValue.isStartedImitateModel) |
| | | { |
| | | MessageBox.Show("请点击调试模式按钮"); |
| | | return; |
| | |
| | | |
| | | try |
| | | { |
| | | if (!SystemValue.isStartedModel) |
| | | if (!SystemValue.isStartedImitateModel) |
| | | { |
| | | MessageBox.Show("请点击调试模式按钮"); |
| | | return; |
| | |
| | | |
| | | try |
| | | { |
| | | if (!SystemValue.isStartedModel) |
| | | if (!SystemValue.isStartedImitateModel) |
| | | { |
| | | MessageBox.Show("请点击调试模式按钮"); |
| | | return; |
| | |
| | | |
| | | try |
| | | { |
| | | if (!SystemValue.isStartedModel) |
| | | if (!SystemValue.isStartedImitateModel) |
| | | { |
| | | MessageBox.Show("请点击调试模式按钮"); |
| | | return; |
| | |
| | | |
| | | try |
| | | { |
| | | if (!SystemValue.isStartedModel) |
| | | if (!SystemValue.isStartedImitateModel) |
| | | { |
| | | MessageBox.Show("请点击调试模式按钮"); |
| | | return; |
| | |
| | | |
| | | try |
| | | { |
| | | if (!SystemValue.isStartedModel) |
| | | if (!SystemValue.isStartedImitateModel) |
| | | { |
| | | MessageBox.Show("请点击调试模式按钮"); |
| | | return; |
| | |
| | | |
| | | try |
| | | { |
| | | if (!SystemValue.isStartedModel) |
| | | if (!SystemValue.isStartedImitateModel) |
| | | { |
| | | MessageBox.Show("请点击调试模式按钮"); |
| | | return; |
| | |
| | | |
| | | try |
| | | { |
| | | if (!SystemValue.isStartedModel) |
| | | if (!SystemValue.isStartedImitateModel) |
| | | { |
| | | MessageBox.Show("请点击调试模式按钮"); |
| | | return; |
| | |
| | | |
| | | try |
| | | { |
| | | if (!SystemValue.isStartedModel) |
| | | if (!SystemValue.isStartedImitateModel) |
| | | { |
| | | MessageBox.Show("请点击调试模式按钮"); |
| | | return; |
| | |
| | | { |
| | | try |
| | | { |
| | | if (!SystemValue.isStartedModel) |
| | | if (!SystemValue.isStartedImitateModel) |
| | | { |
| | | MessageBox.Show("请点击调试模式按钮"); |
| | | return; |
| | |
| | | { |
| | | try |
| | | { |
| | | if (!SystemValue.isStartedModel) |
| | | if (!SystemValue.isStartedImitateModel) |
| | | { |
| | | MessageBox.Show("请点击调试模式按钮"); |
| | | return; |
| | |
| | | //告警监控 |
| | | AlertMonitor alert = new AlertMonitor(); |
| | | _dataCaptureHandler.Add(alert); |
| | | |
| | | //OP80的获取质量数据 【Editby shaocx,2024-06-15】 |
| | | OP80QualityDataHandler op80QualityDataHandler = new OP80QualityDataHandler(); |
| | | _dataCaptureHandler.Add(op80QualityDataHandler); |
| | | |
| | | //定期删除数据 【Editby shaocx,2024-06-15】 |
| | | DeleteDataHandler _deleteDataHandler = new DeleteDataHandler(); |
| | | _dataCaptureHandler.Add(_deleteDataHandler); |
| | | |
| | | #endregion |
| | | |
| | | try |
| | |
| | | { |
| | | switch (config.DataCapturePointCode) |
| | | { |
| | | case "OP2002A": |
| | | //case "OP2002B": |
| | | //case "OP2002C": |
| | | case "OP3002CH3": |
| | | //case "OP3002CH4": |
| | | //case "OP3002CH5": |
| | | //case "OP3002CH6": |
| | | DataCaptureHandler_02 dc02 = new DataCaptureHandler_02(); |
| | | dc02._dataCaptureConfig = config; |
| | | _dataCaptureHandler.Add(dc02); |
| | | break; |
| | | //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); |