private static void UpdateDevices() { int count = MidiInput.Count; CloseAllConnections(); int index = 0; foreach (string dev in MidiInput.GetDeviceList()) { if (Maps.ContainsKey(dev)) { MidiMap map = Maps[dev]; int outIndex = MidiOutput.GetDeviceIdByName(dev); map.ConnectDevice(index, outIndex); } else { // Can't find map so create a new default map MidiMap map = new MidiMap(); map.Name = dev; map.Dirty = true; int outIndex = MidiOutput.GetDeviceIdByName(dev); map.ConnectDevice(index, outIndex); map.UpdateMapLinks(); Maps[map.Name] = map; } index++; } MidiSetup.UpdateDeviceList(); MidiInputCount = count; }
public static void ShowSetupWindow() { if (master == null) { master = new MidiSetup(); master.Owner = Earth3d.MainWindow; master.Show(); } else { master.Show(); master.Activate(); } }
public static void ShowSetupWindow() { if (master == null) { master = new MidiSetup(); master.Owner = Earth3d.MainWindow; master.Show(); } else { master.Show(); master.Activate(); } }
private void MidiSetup_FormClosed(object sender, FormClosedEventArgs e) { master = null; }
private void MidiSetup_Load(object sender, EventArgs e) { master = this; UpdateDeviceListLocal(); this.Height = Properties.Settings.Default.MidiEditWindowHeight; }
private void MidiSetup_Load(object sender, EventArgs e) { master = this; UpdateDeviceListLocal(); this.Height = Properties.Settings.Default.MidiEditWindowHeight; }
private void MidiSetup_FormClosed(object sender, FormClosedEventArgs e) { master = null; }