Esempio n. 1
0
 // Window management
 public void Dock()
 {
     for (int i = Application.OpenForms.Count - 1; i >= 0; i--)
     {
         var form = Application.OpenForms[i];
         if (form != MainForm && form.Owner == null)
         {
             Do.AddControl(MainForm.PanelForms, form);
         }
     }
 }
Esempio n. 2
0
 public void CreateWorldMapsWindow()
 {
     if (WorldMaps == null || !WorldMaps.Visible)
     {
         Cursor.Current = Cursors.WaitCursor;
         WorldMaps      = new WorldMaps.OwnerForm();
         if (DockEditors)
         {
             Do.AddControl(MainForm.PanelForms, WorldMaps);
         }
         else
         {
             WorldMaps.Show();
         }
         loadedForms.Add(WorldMaps);
         Cursor.Current = Cursors.Arrow;
     }
     WorldMaps.KeyDown += new KeyEventHandler(editor_KeyDown);
     WorldMaps.BringToFront();
 }
Esempio n. 3
0
 public void CreateMinecartWindow()
 {
     if (Minecart == null || !Minecart.Visible)
     {
         Cursor.Current = Cursors.WaitCursor;
         Minecart       = new Minecart.OwnerForm();
         if (DockEditors)
         {
             Do.AddControl(MainForm.PanelForms, Minecart);
         }
         else
         {
             Minecart.Show();
         }
         loadedForms.Add(Minecart);
         Cursor.Current = Cursors.Arrow;
     }
     Minecart.KeyDown += new KeyEventHandler(editor_KeyDown);
     Minecart.BringToFront();
 }
Esempio n. 4
0
 public void CreateSpritesWindow()
 {
     if (Sprites == null || !Sprites.Visible)
     {
         Cursor.Current = Cursors.WaitCursor;
         Sprites        = new Sprites.OwnerForm();
         if (DockEditors)
         {
             Do.AddControl(MainForm.PanelForms, Sprites);
         }
         else
         {
             Sprites.Show();
         }
         loadedForms.Add(Sprites);
         Cursor.Current = Cursors.Arrow;
     }
     Sprites.KeyDown += new KeyEventHandler(editor_KeyDown);
     Sprites.BringToFront();
 }
Esempio n. 5
0
 public void CreateNewGameWindow()
 {
     if (NewGame == null || !NewGame.Visible)
     {
         Cursor.Current = Cursors.WaitCursor;
         NewGame        = new NewGame.OwnerForm();
         if (DockEditors)
         {
             Do.AddControl(MainForm.PanelForms, NewGame);
         }
         else
         {
             NewGame.Show();
         }
         loadedForms.Add(NewGame);
         Cursor.Current = Cursors.Arrow;
     }
     NewGame.KeyDown += new KeyEventHandler(editor_KeyDown);
     NewGame.BringToFront();
 }
Esempio n. 6
0
 public void CreateMenusWindow()
 {
     if (Menus == null || !Menus.Visible)
     {
         Cursor.Current = Cursors.WaitCursor;
         Menus          = new Menus.OwnerForm();
         if (DockEditors)
         {
             Do.AddControl(MainForm.PanelForms, Menus);
         }
         else
         {
             Menus.Show();
         }
         loadedForms.Add(Menus);
         Cursor.Current = Cursors.Arrow;
     }
     Menus.KeyDown += new KeyEventHandler(editor_KeyDown);
     Menus.BringToFront();
 }
Esempio n. 7
0
 public void CreateIntroWindow()
 {
     if (Intro == null || !Intro.Visible)
     {
         Cursor.Current = Cursors.WaitCursor;
         Intro          = new Intro.OwnerForm();
         if (DockEditors)
         {
             Do.AddControl(MainForm.PanelForms, Intro);
         }
         else
         {
             Intro.Show();
         }
         loadedForms.Add(Intro);
         Cursor.Current = Cursors.Arrow;
     }
     Intro.KeyDown += new KeyEventHandler(editor_KeyDown);
     Intro.BringToFront();
 }
Esempio n. 8
0
 public void CreateFormationsWindow()
 {
     if (Formations == null || !Formations.Visible)
     {
         Cursor.Current = Cursors.WaitCursor;
         Formations     = new Formations.OwnerForm();
         if (DockEditors)
         {
             Do.AddControl(MainForm.PanelForms, Formations);
         }
         else
         {
             Formations.Show();
         }
         loadedForms.Add(Formations);
         Cursor.Current = Cursors.Arrow;
     }
     Formations.KeyDown += new KeyEventHandler(editor_KeyDown);
     Formations.BringToFront();
 }
Esempio n. 9
0
 public void CreateEventScriptsWindow()
 {
     if (EventScripts == null || !EventScripts.Visible)
     {
         Cursor.Current = Cursors.WaitCursor;
         EventScripts   = new OwnerForm();
         if (DockEditors)
         {
             Do.AddControl(MainForm.PanelForms, EventScripts);
         }
         else
         {
             EventScripts.Show();
         }
         loadedForms.Add(EventScripts);
         Cursor.Current = Cursors.Arrow;
     }
     EventScripts.KeyDown += new KeyEventHandler(editor_KeyDown);
     EventScripts.BringToFront();
 }
Esempio n. 10
0
 public void CreateBattlefieldsWindow()
 {
     if (Battlefields == null || !Battlefields.Visible)
     {
         Cursor.Current = Cursors.WaitCursor;
         Battlefields   = new Battlefields.OwnerForm();
         if (DockEditors)
         {
             Do.AddControl(MainForm.PanelForms, Battlefields);
         }
         else
         {
             Battlefields.Show();
         }
         loadedForms.Add(Battlefields);
         Cursor.Current = Cursors.Arrow;
     }
     Battlefields.KeyDown += new KeyEventHandler(editor_KeyDown);
     Battlefields.BringToFront();
 }
Esempio n. 11
0
 public void CreateAttacksWindow()
 {
     if (Attacks == null || !Attacks.Visible)
     {
         Cursor.Current = Cursors.WaitCursor;
         Attacks        = new Attacks.OwnerForm();
         if (DockEditors)
         {
             Do.AddControl(MainForm.PanelForms, Attacks);
         }
         else
         {
             Attacks.Show();
         }
         loadedForms.Add(Attacks);
         Cursor.Current = Cursors.Arrow;
     }
     Attacks.KeyDown += new KeyEventHandler(editor_KeyDown);
     Attacks.BringToFront();
 }