예제 #1
0
        //监控所有状态
        private void TimerCheckAllStatus_Tick(object sender, EventArgs e)
        {
            //运行指示灯
            PicLedReady.Image = DataStruct.SysStat.StationReady ? Properties.Resources.LightBlue : Properties.Resources.DarkBlue;
            PicLedRun.Image   = DataStruct.SysStat.StationRun ? Properties.Resources.LightGreen : Properties.Resources.DarkGreen;
            PicLedAlarm.Image = DataStruct.SysStat.StationPause ? Properties.Resources.LightYellow : Properties.Resources.DarkYellow;
            PicLedStop.Image  = DataStruct.SysStat.StationStop ? Properties.Resources.LightRed : Properties.Resources.DarkRed;

            //设置报警灯的状态
            if (DataStruct.SysStat.StationRun)
            {
                WorkStation.SetSysAlarmTowerLed(AlarmLed.AlarmLed_Green);
            }
            else if (DataStruct.SysStat.StationPause && !DataStruct.SysStat.StationStop)
            {
                WorkStation.SetSysAlarmTowerLed(AlarmLed.AlarmLed_Oriange);
            }
            else if (!DataStruct.SysStat.StationPause && DataStruct.SysStat.StationStop)
            {
                WorkStation.SetSysAlarmTowerLed(AlarmLed.AlarmLed_Red);
            }
            else if (DataStruct.SysStat.StationPause && DataStruct.SysStat.StationStop)
            {
                WorkStation.SetSysAlarmTowerLed(AlarmLed.AlarmLed_OriangeAndRed);
            }

            //运行状态更新
            Bitmap bmpGreen = Properties.Resources.SmallGreen;
            Bitmap bmpRed   = Properties.Resources.SmallRed;

            PicRobot.Image  = DataStruct.SysStat.RobotOk ? bmpGreen : bmpRed;
            PicCamera.Image = DataStruct.SysStat.CameraOk? bmpGreen : bmpRed;
            PicArm.Image    = DataStruct.SysStat.ArmControlerOk ? bmpGreen : bmpRed;

            //添加报警信息
            for (int i = 0; i < (int)SysAlarm.Type.Max; i++)
            {
                SysAlarm.StructAlarm data = m_SysAlarm.GetAlarm((SysAlarm.Type)i);
                if (data.IsAlarm)
                {
                    if (!m_SysAlarmState[i])
                    {
                        DgvSysAlarm.Rows.Add(data.ID.ToString(), data.Level.ToString(), data.Informat, data.Solution);
                    }
                }
                m_SysAlarmState[i] = data.IsAlarm;
            }
        }
예제 #2
0
        private void QRCodeRecvData(object sender, EventArgs e)
        {
            if (e is QRCodeEventArgers)
            {
                QRCodeEventArgers Temp = e as QRCodeEventArgers;

                bool Check = WorkStation.CheckAndSaveQRCodeReadData(Temp.QRCodeRecv);
                if (Check)
                {
                    WorkStation.m_ScanQRCode = true;
                }
                else
                {
                    WorkStation.m_ScanQRCode = false;
                    //再次扫描
                }

                m_SyncContext.Post(SetQRCodeTextSafePost, Temp.QRCodeRecv);
            }
        }
예제 #3
0
 private void CButtonReset_Click(object sender, EventArgs e)
 {
     WorkStation.ProcessKey(Key.Key_Reset);
 }
예제 #4
0
 private void CButtonStop_Click(object sender, EventArgs e)
 {
     WorkStation.ProcessKey(Key.Key_Stop);
 }
예제 #5
0
 private void CButtonPause_Click(object sender, EventArgs e)
 {
     WorkStation.ProcessKey(Key.Key_Pause);
 }
예제 #6
0
 public void InitAndCreateAllThread()
 {
     WorkStation.CreateAllThread();
 }