void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.main = ((LumbarRobot.MyUserControl.MyMessageBox)(target)); return; case 2: this.sbOpShow = ((System.Windows.Media.Animation.Storyboard)(target)); return; case 3: this.lblTitle = ((System.Windows.Controls.TextBlock)(target)); return; case 4: this.btnClosed = ((System.Windows.Controls.Button)(target)); return; case 5: this.lblMsg = ((System.Windows.Controls.TextBlock)(target)); return; case 6: this.ButtonsGrid = ((System.Windows.Controls.Grid)(target)); return; case 7: this.btnOk = ((System.Windows.Controls.Button)(target)); #line 220 "..\..\..\..\MyUserControl\MyMessageBox.xaml" this.btnOk.Click += new System.Windows.RoutedEventHandler(this.btnOk_Click); #line default #line hidden return; } this._contentLoaded = true; }
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(); } } }
void msgBox_BtnIsEnable(object sender, EventArgs e) { LumbarRobotController.RobotController.ControlCommand.ErrorReset(); if (msgBox != null) { msgBox.Close(); msgBox = null; } this.btnClearGeocoder.IsEnabled = true; this.btnActionFree.IsEnabled = true; LumbarRobotController.RobotController.Continue(); System.Threading.Thread.Sleep(100); //if (LumbarRobotController.RobotController.AlarmCode != 0) //{ ShowAlarmDialog(); //} }
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(); } } } }