void profileItem_Click(object sender, EventArgs e) { ToolStripMenuItem item = (ToolStripMenuItem)sender; DBProfileEditor profileEditor = new DBProfileEditor((DBProfile)item.Tag); profileEditor.MdiParent = this; profileEditor.Show(); }
private void ParentInterface_Load(object sender, EventArgs e) { DBProfileHandler.Added += new Action <DBProfile>(DBProfileHandler_Added); DBProfileHandler.Removed += new Action <DBProfile>(DBProfileHandler_Removed); DBProfileHandler.Load(); if (DBProfileHandler.Count == 0) { DialogResult result = MessageBox.Show("You have no database profiles created.\nWould you like to create one now?", "No profiles detected", MessageBoxButtons.YesNo); if (result == DialogResult.Yes) { DBProfileEditor editor = new DBProfileEditor(); editor.MdiParent = this; editor.Show(); } } CharacterEditorInterface newwindow = new CharacterEditorInterface(); newwindow.MdiParent = this; newwindow.Show(); }