Пример #1
0
        private void MainForm_Load(object sender, System.EventArgs e)
        {
            labvision.Text = InTask.GetInTaskDate();
            //SetVision();
            monitorLog             = MonitorLog.NewMonitorLog();
            monitorLog.LOGNAME     = "系统信息";
            monitorLog.LOGINFO     = "补货监控系统启动!";
            monitorLog.LOGLOCATION = "系统";
            monitorLog.LOGTYPE     = 0;
            monitorLog.Save();
            //LoadDefaultLayout();
            SetDockWinTitle();
            SetLog(global::MonitorMain.Properties.Resources.StartUpTime + DateTime.Now);

            // Load Quick Access Toolbar layout if one is saved from last session...
            LoadQuickAccessToolbar();

            SetSeverStatus();

            if (Convert.ToBoolean(ConfigurationManager.AppSettings["IsStart"]))
            {
                buttonItem23.Checked = true;
                StartInTask();
                labtaskstatus.Text = "任务已启动";
            }
        }
Пример #2
0
        private int GetCurrentInfo()
        {
            InTask _comfirmintask = InTask.GetConfirmInTask();
            string orderdate      = InTask.GetInTaskDate();

            labtitle.Text = "当前补货卷烟 (" + orderdate + ")";
            if (_comfirmintask != null && _comfirmintask.INDEXNO > 0)
            {
                panelEx2.Visible = true;

                if (currentindex != _comfirmintask.INDEXNO)
                {
                    if (currentcolor >= 3)
                    {
                        currentcolor = 1;
                    }

                    foreach (var control in panelEx4.Controls)
                    {
                        if (control is LabelX)
                        {
                            ((LabelX)control).ForeColor = colors[currentcolor];
                        }
                    }
                    currentcolor++;
                }

                labindexno.Text = _comfirmintask.INDEXNO + "/" + maxtaskno;
                labbarcode.Text = _comfirmintask.BARCODE;
                labcigname.Text = _comfirmintask.CIGNAME;


                currentindex = _comfirmintask.INDEXNO;
                return(_comfirmintask.INDEXNO);
            }
            else
            {
                labindexno.Text = "无";
                labbarcode.Text = "无";
                labcigname.Text = "无";
            }
            return(0);
            //}
            //else
            //{
            //    labindexno.Text = "补货完成";
            //    labcigname.Text = "补货完成";
            //    labbarcode.Text = "补货完成";
            //    labnbarcode.Text = "补货完成";
            //    labncigname.Text = "补货完成";
            //    return 0;
            //}
        }
Пример #3
0
        public void SetVision()
        {
            labvision.Text = InTask.GetInTaskDate();
            //labservision.Text = InTask.GetServerInTaskDate();


            //if (labvision.Text.Trim() != labservision.Text.Trim())
            //{
            //    labelItem4.ForeColor = Color.Red;
            //    labelItem5.ForeColor = Color.Red;
            //    labvision.ForeColor = Color.Red;
            //    labservision.ForeColor = Color.Red;
            //}
            //else
            //{
            //    labelItem4.ForeColor = Color.Black;
            //    labelItem5.ForeColor = Color.Black;
            //    labvision.ForeColor = Color.Black;
            //    labservision.ForeColor = Color.Black;
            //}
        }