Esempio n. 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();
 }
Esempio n. 2
0
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     mon?.Dispose();
     device?.Close();
 }
Esempio n. 3
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();
 }