Example #1
0
        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);
        }
Example #2
0
        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);
        }