public void removePneumaticControl() { ControlFolder.pneumaticControl PneumaticControl2Del = Grid1.FindName("PneumaticControl") as ControlFolder.pneumaticControl; PneumaticControl2Del.stopThread(); Grid1.Children.Remove(PneumaticControl2Del); Grid1.UnregisterName(PneumaticControl2Del.Name); }
private void destroyPneumaticControl() { ControlFolder.pneumaticControl PneumaticControl2Del = Grid1.FindName("PneumaticControl") as ControlFolder.pneumaticControl; if (PneumaticControl2Del != null) { PneumaticControl2Del.exitControl(); } }
public void showPneumaticControl() { ControlFolder.pneumaticControl newPneumaticControl = new ControlFolder.pneumaticControl(); newPneumaticControl.Name = "PneumaticControl"; newPneumaticControl.Width = 800; newPneumaticControl.Height = 660; newPneumaticControl.HorizontalAlignment = HorizontalAlignment.Center; newPneumaticControl.VerticalAlignment = VerticalAlignment.Center; Grid1.Children.Add(newPneumaticControl); Grid1.RegisterName(newPneumaticControl.Name, newPneumaticControl); newPneumaticControl.SetValue(Grid.RowSpanProperty, 2); }