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