Beispiel #1
0
        private void SayAndClear(string to, string msg, bool pvt)
        {
            if (msg != "")
            {
                try
                {
                    CommunicationState cs = proxy.State;
                    if (!pvt)
                    {
                        proxy.Say(msg);
                    }
                    else
                    {
                        proxy.Whisper(to, msg);
                    }

                    txtMessage.Text = "";
                }
                catch
                {
                    AbortProxyAndUpdateUI();
                    AppendText("Disconnected at " + DateTime.Now.ToString() + Environment.NewLine);
                    Error("Error: Connection to chat server lost!");
                }
            }
        }
Beispiel #2
0
 /// <summary>
 /// Will either call the Whisper/Say ChatProxy methods
 /// passing in the required parameters.
 /// </summary>
 /// <param name="to">The chatters name who the message
 /// is for</param>
 /// <param name="msg">The message</param>
 /// <param name="pvt">If true will call the ChatProxy.Whisper()
 /// method, otherwise will call the ChatProxy.Say() method</param>
 public void SayAndClear(string to, string msg, bool pvt)
 {
     if (!pvt)
     {
         proxy.Say(msg);
     }
     else
     {
         proxy.Whisper(to, msg);
     }
 }