private void ShowAlarmDialog()
        {
            lock (this)
            {
                if (msgBox != null)
                {
                    return;
                }

                if (LumbarRobotController.RobotController.AlarmCode != 0
                    && LumbarRobotController.RobotController.AlarmCode != 0x400000
                    && LumbarRobotController.RobotController.AlarmCode != 0x800000)
                {
                    LumbarRobot.Services.LumbarRobotController.AlarmArgs args = new LumbarRobotController.AlarmArgs();
                    args.AlarmCode = LumbarRobotController.RobotController.AlarmCode;

                    msgBox = new MyMessageBox();
                    msgBox.lblMsg.Text = "出现" + args.ToString() + ",如无异常,请点击确认,继续训练!";
                    msgBox.lblTitle.Text = "提示信息";
                    msgBox.Topmost = true;
                    msgBox.BtnIsEnable += new EventHandler(msgBox_BtnIsEnable);

                    btnClearGeocoder.IsEnabled = false;
                    btnRotationFit.IsEnabled = false;
                    btnPBFit.IsEnabled = false;
                    btnActionFree.IsEnabled = false;

                    msgBox.Show();

                    if ((LumbarRobotController.RobotController.AlarmCode & 0x1000000) == 0x1000000
                        || (LumbarRobotController.RobotController.AlarmCode & 0x2000000) == 0x2000000)//25
                    {
                        this.playBtn.IsCanStop = false;
                        this.playBtn.imgStop.IsEnabled = false;
                        MyActionListBox.IsEnabled = true;

                        SetIsEnabled();

                        LumbarRobotController.RobotController.ControlCommand.PauseCmd();
                        IsShowDialog = false;
                        LumbarRobotController.RobotController.IsStop = true;
                    }
                    else
                    {
                        LumbarRobotController.RobotController.IsPause = true;
                        //SetIsEnabled();
                    }


                }
            }
        }
        private void ShowAlarmDialog()
        {
            lock (this)
            {
                if (msgBox != null)
                {
                    return;
                }

                if (LumbarRobotController.RobotController.AlarmCode != 0
                    && LumbarRobotController.RobotController.AlarmCode != 0x400000
                    && LumbarRobotController.RobotController.AlarmCode != 0x800000)
                {
                    LumbarRobot.Services.LumbarRobotController.AlarmArgs args = new LumbarRobotController.AlarmArgs();
                    args.AlarmCode = LumbarRobotController.RobotController.AlarmCode;

                    msgBox = new MyMessageBox();
                    msgBox.lblMsg.Text = "出现" + args.ToString() + ",如无异常,请点击确认,继续训练!";
                    msgBox.lblTitle.Text = "提示信息";
                    msgBox.Topmost = true;
                    msgBox.BtnIsEnable += new EventHandler(msgBox_BtnIsEnable);

                    btnClearGeocoder.IsEnabled = false;
                    btnActionFree.IsEnabled = false;

                    msgBox.Show();
                }
            }
        }
Example #3
0
        private void ShowAlarmDialog()
        {
            lock (this)
            {
                if (msgBox != null)
                {
                    return;
                }
                if (LumbarRobotController.RobotController.AlarmCode != 0)
                {
                    LumbarRobot.Services.LumbarRobotController.AlarmArgs args = new LumbarRobotController.AlarmArgs();
                    args.AlarmCode = LumbarRobotController.RobotController.AlarmCode;

                    msgBox = new MyMessageBox_Login();
                    msgBox.Width = 1366;
                    //msgBox.Height = 768;
                    msgBox.Top = 80;
                    msgBox.Left = 0;
                    msgBox.lblMsg.Text = "出现" + args.ToString() + ",如无异常,请点击确认,继续训练!";
                    msgBox.lblTitle.Text = "提示信息";
                    msgBox.Topmost = true;
                    msgBox.BtnIsEnable += new EventHandler(msgBox_BtnIsEnable);

                    msgBox.Show();
                }
            }
        }