예제 #1
0
파일: MainForm.cs 프로젝트: maxton/rb-bot
 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();
 }
예제 #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();
 }