private void btSaveCurZ_Click(object sender, RoutedEventArgs e)
        {
            if (MessageBox.Show("是否确认保存当前位置Z", "确认信息", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
            {
                StationDataMngr.instance.PlacePos_L[WinRobotCalib.GetWinInst.GetCurSt() - 1].DblValue3 = PosCur.DblValue3;
                StationDataMngr.instance.WriteIniPlacePos(WinRobotCalib.GetWinInst.GetCurSt());
                LogicRobot.L_I.WriteRobotCMD(PCToRbt.PRP_FinishTeachZ);
                BaseDealComprehensiveResult.ShowState("PC->Rbt,示教Z结束");
                WinRobotCalib.GetWinInst.EnableRb(true);
                this.Dispatcher.Invoke(new Action(() =>
                {
                    EnableDriveButton(false);
                    AddStInfo();
                    dgStInfo.Items.Refresh();
                    this.Dispatcher.Invoke(new Action(() =>
                    {
                        btSaveCurXY.IsEnabled    = false;
                        btSaveCurZ.IsEnabled     = false;
                        btStartTeachXY.IsEnabled = true;
                        btStartTeachZ.IsEnabled  = true;

                        EnableDriveButton(false);
                    }));
                }));
                blTeachZ = false;
            }
        }
 private void btStartTeachZ_Click(object sender, RoutedEventArgs e)
 {
     if (WinRobotCalib.GetWinInst.GetCurSt() < 0)
     {
         return;
     }
     if (MessageBox.Show("请确认是否示教Z_工位:" + WinRobotCalib.GetWinInst.GetCurStName(), "确认信息", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
     {
         if (MessageBox.Show("请确认是否安装了示教针!", "确认信息", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
         {
             if (MessageBox.Show("请确认机台内没有人员!", "确认信息", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
             {
                 WinRobotCalib.GetWinInst.EnableRb(false);
                 LogicRobot.L_I.WriteRobotCMD(new Point4D(WinRobotCalib.GetWinInst.GetCurSt(), 0, 0, 0), PCToRbt.PRP_StartTeachZ);
                 BaseDealComprehensiveResult.ShowState("PC->Rbt,开始示教Z_" + WinRobotCalib.GetWinInst.GetCurSt());
                 blTeachZ = true;
                 this.Dispatcher.Invoke(new Action(() =>
                 {
                     btStartTeachXY.IsEnabled = false;
                     btStartTeachZ.IsEnabled  = false;
                 }));
             }
         }
     }
 }