private void Button_Click(object sender, RoutedEventArgs e) { DeviceAdd dv = new DeviceAdd(); this.Hide(); dv.ShowDialog(); }
private void DeviceAdd(object sender, EventArgs e) { var AttachedDevices = FootPedalMonitor.ListDevices(); DeviceAdd dlg = new DeviceAdd(AttachedDevices); var rc = dlg.ShowDialog(); if (rc == DialogResult.OK) { var SelectedDevice = dlg.SelectedDevice; // TODO: Get the selected device and then show the configure dialog thing. } }
private void NotifyDeviceAdded(DeviceInformation deviceInfo) { DeviceAdd?.Invoke(this, deviceInfo); }