private void SendButton_Click(object sender, RoutedEventArgs e) { Server.SendMessageToAll(MessageTextBox.Text, UserNameTextBox.Text); string message = MessageTextBox.Text; string s1 = String.Empty; string s2 = String.Empty; bool check = true; for (int i = 0; i < message.Length; i++) { if (check == false) { s2 = s2 + message[i]; } if (check == true) { if (message[i] != ':') { s1 = s1 + message[i]; } else { check = false; } } } TakeMessage(s1, "You"); MessageTextBox.Text = ""; }
private void Button_Click_1(object sender, RoutedEventArgs e) { if (MessageTextBox.Text.Length == 0) { return; } Server.SendMessageToAll(MessageTextBox.Text, userNameTextBox.Text); TakeMessage(MessageTextBox.Text, "you"); MessageTextBox.Text = ""; }
//Sends the message in the chat textbox when send is clicked private void SendButton_Click(object sender, RoutedEventArgs e) { if (ChatTextBox.Text.Length == 0) { return; } Server.SendMessageToAll(ChatTextBox.Text, UserNameTextBox.Text); TakeMessage(ChatTextBox.Text, "You"); ChatTextBox.Text = ""; }
//New command... private void SendButton_Click(object sender, RoutedEventArgs e) { //if message in message text box has no characters - dont allow send. if (MessageTextBox.Text.Length == 0) { return; } //This line of command tells the system to show username and message sent. Server.SendMessageToAll(MessageTextBox.Text, UserNameTextBox.Text); TakeMessage(MessageTextBox.Text, "You"); MessageTextBox.Text = ""; }
private void btnSend_Click(object sender, RoutedEventArgs e) { Server.SendMessageToAll(txtsend.Text, txtUserName.Text); TakeMessage(txtsend.Text, txtUserName.Text); txtsend.Text = ""; }
private void SendButton_Click(object sender, RoutedEventArgs e) { Server.SendMessageToAll(messageTextbox.Text, userNameTextbox.Text); TakeMessage(messageTextbox.Text, "Me"); messageTextbox.Text = ""; }