예제 #1
0
        //  Send a whisper to chosen user
        void Send()
        {
            //  Create NameValueCollection to fake a MessageEventArgs
            NameValueCollection nvc = new NameValueCollection();

            nvc["color"]        = _irc.Color;
            nvc["display-name"] = _irc.DisplayName;

            Messages.Add(new MessageViewModel(new MessageEventArgs(nvc, Message)
            {
                User = _irc.User
            }));
            if (Messages.Count > App.MAXMESSAGES)
            {
                Messages.RemoveAt(0);
            }

            _irc.Whisper(_userName, Message);
            Message = string.Empty;
        }