public void UpdateOpponentField(int x, int y, battleship_client.BattleshipServerRef.Cell state) { if ((Content as GamePage) != null) { (Content as GamePage).UpdateOpponentField(x, y, state); } }
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; }