public void removeRobotControl() { ControlFolder.robotControl RobotControl2Del = Grid1.FindName("RobotControl") as ControlFolder.robotControl; RobotControl2Del.stopThread(); Grid1.Children.Remove(RobotControl2Del); Grid1.UnregisterName(RobotControl2Del.Name); }
private void destroyRobotControl() { ControlFolder.robotControl RobotControl2Del = Grid1.FindName("RobotControl") as ControlFolder.robotControl; if (RobotControl2Del != null) { RobotControl2Del.exitControl(); } }
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); }