public void Open() { if (_form == null) { _form = new DeviceManagerForm(this); _form.Show(); _form.ShowAvailableDevices(); } }
/// Открывает форму, если она закрыта или закрывает, если открыта public void ChangeFormState() { if (_form == null) { _form = new DeviceManagerForm(this); _form.Show(); _form.ShowAvailableDevices(); } else { _form.Close(); } }
public void IsNotValidAddressAndIrqTest() { DeviceManagerForm device = new DeviceManagerForm(new ExternalDevicesController(_externalDevice)); object sender = new TextBox(); KeyPressEventArgs key1 = new KeyPressEventArgs('.'); KeyPressEventArgs key2 = new KeyPressEventArgs('/'); KeyPressEventArgs key3 = new KeyPressEventArgs('8'); device.IsValidTest(sender, key1); device.IsValidTest(sender, key2); device.IsValidTest(sender, key3); Assert.IsTrue(key1.Handled); Assert.IsTrue(key2.Handled); Assert.IsTrue(key3.Handled); }
private void initForm() { var userManagerForm = new UserManagerForm(); userManagerForm.TopLevel = false; tabPage1.Controls.Add(userManagerForm); userManagerForm.Dock = DockStyle.Fill; userManagerForm.Show(); var cusManagerForm = new CustomerManagerForm(); cusManagerForm.TopLevel = false; tabPage2.Controls.Add(cusManagerForm); cusManagerForm.Dock = DockStyle.Fill; cusManagerForm.Show(); var deviceManagerForm = new DeviceManagerForm(); deviceManagerForm.TopLevel = false; tabPage3.Controls.Add(deviceManagerForm); deviceManagerForm.Dock = DockStyle.Fill; deviceManagerForm.Show(); }
public void FormClosed() { _form = null; }
public void Connect_Event(object sender, EventArgs e) { if (this.LIVE_MODE) { this.EndLiveMode(); } else { using (DeviceManagerForm deviceManagerForm = new DeviceManagerForm(this)) { int num = (int)deviceManagerForm.ShowDialog((IWin32Window)this); } } }