void plugindlg_FormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e) { if (plugindlg != null) { controlPanelX = plugindlg.Location.X; controlPanelY = plugindlg.Location.Y; plugindlg = null; } }
//- dialog methods ---------------------------------------------------- //only show dialog once public void showPluginDialog(String title) { if (plugindlg == null) { plugindlg = new PowerChordDialog(this); plugindlg.Text = title; plugindlg.Location = new Point(controlPanelX, controlPanelY); plugindlg.FormClosing += new System.Windows.Forms.FormClosingEventHandler(plugindlg_FormClosing); plugindlg.Show(); } }
public PowerChord() { modifier = null; keysdown = new bool[128]; switchOff(); chordNotes = new List <int>(); plugindlg = null; controlPanelX = 100; controlPanelY = 100; }