Exemple #1
0
        private void InputDevicesComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (InputDevicesComboBox.SelectedIndex != 0)
            {
                inputDeviceName = InputDevicesComboBox.SelectedItem.ToString();
            }
            else
            {
                inputDeviceName = null;
            }

            if (MidiEventListenerWorker.IsBusy)
            {
                listeningMidiEvents = false;
                MidiEventListenerWorker.CancelAsync();
            }
        }
Exemple #2
0
        private void SlowRefreshUITimer_Tick(object sender, EventArgs e)
        {
            InitOrRefreshDevicesList();

            if (inputDeviceName != null && !MidiEventListenerWorker.IsBusy)
            {
                listeningMidiEvents = true;
                MidiEventListenerWorker.RunWorkerAsync();
            }

            if (listening)
            {
                ListeningLabel.Visible = !ListeningLabel.Visible;
            }
            else
            {
                ListeningLabel.Visible = false;
            }
        }