예제 #1
0
 public void SetMap(Map map)
 {
     if (Map == map)
     {
         return;
     }
     // remove old box
     if (Box != null)
     {
         Box.MouseDown -= Box_MouseDown;
         Controls.Remove(Box);
         Box = null;
     }
     if (map == null)
     {
         Progress.Visible = true;
     }
     else
     {
         Box            = new MapPreviewBox(map);
         Box.MouseDown += Box_MouseDown;
         Controls.Add(Box);
         SetSize(Box.Width, Box.Height);
         Box.Left         = this.Width / 2 - Box.Width / 2;
         Box.Top          = 3;
         Progress.Visible = false;
     }
 }
예제 #2
0
 public void SetBox(MapPreviewBox box)
 {
     box.MouseDown += Box_MouseDown;
     Controls.Add(box);
     Map = box.Map;
     SetSize(box.Width, box.Height);
     box.Left = this.Width / 2 - box.Width / 2;
     box.Top  = 3;
 }
예제 #3
0
 public MapIDControl(long id, MapPreviewBox box) : this(id)
 {
     SetBox(box);
 }