Exemplo n.º 1
0
 public New(MultiBoard board, HaCreator.ThirdParty.TabPages.PageCollection Tabs, EventHandler[] rightClickHandler)
 {
     InitializeComponent();
     this.multiBoard = board;
     this.Tabs = Tabs;
     this.rightClickHandler = rightClickHandler;
 }
Exemplo n.º 2
0
 public BackupManager(MultiBoard multiBoard, InputHandler input, HaCreatorStateManager hcsm, HaCreator.ThirdParty.TabPages.PageCollection tabs)
 {
     this.input = input;
     this.multiBoard = multiBoard;
     this.hcsm = hcsm;
     this.tabs = tabs;
 }
Exemplo n.º 3
0
 public Load(MultiBoard board, HaCreator.ThirdParty.TabPages.PageCollection Tabs, EventHandler[] rightClickHandler)
 {
     InitializeComponent();
     DialogResult = DialogResult.Cancel;
     this.multiBoard = board;
     this.Tabs = Tabs;
     this.rightClickHandler = rightClickHandler;
     this.searchBox.TextChanged += this.mapBrowser.searchBox_TextChanged;
 }
Exemplo n.º 4
0
 public void CreateMapFromHam(MultiBoard multiBoard, HaCreator.ThirdParty.TabPages.PageCollection Tabs, string data, EventHandler[] rightClickHandler)
 {
     CreateMap("", "", CreateStandardMapMenu(rightClickHandler), new XNA.Point(), new XNA.Point(), 8, Tabs, multiBoard);
     multiBoard.SelectedBoard.Loading = true; // Prevent TS Change callbacks while were loading
     lock (multiBoard)
     {
         multiBoard.SelectedBoard.SerializationManager.DeserializeBoard(data);
         multiBoard.AdjustScrollBars();
     }
     multiBoard.SelectedBoard.Loading = false;
 }
Exemplo n.º 5
0
 public void CreateMap(string text, string tooltip, ContextMenuStrip menu, Point size, Point center, int layers, HaCreator.ThirdParty.TabPages.PageCollection Tabs, MultiBoard multiBoard)
 {
     lock (multiBoard)
     {
         Board newBoard = multiBoard.CreateBoard(size, center, layers, menu);
         GenerateDefaultZms(newBoard);
         HaCreator.ThirdParty.TabPages.TabPage page = new HaCreator.ThirdParty.TabPages.TabPage(text, multiBoard, tooltip, menu);
         newBoard.TabPage = page;
         page.Tag = newBoard;
         Tabs.Add(page);
         Tabs.CurrentPage = page;
         multiBoard.SelectedBoard = newBoard;
         menu.Tag = newBoard;
         foreach (ToolStripItem item in menu.Items)
             item.Tag = newBoard;
     }
 }
Exemplo n.º 6
0
 private void tabs_PageClosing(HaCreator.ThirdParty.TabPages.TabPage page, ref bool cancel)
 {
     if (MessageBox.Show("Are you sure you want to close this map?", "Close", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != DialogResult.Yes)
         cancel = true;
 }
Exemplo n.º 7
0
 void tabs_CurrentPageChanged(HaCreator.ThirdParty.TabPages.TabPage currentPage, HaCreator.ThirdParty.TabPages.TabPage previousPage)
 {
     if (previousPage == null)
     {
         return;
     }
     lock (multiBoard)
     {
         multiBoard_ReturnToSelectionState();
         multiBoard.SelectedBoard = (Board)currentPage.Tag;
         ApplicationSettings.lastDefaultLayer = multiBoard.SelectedBoard.SelectedLayerIndex;
         ribbon.SetLayers(multiBoard.SelectedBoard.Layers);
         ribbon.SetSelectedLayer(multiBoard.SelectedBoard.SelectedLayerIndex, multiBoard.SelectedBoard.SelectedPlatform, multiBoard.SelectedBoard.SelectedAllLayers, multiBoard.SelectedBoard.SelectedAllPlatforms);
         ribbon.SetHasMinimap(multiBoard.SelectedBoard.MinimapRectangle != null);
         ParseVisibleEditedTypes();
         multiBoard.Focus();
     }
 }