예제 #1
0
        void msgBox_BtnIsEnable(object sender, EventArgs e)
        {
            LumbarRobotController.RobotController.ControlCommand.ErrorReset();
            if (msgBox != null)
            {
                msgBox.Close();
                msgBox = null;
            }

            System.Threading.Thread.Sleep(100);
            if (LumbarRobotController.RobotController.AlarmCode != 0)
            {
                ShowAlarmDialog();
            }
        }
예제 #2
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();
                }
            }
        }