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(); }
protected virtual void OnLeftChat(ChatEventArgs args) { LoggingService.LogInfo("{0} has left {1}", args.Node.NickName, args.Room.Name); if (LeftChat != null) { LeftChat (this, args); } }
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); } }
protected virtual void OnJoinedChat(ChatEventArgs args) { LoggingService.LogInfo("{0} has joined {1}", args.Node.NickName, args.Room.Name); if (JoinedChat != null) { JoinedChat (this, args); } }