Example #1
0
 private void watchGameToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (lastClickedNode == null)
         return;
     GameForm form = new GameForm();
     form.OwnerName = lastClickedNode.Name;
     form.Shard = this.shard;
     JoinGameResponse response = (JoinGameResponse)shard.Me.Connection.SendMessage(new JoinGameMessage(lastClickedNode.Name, false));
     if (response.Success)
     {
         form.ShowDialog();
     }
     else
     {
         MessageBox.Show("Game is locked.");
     }
 }
Example #2
0
 private void newGameToolStripMenuItem_Click(object sender, EventArgs e)
 {
     GameForm form = new GameForm();
     form.OwnerName = this.shard.Me.Name;
     form.Shard = this.shard;
     NewGameResponse response = (NewGameResponse)shard.Me.Connection.SendMessage(new NewGameMessage());
     if (response.Success)
     {
         form.ShowDialog();
     }
     else
     {
         MessageBox.Show("Unable to create new game.");
     }
 }