private void UpdateGroupTabNotifications(bool ding_on_all_incoming) { var group_tabs = from tab in instance.TabConsole.Tabs where tab.Value.Control is GroupIMTabWindow && (notify_only_on_specific_groups == false || groups.Contains(tab.Value.Label.ToLower())) select tab.Value; foreach (var tab in group_tabs) { GroupIMTabWindow group_tab_window = tab.Control as GroupIMTabWindow; group_tab_window.TextManager.DingOnAllIncoming = ding_on_all_incoming; } }
public void ActivateConversationFromTab(RadegastTab Tab) { System.Windows.Forms.Control sTabControl = Tab.Control; if (sTabControl is InventoryConsole && control.config["enabled_for_inventory"]) { SelectConversation(inventory); } else if (sTabControl is ChatConsole) { if (chat == null) { chat = new Chat(control); chat.Console = sTabControl; AddConversation(chat); } SelectConversation(chat); } else if (sTabControl is FriendsConsole && control.config["enabled_for_friends"]) { SelectConversation(friends); } else if (sTabControl is VoiceConsole) { SelectConversation(voice); } else if (sTabControl is GroupIMTabWindow) { GroupIMTabWindow tab = (GroupIMTabWindow)sTabControl; SelectConversation( control.instance.Groups[tab.SessionId].Name); } else if (sTabControl is ConferenceIMTabWindow) { ConferenceIMTabWindow tab = (ConferenceIMTabWindow)sTabControl; SelectConversation(tab.SessionName); } else if (sTabControl is IMTabWindow) { IMTabWindow tab = (IMTabWindow)sTabControl; SelectConversation(tab.TargetName); } else if (sTabControl is ObjectsConsole && control.config["enabled_for_objects"]) { SelectConversation(surroundings); } }
public void CreateConversationFromTab(RadegastTab Tab, bool selectConversation) { System.Windows.Forms.Control sTabControl = Tab.Control; Mode newConv = null; // Create a conversation on first appearance of its tab. if (sTabControl is InventoryConsole && control.config["enabled_for_inventory"]) { newConv = inventory = new Closet(control); } else if (sTabControl is ChatConsole) { if (chat != null) { return; } newConv = chat = new Chat(control); } else if (sTabControl is FriendsConsole && control.config["enabled_for_friends"]) { newConv = friends = new Friends(control); } else if (sTabControl is VoiceConsole) { newConv = voice = new Voice(control); } else if (sTabControl is GroupIMTabWindow) { GroupIMTabWindow tab = (GroupIMTabWindow)sTabControl; AddConversation(new GroupIMSession(control, tab.SessionId)); return; } else if (sTabControl is ConferenceIMTabWindow) { ConferenceIMTabWindow tab = (ConferenceIMTabWindow)sTabControl; AddConversation(new ConferenceIMSession(control, tab.SessionId, tab.SessionName)); return; } else if (sTabControl is IMTabWindow) { IMTabWindow tab = (IMTabWindow)sTabControl; AddConversation(new SingleIMSession(control, tab.TargetName, tab.TargetId, tab.SessionId)); return; } else if (sTabControl is ObjectsConsole && control.config["enabled_for_objects"]) { surroundings = new Surroundings(control); AddConversation(surroundings); } // If a conversation was created, switch to it. if (newConv != null) { AddConversation(newConv); // Select CHAT as soon as it is created. if (selectConversation && sTabControl is ChatConsole) { SelectConversation(newConv); } } }