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);
 }
 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();
     };
 }