public TileControl(int left, int top, int width, int height, TileViewModel tileViewModel) { myLeft = left; myTop = top; myWidth = width; myHeight = height; this.tileViewModel = tileViewModel; BuildHex(); DisplayHex(); }
public TileControl(int left, int top, int width, int height, TileViewModel tileViewModel) { myLeft = left; myTop = top; myWidth = width; myHeight = height; this.tileViewModel = tileViewModel; BuildHex(); DisplayHex(); }
private static Brush ConvertTileToBrush(TileViewModel tile) { switch (tile.Resource) { case Resource.Wood: return new SolidColorBrush(Colors.DarkGreen); case Resource.Brick: return new SolidColorBrush(Colors.Orange); case Resource.Grain: return new SolidColorBrush(Colors.Yellow); case Resource.Ore: return new SolidColorBrush(Colors.Gray); case Resource.Sheep: return new SolidColorBrush(Colors.LightGreen); default: return new SolidColorBrush(Colors.DarkRed); } }
private static Brush ConvertTileToBrush(TileViewModel tile) { switch (tile.Resource) { case Resource.Wood: return(new SolidColorBrush(Colors.DarkGreen)); case Resource.Brick: return(new SolidColorBrush(Colors.Orange)); case Resource.Grain: return(new SolidColorBrush(Colors.Yellow)); case Resource.Ore: return(new SolidColorBrush(Colors.Gray)); case Resource.Sheep: return(new SolidColorBrush(Colors.LightGreen)); default: return(new SolidColorBrush(Colors.DarkRed)); } }