internal void SetParent(PageCollection parent) { this.myParent = parent; if (ParentChanged != null) { ParentChanged(); } }
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 PagePanel(PageCollection pages) { this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.UserPaint, true); this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); this.Pages = pages; this.Dock = DockStyle.Fill; this.Padding = new Padding(1, 0, 1, 1); this.Pages.Controls.Add(this); this.BringToFront(); }
public TabView(PageCollection parent) { parent.CurrentPageChanged += new PageCollection.CurrentPageChangedEventHandler(MyParent_CurrentPageChanged); parent.PageAdded += new PageCollection.PageAddedEventHandler(MyParent_PageAdded); parent.PageRemoved += new PageCollection.PageRemovedEventHandler(MyParent_PageRemoved); this.Pages = parent; this.Dock = DockStyle.Top; this.Height = 25; parent.Controls.Add(this); this.DropdownButton = new DropdownButton(this); this.SendToBack(); }
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; } } }