private void network_UserOffline(Network network, Node n) { TreeIter networkIter; TreeIter nodeIter; if (userListStore.GetIterFirst(out networkIter)) { do { if (userListStore.IterChildren(out nodeIter, networkIter)) { do { Node currentNode = (Node)userListStore.GetValue(nodeIter, 0); if (currentNode == n) { userListStore.Remove(ref nodeIter); break; } } while (userListStore.IterNext(ref nodeIter)); } } while (userListStore.IterNext(ref networkIter)); } Gui.MainWindow.UpdateStatusText(); if (Gui.GetPrivateMessageWindow(n) != null) { Gui.GetPrivateMessageWindow(n).SetUserOffline(); } }
private void network_UserOnline(Network network, Node node) { userListStore.AppendValues(IterForNetwork(node.Network), node); Gui.MainWindow.UpdateStatusText(); if (Gui.GetPrivateMessageWindow(node) != null) { Gui.GetPrivateMessageWindow(node).SetUserOnline(); } }
private void network_PrivateMessage(Network network, Node messageFrom, string messageText) { try { PrivateChatSubpage page = Gui.GetPrivateMessageWindow(messageFrom); if (page == null) { page = Gui.StartPrivateChat(network, messageFrom, false); } page.AddToChat(messageFrom, messageText); } catch (Exception ex) { Core.LoggingService.LogError(ex); Gui.ShowErrorDialog(ex.ToString(), Gui.MainWindow.Window); } }
private void network_UpdateNodeInfo(Network network, string oldNick, Node node) { try { if (oldNick != node.NickName) { if (Gui.GetPrivateMessageWindow(node) != null) { Gui.GetPrivateMessageWindow(node).UserInfoChanged(oldNick); } } RefreshUserList(); Gui.MainWindow.UpdateStatusText(); } catch (Exception ex) { Core.LoggingService.LogError(ex); Gui.ShowErrorDialog(ex.ToString(), Gui.MainWindow.Window); } }