Exemplo n.º 1
0
        private void btn_send_Click(object sender, RoutedEventArgs e)
        {
            string message = txt_message.Text;

            ClientChatImpl.sendButton_Execute(message);

            txt_message.Clear();
        }
Exemplo n.º 2
0
        private void btn_join_Click(object sender, RoutedEventArgs e)
        {
            string username = txt_username.Text;

            if (!ValidateUsername(username))
            {
                MessageBox.Show("Type in a valid username.", "", MessageBoxButton.OK);
                return;
            }

            ClientChatImpl.ClientName = username;
            ClientChatImpl.UserEnteredChat();
            var window = new ChatWindow();

            window.Show(); // open the chat window

            Close();       // closes this window
        }
Exemplo n.º 3
0
 private void ChatWindow_OnClosed(object sender, EventArgs e)
 {
     ClientChatImpl.ChatClosing();
 }