示例#1
0
 private void PaintStations()
 {
     foreach (var station in _map.Stations)
     {
         var control = new EnergyStationControl();
         RobotGrid.Children.Add(control);
         SetPosition(control, station.Position);
     }
 }
示例#2
0
 private void SetPosition(EnergyStationControl control, Position position)
 {
     control.Top  = position.Y * CellWidth;
     control.Left = position.X * CellWidth;
 }