예제 #1
0
 private void btnChatSend_Click(object sender, RoutedEventArgs e)
 {
     if (txtChatInput.Text != "")
     {
         ClientControll.SendChatMessage(txtChatInput.Text);
         txtChatInput.Text = "";
     }
     txtChatInput.Focus();
 }
예제 #2
0
 private void btnStartGame_Click(object sender, RoutedEventArgs e)
 {
     if (ClientControll.gameState.Users.Count > 2)
     {
         ClientControll.StartGame();
     }
     else
     {
         MessageBox.Show("В комнате должно быть не меньше 3 человек", "Ошибка", MessageBoxButton.OK, MessageBoxImage.Warning);
     }
 }
예제 #3
0
        private void LstRooms_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            var room = (Room)lstRooms.SelectedItem;

            if (room == null || room.Id == 0)
            {
                return;
            }

            // Clear chat area before entering the room
            ClientControll.gameState.ClearChat();
            ClientControll.GotoRoom(room.Id);
        }
예제 #4
0
 void AppStartup(object sender, StartupEventArgs args)
 {
     ClientControll.Run();
 }
예제 #5
0
 public void Notify(GameMessage msg)
 {
     LogSaver.Log("Callback invoked " + msg.actionType.ToString());
     ClientControll.ChangeClientView(msg);
 }
예제 #6
0
 private void Button_Click_2(object sender, RoutedEventArgs e)
 {
     ClientControll.Registration(LoginTB.Text, PasswordTB.Text);
 }
예제 #7
0
 private void btnCurrentWordVoteUp_Click(object sender, RoutedEventArgs e)
 {
     ClientControll.VoteForPlayerWord(0, true);
 }
예제 #8
0
 private void btnAskQuestion_Click(object sender, RoutedEventArgs e)
 {
     ClientControll.AskQuestion(txtQuestion.Text, txtCurrentWord.Text);
     txtQuestion.Text    = "";
     txtCurrentWord.Text = "";
 }
예제 #9
0
 private void btnSubmitAnswer_Click(object sender, RoutedEventArgs e)
 {
     ClientControll.GiveCurrentWordVariant(txtAnswer.Text);
     txtAnswer.Text = "";
 }
예제 #10
0
 private void MainWindow_Closed(object sender, EventArgs e)
 {
     ClientControll.Logoff();
 }
예제 #11
0
 private void btnSetPrimaryWord_Click(object sender, RoutedEventArgs e)
 {
     ClientControll.SetPrimaryWord(txtSetPrimaryWord.Text);
 }
예제 #12
0
 private void btnLeaveRoom_Click(object sender, RoutedEventArgs e)
 {
     ClientControll.gameState.ClearChat();
     ClientControll.LeaveRoom();
 }
예제 #13
0
 private void btnCreateRoom_Click(object sender, RoutedEventArgs e)
 {
     ClientControll.CreateNewRoom(txtRoomName.Text);
 }
예제 #14
0
 private void btnVoteForChiefWord_Disagree_Click(object sender, RoutedEventArgs e)
 {
     ClientControll.VoteForChiefWord(false);
 }
예제 #15
0
 private void btnHostHaveChiefWord_Click(object sender, RoutedEventArgs e)
 {
     ClientControll.GiveChiefWord(txtChiefWord.Text);
 }
예제 #16
0
 private void btnVarOfCurWordVoteDown_Click(object sender, RoutedEventArgs e)
 {
     ClientControll.VoteForPlayerWord(1, false);
 }