Beispiel #1
0
Datei: Form1.cs Projekt: n9ds/HID
        private void DeviceSelect(object sender, EventArgs e)
        {
            DeviceSelect dlg = new DeviceSelect(Settings.Default.ConfigFile);
            var          rc  = dlg.ShowDialog();

            if (rc == DialogResult.OK)
            {
                deviceConfigParms.ConfigFile = Settings.Default.ConfigFile;
                deviceConfigParms.DeviceName = dlg.SelectedDevice;
                InitializeDevice(deviceConfigParms);
            }
        }
        protected virtual void OnDeviceSelected(int deviceIndex)
        {
            Device device = Devices[deviceIndex];

            DeviceSelect?.Invoke(this, new DeviceEventArgs(device));
        }