示例#1
0
 public void UpdateOpponentField(int x, int y, battleship_client.BattleshipServerRef.Cell state)
 {
     if ((Content as GamePage) != null)
     {
         (Content as GamePage).UpdateOpponentField(x, y, state);
     }
 }
示例#2
0
        public void UpdateYourField(int x, int y, battleship_client.BattleshipServerRef.Cell state)
        {
            Rectangle cell  = (Rectangle)FindName(string.Format("mycell{0}", x + y * 10));
            Style     style = this.FindResource(state == Cell.DeadShip ? "DeadShipCell" :
                                                state == Cell.Empty ? "EmptyCell" :
                                                state == Cell.Fire ? "FireCell" :
                                                state == Cell.Missed ? "MissedCell" :
                                                "ShipCell") as Style;

            cell.Style = style;
        }