private void buttonAdd_Click(object sender, EventArgs e) { using (FormDevice fd = new FormDevice()) { fd.ShowDialog(); } }
public FormDeviceRegister() { InitializeComponent(); this.formDevicePropertys = new FormDevicePropertys(); Utils.AddFormToContainer(this.formDevicePropertys, this.panelPropertys); Program.TestManager.deviceController.AttachObserver(this.formDevicePropertys.Update); this.formDevice = new FormDevice(); this.formDevice.AttachSubject(Program.TestManager.deviceController); this.formDevice.UpdateActiveDevice(Program.TestManager.deviceController.iLopController.activeDevice); }