Exemple #1
0
        public void Init()
        {
            //heightDefBll = new ProductHeightDefBll();
            //packsizeDefBll = new ProductPacsizeDefBll();
            //productCfgBll = new ProductSizeCfgBll();
            try
            {
                lineMonitorPresenter = new LineMonitorPresenter(this);
                lineMonitorPresenter.SetLogRecorder(logRecorder);
                // this.captionText = captionText;
                string reStr = "";
                if (!lineMonitorPresenter.Init(ref reStr))
                {
                    MessageBox.Show(reStr);
                    return;
                }
                this.comboBoxDevList.Items.AddRange(lineMonitorPresenter.GetNodeNames().ToArray());
                this.comboBoxDevList.SelectedIndex = 0;


                //配色
                this.flowLayoutPicSample.BackColor = themColor.picSampleColor;
                this.bt_StartSystem.Enabled        = true;
                this.bt_StopSystem.Enabled         = false;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
Exemple #2
0
        public void Init()
        {
            //heightDefBll = new ProductHeightDefBll();
            //packsizeDefBll = new ProductPacsizeDefBll();
            //productCfgBll = new ProductSizeCfgBll();
            try
            {
                lineMonitorPresenter = new LineMonitorPresenter(this);
                lineMonitorPresenter.SetLogRecorder(logRecorder);
                userCtlNodes   = new Dictionary <string, UserControlCtlNode>();
                nodeStatusList = new List <CtlNodeStatus>();

                // this.captionText = captionText;
                string reStr = "";
                if (!lineMonitorPresenter.ProcessInit(ref reStr))
                {
                    MessageBox.Show(reStr);
                    return;
                }


                this.comboBoxDevList.Items.AddRange(lineMonitorPresenter.GetNodeNames().ToArray());
                this.comboBoxDevList.SelectedIndex = 0;


                nodeColorMap = new Dictionary <EnumNodeStatus, Color>();
                nodeColorMap[EnumNodeStatus.设备故障]  = Color.Red;
                nodeColorMap[EnumNodeStatus.设备空闲]  = Color.FromArgb(34, 177, 76);
                nodeColorMap[EnumNodeStatus.设备使用中] = Color.Yellow;

                nodeColorMap[EnumNodeStatus.无法识别] = Color.PaleVioletRed;
                this.pictureBox1.BackColor        = nodeColorMap[EnumNodeStatus.设备故障];
                this.pictureBox2.BackColor        = nodeColorMap[EnumNodeStatus.设备空闲];
                this.pictureBox3.BackColor        = nodeColorMap[EnumNodeStatus.设备使用中];

                this.pictureBox5.BackColor = nodeColorMap[EnumNodeStatus.无法识别];

                //配色
                this.flowLayoutPicSample.BackColor = themColor.picSampleColor;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }