public void removeUAVControl() { ControlFolder.uavControl UAVControl2Del = Grid1.FindName("UAVControl") as ControlFolder.uavControl; UAVControl2Del.stopThread(); Grid1.Children.Remove(UAVControl2Del); Grid1.UnregisterName(UAVControl2Del.Name); }
private void destroyUAVControl() { ControlFolder.uavControl UAVControl2Del = Grid1.FindName("UAVControl") as ControlFolder.uavControl; if (UAVControl2Del != null) { UAVControl2Del.exitControl(); } }
public void showUAVControl() { ControlFolder.uavControl newUAVControl = new ControlFolder.uavControl(); newUAVControl.Name = "UAVControl"; newUAVControl.Width = 900; newUAVControl.Height = 660; newUAVControl.HorizontalAlignment = HorizontalAlignment.Center; newUAVControl.VerticalAlignment = VerticalAlignment.Center; Grid1.Children.Add(newUAVControl); Grid1.RegisterName(newUAVControl.Name, newUAVControl); newUAVControl.SetValue(Grid.RowSpanProperty, 2); }