private void ShowNewForm(object sender, EventArgs e) { var childForm = new ScriptFile(); childForm.MdiParent = this; childForm.Text = "Script " + childFormNumber++; childForm.Show(dockPanel); }
private void dockPanel_ContentRemoved(object sender, DockContentEventArgs e) { if (dockPanel.Documents.Count() == 0) { ActiveDocument = null; NpcList.ClearList(); } }
private void LoadFile(string filename) { _mruManager.AddFile(filename); var f = new ScriptFile(); f.LoadFile(filename); f.MdiParent = this; f.Show(dockPanel); }
private void dockPanel_ActiveContentChanged(object sender, EventArgs e) { lock (NpcList) { ActiveDocument = (ScriptFile)((DockPanel)sender).ActiveDocument; if (ActiveDocument != null) NpcList.NpcsChanged(ActiveDocument.Npcs); } }