Beispiel #1
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;
     }
 }
Beispiel #2
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();
     }
 }
 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;
         }
     }
 }
Beispiel #4
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;
     }
 }