예제 #1
0
 public void removeRobotControl()
 {
     ControlFolder.robotControl RobotControl2Del = Grid1.FindName("RobotControl") as ControlFolder.robotControl;
     RobotControl2Del.stopThread();
     Grid1.Children.Remove(RobotControl2Del);
     Grid1.UnregisterName(RobotControl2Del.Name);
 }
예제 #2
0
 private void destroyRobotControl()
 {
     ControlFolder.robotControl RobotControl2Del = Grid1.FindName("RobotControl") as ControlFolder.robotControl;
     if (RobotControl2Del != null)
     {
         RobotControl2Del.exitControl();
     }
 }
예제 #3
0
        public void showRobotControl()
        {
            ControlFolder.robotControl newRobotControl = new ControlFolder.robotControl();

            newRobotControl.Name = "RobotControl";

            newRobotControl.Width  = 800;
            newRobotControl.Height = 660;

            newRobotControl.HorizontalAlignment = HorizontalAlignment.Center;
            newRobotControl.VerticalAlignment   = VerticalAlignment.Center;


            Grid1.Children.Add(newRobotControl);
            Grid1.RegisterName(newRobotControl.Name, newRobotControl);
            newRobotControl.SetValue(Grid.RowSpanProperty, 2);
        }