/// <summary> /// Constructor: Start the device watcher /// </summary> public Scenario2_ReceiveMIDIMessages() { this.InitializeComponent(); // Initialize the list of active MIDI input devices this.midiInPorts = new List <MidiInPort>(); // Set up the MIDI input device watcher this.midiInDeviceWatcher = new MidiDeviceWatcher(MidiInPort.GetDeviceSelector(), Dispatcher, this.inputDevices); // Start watching for devices this.midiInDeviceWatcher.Start(); }
/// <summary> /// Constructor: Start the device watcher /// </summary> public Scenario2_ReceiveMIDIMessages() { this.InitializeComponent(); // Initialize the list of active MIDI input devices this.midiInPorts = new List<MidiInPort>(); // Set up the MIDI input device watcher this.midiInDeviceWatcher = new MidiDeviceWatcher(MidiInPort.GetDeviceSelector(), Dispatcher, this.inputDevices); // Start watching for devices this.midiInDeviceWatcher.Start(); }
/// <summary> /// Constructor: Start the device watcher and populate MIDI message types /// </summary> public Scenario3_SendMIDIMessages() { this.InitializeComponent(); // Initialize the list of active MIDI output devices this.midiOutPorts = new List <IMidiOutPort>(); // Set up the MIDI output device watcher this.midiOutDeviceWatcher = new MidiDeviceWatcher(MidiOutPort.GetDeviceSelector(), Dispatcher, this.outputDevices); // Start watching for devices this.midiOutDeviceWatcher.Start(); // Populate message types into list PopulateMessageTypes(); }
/// <summary> /// Constructor: Empty device lists, start the device watchers and /// set initial states for buttons /// </summary> public Scenario1_MIDIDeviceEnumeration() { this.InitializeComponent(); // Start with a clean slate ClearAllDeviceValues(); // Ensure Auto-detect devices toggle is on this.deviceAutoDetectToggle.IsOn = true; // Set up the MIDI input and output device watchers this.midiInDeviceWatcher = new MidiDeviceWatcher(MidiInPort.GetDeviceSelector(), Dispatcher, this.inputDevices); this.midiOutDeviceWatcher = new MidiDeviceWatcher(MidiOutPort.GetDeviceSelector(), Dispatcher, this.outputDevices); // Start watching for devices this.midiInDeviceWatcher.Start(); this.midiOutDeviceWatcher.Start(); // Disable manual enumeration buttons this.listInputDevicesButton.IsEnabled = false; this.listOutputDevicesButton.IsEnabled = false; }
/// <summary> /// Constructor: Start the device watcher and populate MIDI message types /// </summary> public Scenario3_SendMIDIMessages() { this.InitializeComponent(); // Initialize the list of active MIDI output devices this.midiOutPorts = new List<IMidiOutPort>(); // Set up the MIDI output device watcher this.midiOutDeviceWatcher = new MidiDeviceWatcher(MidiOutPort.GetDeviceSelector(), Dispatcher, this.outputDevices); // Start watching for devices this.midiOutDeviceWatcher.Start(); // Populate message types into list PopulateMessageTypes(); }