Beispiel #1
0
 private void TextMessageRecieved(VirusPlayer player, string text)
 {
     Dispatcher.Invoke(() => {
         InTextBox.Text += player.Name + ":\n" + text + "\n";
         TextScrollViewer.ScrollToBottom();
     });
 }
Beispiel #2
0
 void BadMessage(string text)
 {
     Dispatcher.Invoke(() => {
         InTextBox.Text += text + "\n";
         TextScrollViewer.ScrollToBottom();
     });
 }
Beispiel #3
0
 private void PlayerConnected(VirusPlayer player)
 {
     Dispatcher.Invoke(() => {
         InTextBox.Text += "Player " + player.Name + " connected with color " + player.Color.Name + "\n";
         TextScrollViewer.ScrollToBottom();
     });
 }
Beispiel #4
0
 private void PlayerDisconnected(VirusPlayer player)
 {
     Dispatcher.Invoke(() => {
         InTextBox.Text += "Player " + player.Name + " disconnected\n";
         TextScrollViewer.ScrollToBottom();
         EndGame();
     });
 }
Beispiel #5
0
 private void ColorUpdated(VirusPlayer player, System.Drawing.Color orig)
 {
     Dispatcher.Invoke(() => {
         InTextBox.Text += "Player " + player.Name + " changed color to " + player.Color.Name + "\n";
         TextScrollViewer.ScrollToBottom();
         viruscontrol.Refresh();
     });
 }
Beispiel #6
0
 private void NameUpdated(VirusPlayer player, string orig)
 {
     Dispatcher.Invoke(() => {
         InTextBox.Text += "Player " + orig + " changed name to " + player.Name + "\n";
         viruscontrol.Refresh();
         TextScrollViewer.ScrollToBottom();
     });
 }