Exemple #1
0
 private void DeviceSelector_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (device?.IsOpen == true)
     {
         device.Close();
     }
     device = null;
     device = Midi.Devices.DeviceManager.OutputDevices.Where((d) => d.Name.Equals(deviceSelector.SelectedItem)).First();
     device.Open();
 }
Exemple #2
0
 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     device?.Close();
     device = Midi.Devices.DeviceManager.OutputDevices.Where((d) => d.Name.Equals(midiDevices.SelectedItem)).First();
     device?.Open();
 }