public MinimapForm(Map map)
 {
     if (map == null) {
         return;
     }
     base.Text = "Review Selected Map";
     ShowIcon = false;
     Width = 600;
     Height = 500;
     var mapButton = new ToolStripButton("Map Information");
     var minimapButton = new ToolStripButton("Minimap");
     var mapInfoView = new MapInfoView(map);
     var minimapBox = new MinimapBox(map, 1);
     var heightmapButton = new ToolStripButton("Heightmap");
     var heightmapBox = new PictureBox
     {Image = map.HeightMap, Dock = DockStyle.Fill, SizeMode = PictureBoxSizeMode.Zoom, BackColor = Color.Black,};
     var metalmapButton = new ToolStripButton("Metalmap");
     var metalmapBox = new PictureBox
     {Image = map.MetalMap, Dock = DockStyle.Fill, SizeMode = PictureBoxSizeMode.Zoom, BackColor = Color.Black,};
     TabbedControls =
         new TabbedControls(
             new Dictionary<ToolStripButton, System.Windows.Forms.Control>
             {
                 {minimapButton, minimapBox},
                 {heightmapButton, heightmapBox},
                 {metalmapButton, metalmapBox},
                 {mapButton, mapInfoView},
             });
     TabbedControls.ToolTabs.Dock = DockStyle.Top;
     TabbedControls.OkCancelBar.OK += OkCancelBar_OK;
     TabbedControls.OkCancelBar.Cancel += (s, e) => DialogResult = DialogResult.Cancel;
     Controls.Add(TabbedControls);
 }
Пример #2
0
        void loader_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            ReloadMaps();
            Map map = GalaxyMap.Instance.Maps[index];

            base.Text = "Box Editor";
            ShowIcon  = false;
            Width     = 600;
            Height    = 500;
            var mapButton     = new ToolStripButton("Map Information");
            var minimapButton = new ToolStripButton("Minimap");
            var mapInfoView   = new MapInfoView(map);

            minimapBox = new MinimapBox(map, 1);
            var heightmapButton = new ToolStripButton("Heightmap");

            heightmapBox = new PictureBox
            {
                Image = map.HeightMap, Dock = DockStyle.Fill, SizeMode = PictureBoxSizeMode.Zoom, BackColor = Color.Black,
            };
            var metalmapButton = new ToolStripButton("Metalmap");

            metalmapBox = new PictureBox
            {
                Image = map.MetalMap, Dock = DockStyle.Fill, SizeMode = PictureBoxSizeMode.Zoom, BackColor = Color.Black,
            };
            var dict = new Dictionary <ToolStripButton, System.Windows.Forms.Control>
            {
                { minimapButton, minimapBox },
                { heightmapButton, heightmapBox },
                { metalmapButton, metalmapBox },
                { mapButton, mapInfoView },
            };
            var tabbedControls = new TabbedControls(dict);

            tabbedControls.OkCancelBar.Visible = false;
            tabbedControls.ToolTabs.Dock       = DockStyle.Top;
            Controls.Add(tabbedControls);
            var nextMapButton     = new ToolStripButton("Next");
            var previousMapButton = new ToolStripButton("Previous");

            tabbedControls.ToolTabs.Items.AddRange(new ToolStripItem[] { previousMapButton, nextMapButton });
            nextMapButton.Click += delegate
            {
                index++;
                SetMap();
            };
            previousMapButton.Click += delegate
            {
                index++;
                SetMap();
            };
        }
Пример #3
0
        public PlanetInfoForm(PlanetDrawing planet, bool changeMap, bool changeName)
        {
            base.Text = "Planet Information";
            ShowIcon  = false;
            Width     = 600;
            Height    = 500;
            var mapButton       = new ToolStripButton("Map Information");
            var minimapButton   = new ToolStripButton("Minimap");
            var mapInfoView     = new MapInfoView(planet.Map);
            var minimapBox      = new MinimapBox(planet.Map, 1);
            var heightmapButton = new ToolStripButton("Heightmap");
            var heightmapBox    = new PictureBox
            {
                Image     = planet.Map.HeightMap,
                Dock      = DockStyle.Fill,
                SizeMode  = PictureBoxSizeMode.Zoom,
                BackColor = Color.Black,
            };
            var metalmapButton = new ToolStripButton("Metalmap");
            var metalmapBox    = new PictureBox
            {
                Image     = planet.Map.MetalMap,
                Dock      = DockStyle.Fill,
                SizeMode  = PictureBoxSizeMode.Zoom,
                BackColor = Color.Black,
            };
            var dict = new Dictionary <ToolStripButton, System.Windows.Forms.Control>
            {
                { minimapButton, minimapBox },
                { heightmapButton, heightmapBox },
                { metalmapButton, metalmapBox },
                { mapButton, mapInfoView },
            };

            if (changeMap)
            {
                dict.Add(new ToolStripButton("Change Map"), new ChangeMapControl());
            }
            if (changeName)
            {
                dict.Add(new ToolStripButton("Change Name"), new ChangeNameControl());
            }
            var tabbedControls = new TabbedControls(dict);

            tabbedControls.OkCancelBar.Visible = false;
            tabbedControls.ToolTabs.Dock       = DockStyle.Top;
            Controls.Add(tabbedControls);
        }
