public TabForm() { Singleton = this; InitializeComponent(); //se è aperto il vst usare quello altrimenti MIDI //for (int i = 0; i < NAudio.Midi.MidiOut.NumberOfDevices; i++) // tcbOutput.Items.Add(NAudio.Midi.MidiOut.DeviceInfo(i).ProductName); foreach (Control c in this.Controls) AddKeyDown(c); }
private void TabForm_FormClosing(object sender, FormClosingEventArgs e) { Singleton = null; }
private void loadTabToolStripMenuItem_Click(object sender, EventArgs e) { if (TabForm.Singleton != null) { TabForm.Singleton.BringToFront(); return; } tabForm = new TabForm(); OpenFileDialog openFile = new OpenFileDialog(); openFile.Title = "Select TAB:"; openFile.Filter = "TAB Files (*.tab)|*.tab"; if (MainForm.LastDirectoryUsed.ContainsKey("TabDir")) openFile.InitialDirectory = MainForm.LastDirectoryUsed["TabDir"]; openFile.ShowDialog(); if (File.Exists(openFile.FileName)) { if (MainForm.LastDirectoryUsed.ContainsKey("TabDir")) MainForm.LastDirectoryUsed["TabDir"] = Directory.GetParent(openFile.FileName).FullName; else MainForm.LastDirectoryUsed.Add("TabDir", Directory.GetParent(openFile.FileName).FullName); tabForm.LoadTab(openFile.FileName); tabForm.Show(); } }