コード例 #1
0
ファイル: ChatsPage.cs プロジェクト: codebutler/meshwork
        private void network_LeftChat(Network network, ChatEventArgs args)
        {
            if (args.Room.InRoom == true) {
                (args.Room.Properties["Window"] as ChatRoomSubpage).RemoveUser (args.Node);
            }

            if (args.Room.Users.Count == 0) {
                chatTreeStore.RemoveItem (network, args.Room);
            } else {
                chatList.QueueDraw ();
            }

            Gui.MainWindow.RefreshCounts();
        }
コード例 #2
0
ファイル: Network.cs プロジェクト: codebutler/meshwork
        protected virtual void OnLeftChat(ChatEventArgs args)
        {
            LoggingService.LogInfo("{0} has left {1}", args.Node.NickName, args.Room.Name);

            if (LeftChat != null) {
                LeftChat (this, args);
            }
        }
コード例 #3
0
ファイル: ChatsPage.cs プロジェクト: codebutler/meshwork
        private void network_JoinedChat(Network network, ChatEventArgs args)
        {
            try {
                if (chatTreeStore.ContainsItem (network, args.Room) == false) {
                    TreeIter iter = chatTreeStore.AddItem (network, args.Room);
                    if (args.Node.IsMe) {
                        chatList.Selection.SelectIter (iter);
                        chatList.GrabFocus();
                    }
                }

                if (args.Room.InRoom == true) {
                    if (args.Room.Properties.ContainsKey("Window") == false) {
                        Widget labelWidget = CreateTabLabel(args.Room.Name);

                        ChatRoomSubpage w = new ChatRoomSubpage(args.Room);
                        AppendPage(w, labelWidget);
                        args.Room.Properties.Add("Window", w);
                        w.GrabFocus();

                        tabLabelPages[labelWidget] = w;
                    } else {
                        (args.Room.Properties["Window"] as ChatRoomSubpage).AddUser (args.Node);
                    }
                }

                chatList.QueueDraw ();
                Gui.MainWindow.RefreshCounts();

            } catch (Exception ex) {
                LoggingService.LogError(ex);
            }
        }
コード例 #4
0
ファイル: Network.cs プロジェクト: codebutler/meshwork
        protected virtual void OnJoinedChat(ChatEventArgs args)
        {
            LoggingService.LogInfo("{0} has joined {1}", args.Node.NickName, args.Room.Name);

            if (JoinedChat != null) {
                JoinedChat (this, args);
            }
        }