public void Open() { if (bindings.Count > 0) { Close(); } MidiDevices devices = new MidiDevices(); DB = new Midi2CatDatabase(DbFile); int Idx = 0; foreach (string inDevice in devices.InDevices) { // see if we can find settings for this device List <ControllerMapping> mappings = DB.GetMappings(inDevice, MappingFilter.Active); if (mappings.Count > 0) { InitDevice(inDevice, mappings, Idx); } Idx++; } }
public OrganiseDialog(Midi2CatDatabase DB, string DeviceName) { this.DB = DB; this.DeviceName = DeviceName; InitializeComponent(); }