예제 #1
0
 private void handleSend()
 {
     if (TabContainer.SelectedIndex != BLChannels.connections.Count)
     {
         if (MessageBox.Text == "/quit" || MessageBox.Text == "/disconnect" || MessageBox.Text == "/exit")
         {
             BLChannels.disconnect();
         }
         else if (MessageBox.Text == "/shutdown")
         {
             if (BLChannels.myServer != null)
             {
                 BLChannels.myServer.close();
             }
             BLChannels.disconnect();
         }
         else if (MessageBox.Text != "")
         {
             BLChannels.connections[BLChannels.currentChannel].sendTCP("1" + MessageBox.Text);
         }
     }
     else
     {
         ChannelTextBlock.Text += "Cannot send messages to this channel!\n";
     }
     MessageBox.Text = "";
 }
예제 #2
0
 private void tabDynamic_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     BLChannels.setCurrentChannel(TabContainer.SelectedIndex);
 }