private void DeviceListForm_FormClosed(object sender, System.Windows.Forms.FormClosedEventArgs e) { deviceListForm.Dispose(); deviceListForm = null; _controller.Stop(); Application.Exit(); }
private void ShowDeviceListForm() { if (deviceListForm != null) { deviceListForm.Activate(); } else { deviceListForm = new DeviceListForm(_controller); deviceListForm.Show(); deviceListForm.Activate(); deviceListForm.FormClosed += DeviceListForm_FormClosed; } }