Пример #4
0
 void loader_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     ReloadMaps();
     Map map = GalaxyMap.Instance.Maps[index];
     base.Text = "Box Editor";
     ShowIcon = false;
     Width = 600;
     Height = 500;
     var mapButton = new ToolStripButton("Map Information");
     var minimapButton = new ToolStripButton("Minimap");
     var mapInfoView = new MapInfoView(map);
     minimapBox = new MinimapBox(map, 1);
     var heightmapButton = new ToolStripButton("Heightmap");
     heightmapBox = new PictureBox
     {Image = map.HeightMap, Dock = DockStyle.Fill, SizeMode = PictureBoxSizeMode.Zoom, BackColor = Color.Black,};
     var metalmapButton = new ToolStripButton("Metalmap");
     metalmapBox = new PictureBox
     {Image = map.MetalMap, Dock = DockStyle.Fill, SizeMode = PictureBoxSizeMode.Zoom, BackColor = Color.Black,};
     var dict = new Dictionary<ToolStripButton, System.Windows.Forms.Control>
     {
         {minimapButton, minimapBox},
         {heightmapButton, heightmapBox},
         {metalmapButton, metalmapBox},
         {mapButton, mapInfoView},
     };
     var tabbedControls = new TabbedControls(dict);
     tabbedControls.OkCancelBar.Visible = false;
     tabbedControls.ToolTabs.Dock = DockStyle.Top;
     Controls.Add(tabbedControls);
     var nextMapButton = new ToolStripButton("Next");
     var previousMapButton = new ToolStripButton("Previous");
     tabbedControls.ToolTabs.Items.AddRange(new ToolStripItem[] {previousMapButton, nextMapButton});
     nextMapButton.Click += delegate
     {
         index++;
         SetMap();
     };
     previousMapButton.Click += delegate
     {
         index++;
         SetMap();
     };
 }
Пример #5
0
        public MinimapForm(Map map)
        {
            if (map == null)
            {
                return;
            }
            base.Text = "Review Selected Map";
            ShowIcon  = false;
            Width     = 600;
            Height    = 500;
            var mapButton       = new ToolStripButton("Map Information");
            var minimapButton   = new ToolStripButton("Minimap");
            var mapInfoView     = new MapInfoView(map);
            var minimapBox      = new MinimapBox(map, 1);
            var heightmapButton = new ToolStripButton("Heightmap");
            var heightmapBox    = new PictureBox
            {
                Image = map.HeightMap, Dock = DockStyle.Fill, SizeMode = PictureBoxSizeMode.Zoom, BackColor = Color.Black,
            };
            var metalmapButton = new ToolStripButton("Metalmap");
            var metalmapBox    = new PictureBox
            {
                Image = map.MetalMap, Dock = DockStyle.Fill, SizeMode = PictureBoxSizeMode.Zoom, BackColor = Color.Black,
            };

            TabbedControls =
                new TabbedControls(
                    new Dictionary <ToolStripButton, System.Windows.Forms.Control>
            {
                { minimapButton, minimapBox },
                { heightmapButton, heightmapBox },
                { metalmapButton, metalmapBox },
                { mapButton, mapInfoView },
            });
            TabbedControls.ToolTabs.Dock       = DockStyle.Top;
            TabbedControls.OkCancelBar.OK     += OkCancelBar_OK;
            TabbedControls.OkCancelBar.Cancel += (s, e) => DialogResult = DialogResult.Cancel;
            Controls.Add(TabbedControls);
        }