Beispiel #1
0
        public void RefreshNodeStatus()
        {
            List <CtlNodeStatus> ns = this.lineMonitorPresenter.GetNodeStatus();

            for (int i = 0; i < Math.Min(ns.Count(), this.nodeStatusList.Count()); i++)
            {
                CtlNodeStatus nodeStatus = this.nodeStatusList[i];
                ns[i].Copy(ref nodeStatus);
                UserControlCtlNode monitorNode = userCtlNodes[nodeStatus.NodeName];
                monitorNode.BkgColor   = nodeColorMap[nodeStatus.Status];
                monitorNode.DispDetail = nodeStatus.StatDescribe;
                monitorNode.RefreshDisp();
                //monitorNode.DispPopupInfo = "主机条码:"+nodeStatus.ProductBarcode;
            }
        }
Beispiel #2
0
        public void InitNodeMonitorview(List <CtlNodeBaseModel> nodeList)
        {
            userCtlNodes   = new Dictionary <string, UserControlCtlNode>();
            nodeStatusList = new List <CtlNodeStatus>();
            this.flowLayoutPanel1.Controls.Clear();
            int  nodeCount = nodeList.Count();
            Size boxSize   = new Size(0, 0);

            boxSize.Width  = this.flowLayoutPanel1.Width / (nodeCount + 1);
            boxSize.Height = (int)(this.flowLayoutPanel1.Height);
            //foreach(CtlNodeBaseModel node in nodeList)
            for (int i = 0; i < nodeList.Count(); i++)
            {
                CtlNodeBaseModel   node        = nodeList[i];
                UserControlCtlNode monitorNode = new UserControlCtlNode();
                monitorNode.Size = boxSize;
                //监控控件属性赋值
                monitorNode.Title     = node.NodeName;
                monitorNode.TimerInfo = "40";

                monitorNode.RefreshDisp();
                this.flowLayoutPanel1.Controls.Add(monitorNode);
                userCtlNodes[node.NodeName] = monitorNode;

                nodeStatusList.Add(new CtlNodeStatus(node.NodeName)
                {
                    ProductBarcode = node.CurrentStat.ProductBarcode
                });
            }
            //配色方案

            //设备状态图例颜色
            nodeColorMap = new Dictionary <EnumNodeStatus, Color>();
            nodeColorMap[EnumNodeStatus.设备故障]  = Color.Red;
            nodeColorMap[EnumNodeStatus.设备空闲]  = Color.Green;
            nodeColorMap[EnumNodeStatus.设备使用中] = Color.Yellow;
            nodeColorMap[EnumNodeStatus.工位有板]  = Color.LightSeaGreen;
            nodeColorMap[EnumNodeStatus.无法识别]  = Color.PaleVioletRed;
            this.pictureBox1.BackColor         = nodeColorMap[EnumNodeStatus.设备故障];
            this.pictureBox2.BackColor         = nodeColorMap[EnumNodeStatus.设备空闲];
            this.pictureBox3.BackColor         = nodeColorMap[EnumNodeStatus.设备使用中];
            this.pictureBox4.BackColor         = nodeColorMap[EnumNodeStatus.工位有板];
            this.pictureBox5.BackColor         = nodeColorMap[EnumNodeStatus.无法识别];
        }
Beispiel #3
0
        public void InitLineMonitor(int lineSeq, CtlLineBaseModel line)
        {
            //this.flowLayoutPanel1.Controls.Clear();

            Size boxSize = new Size(0, 0);

            View.UserControlLine userControlLine = null;
            if (lineSeq == 1)
            {
                userControlLine = this.userControlLine1;
            }
            else if (lineSeq == 2)
            {
                userControlLine = this.userControlLine2;
            }
            else
            {
                userControlLine = this.userControlLine3;
            }
            userControlLine.LineName = line.LineName;
            int nodeCount = line.NodeList.Count();

            for (int i = 0; i < nodeCount; i++)
            {
                CtlNodeBaseModel   node        = line.NodeList[i];
                UserControlCtlNode monitorNode = new UserControlCtlNode();
                monitorNode.Title = node.NodeName;
                userControlLine.Add(monitorNode);
                userCtlNodes[node.NodeName] = monitorNode;
                monitorNode.TimerInfo       = "40";
                monitorNode.RefreshDisp();
                nodeStatusList.Add(new CtlNodeStatus(node.NodeName)
                {
                    ProductBarcode = node.CurrentStat.ProductBarcode
                });
            }
            userControlLine.ReLayout();
        }
Beispiel #4
0
        public void RefreshNodeStatus()
        {
            List <CtlNodeStatus> ns = this.lineMonitorPresenter.GetNodeStatus();

            for (int i = 0; i < ns.Count(); i++)
            {
                CtlNodeStatus nodeStatus = this.nodeStatusList[i];
                ns[i].Copy(ref nodeStatus);
                UserControlCtlNode monitorNode = userCtlNodes[nodeStatus.NodeName];
                monitorNode.BkgColor   = nodeColorMap[nodeStatus.Status];
                monitorNode.DispDetail = nodeStatus.StatDescribe;
                monitorNode.RefreshDisp();
                monitorNode.DispPopupInfo = "主机条码:" + nodeStatus.ProductBarcode;
            }
            this.label19.Text = string.Format("待贴标队列:{0}", lineMonitorPresenter.GetPrintListLen());
            this.label12.Text = "当前正在检测的设备数量:" + lineMonitorPresenter.GetRunningDetectdevs().ToString();

            //投产信息
            string barcode = this.nodeStatusList[0].ProductBarcode;

            if (string.IsNullOrWhiteSpace(barcode))
            {
                this.label3.Text = "";
                this.label4.Text = "";
                return;
            }
            this.label3.Text = barcode.ToUpper();
            int L = barcode.IndexOf("L");

            if (L < 0 || L > barcode.Count())
            {
                L = barcode.Count();
            }
            string productCata = barcode.Substring(0, L);

            this.label4.Text = string.Format("{0},{1}", productCata, this.lineMonitorPresenter.GetProductCfgInfo(productCata));
        }