public New(MultiBoard board, HaCreator.ThirdParty.TabPages.PageCollection Tabs, EventHandler[] rightClickHandler) { InitializeComponent(); this.multiBoard = board; this.Tabs = Tabs; this.rightClickHandler = rightClickHandler; }
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; }
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; }
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; }
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; } }
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; }
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(); } }