Exemplo n.º 1
0
 protected void OnPivotChanged(HexViewModel Old, HexViewModel New)
 {
     if (Old != null)
     {
         Old.Background = "Transparent";
     }
     if (New != null)
     {
         New.Background = "GoldenRod";
     }
 }
Exemplo n.º 2
0
        public AppViewModel()
        {
            HexViewModel item;

            HexMap = new HexMap <HexViewModel>(5);
            for (int r = 0; r <= 5; r++)
            {
                for (int i = 0; i < HexLib.HexMap.GetPerimeter(r); i++)
                {
                    item = new HexViewModel(new HexCoordinate(r, i), HexRadius);
                    if ((r & 1) != 0)
                    {
                        item.Background = "WhiteSmoke";
                    }
                    else
                    {
                        item.Background = "White";
                    }
                    HexMap[item.Coordinate] = item;
                }
            }
            OnDemoModeChanged();
        }