コード例 #1
0
ファイル: RoomsPage.xaml.cs プロジェクト: kdrobnyh/battleship
 public RoomsPage(Main main)
 {
     this.main = main;
     this.DataContext = _rooms;
     //Room room = new Room("ya", DateTime.Now);
     InitializeComponent();
     //rooms.Add(room);
 }
コード例 #2
0
ファイル: GamePage.xaml.cs プロジェクト: kdrobnyh/battleship
 public GamePage(Main main, string opponent_name, string initial_chat, bool []field)
 {
     InitializeComponent();
     this.main = main;
     textBlockMessages.Text = initial_chat;
     this.opponent_name = opponent_name;
     for (int i = 0; i < 100; i++)
     {
         if (field[i])
         {
             Rectangle cell = (Rectangle)FindName(string.Format("mycell{0}", i));
             Style style = this.FindResource("ShipCell") as Style;
             cell.Style = style;
         }
     }
     my_turn = false;
     Greetings.Content = "Opponent name: " + opponent_name + "; Turn: " + opponent_name;
     this.field = new bool[100];
 }
コード例 #3
0
ファイル: LoginPage.xaml.cs プロジェクト: kdrobnyh/battleship
 public LoginPage(Main main)
 {
     InitializeComponent();
     this.main = main;
 }
コード例 #4
0
ファイル: WaitPage.xaml.cs プロジェクト: kdrobnyh/battleship
 public WaitPage(Main main)
 {
     InitializeComponent();
     this.main = main;
 }