コード例 #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);
                });
            }
        }
コード例 #2
0
        public static void InsertMessage(UserInfo userInfo, string message)
        {
            TalkFrame talkFrame = AddTalkFrame(userInfo);

            talkFrame.InsertMessage(userInfo, message);
        }