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