Exemple #1
0
        private void HaEditor_Load(object sender, EventArgs e)
        {
            // This has to be here and not in .ctor for some reason, otherwise subwindows are not locating properly
            tilePanel = new TilePanel(hcsm) { Enabled = false };
            objPanel = new ObjPanel(hcsm) { Enabled = false };
            lifePanel = new LifePanel(hcsm) { Enabled = false };
            portalPanel = new PortalPanel(hcsm) { Enabled = false };
            bgPanel = new BackgroundPanel(hcsm) { Enabled = false };
            commonPanel = new CommonPanel(hcsm) { Enabled = false };

            List<DockContent> dockContents = new List<DockContent> { tilePanel, objPanel, lifePanel, portalPanel, bgPanel, commonPanel };

            dockContents.ForEach(x => x.Show(dockPanel));
            dockContents.ForEach(x => x.DockState = DockState.DockRight);
            dockContents.ForEach(x => x.DockAreas = DockAreas.DockRight);
            commonPanel.Pane = bgPanel.Pane = portalPanel.Pane = lifePanel.Pane = objPanel.Pane = tilePanel.Pane;

            if (!hcsm.backupMan.AttemptRestore())
                hcsm.LoadMap(new Load(multiBoard, tabs, hcsm.MakeRightClickHandler()));
        }
 public void SetTilePanel(TilePanel tp)
 {
     this.tilePanel = tp;
 }