Exemplo n.º 1
0
        // ============================================
        // PRIVATE (Methods) Event Handlers
        // ============================================
        private static void OnSendMessage(object sender, string message)
        {
            TalkFrame talkFrame = sender as TalkFrame;

            PeerSocket peer = (PeerSocket)P2PManager.KnownPeers[talkFrame.UserInfo];

            if (peer != null)
            {
                SendMessage(peer, message);
                Gtk.Application.Invoke(delegate {
                    talkFrame.InsertMessage(MyInfo.GetInstance(), message);
                });
            }
            else
            {
                Gtk.Application.Invoke(delegate {
                    talkFrame.InsertError("Couldn't Send Message: " + message);
                });
            }
        }
Exemplo n.º 2
0
        public static void InsertMessage(UserInfo userInfo, string message)
        {
            TalkFrame talkFrame = AddTalkFrame(userInfo);

            talkFrame.InsertMessage(userInfo, message);
        }