private void Dispose(bool disposing) { if (!disposed) { foreach (string key in MultimediaMidiOutputDevices.Keys) { MultimediaMidiOutputDevices[key].Dispose(); } MultimediaMidiOutputDevices.Clear(); if (disposing) { } } disposed = true; //base.Dispose(disposing); }
private bool CaptureOutputDevices() { bool success = true; foreach (Moritz.Globals.IODevices.OutputDevice netOutputDevice in DeviceCollections.OutputDevices) { try { Multimedia.Midi.OutputDevice outputDevice = new Multimedia.Midi.OutputDevice(netOutputDevice.ID); MultimediaMidiOutputDevices.Add(netOutputDevice.Name, outputDevice); } catch { MultimediaMidiOutputDevices.Clear(); success = false; break; } } return(success); }