//- callbacks ----------------------------------------------------------------- public void updatePatchList(VSTRig rig) { cbxPatchList.Items.Clear(); cbxPatchList.Text = ""; foreach (Patch patch in rig.patches) { cbxPatchList.Items.Add(patch.name); } bool enabled = (cbxPatchList.Items.Count > 0); cbxPatchList.Enabled = enabled; btnPrevPatch.Enabled = enabled; btnNextPatch.Enabled = enabled; cbxPatchList.SelectedIndex = (enabled && rig.currentPatch != null) ? cbxPatchList.FindString(rig.currentPatch.name) : -1; if (rig.currentPatch == rig.newPatch) { cbxPatchList.Text = rig.newPatch.name; } }
int vstnum; //for debugging public ControlPanel(AudimatWindow _auditwin) { auditwin = _auditwin; //init backend vashti = new Vashti(); host = new VSTHost(vashti); midiDevices = new MidiSystem(); InitializeComponent(); //child windows patchNameWnd = null; //model currentRig = null; curRigFilename = null; curRigPath = Application.StartupPath; curPluginPath = Application.StartupPath; vstnum = 0; isRunning = false; }