public ChatConsole(RadegastInstance instance) { InitializeComponent(); Disposed += new EventHandler(ChatConsole_Disposed); if (!instance.advancedDebugging) { ctxAnim.Visible = false; ctxTextures.Visible = false; } this.instance = instance; this.instance.ClientChanged += new EventHandler <ClientChangedEventArgs>(instance_ClientChanged); instance.GlobalSettings.OnSettingChanged += new Settings.SettingChangedCallback(GlobalSettings_OnSettingChanged); // Callbacks netcom.ClientLoginStatus += new EventHandler <LoginProgressEventArgs>(netcom_ClientLoginStatus); netcom.ClientLoggedOut += new EventHandler(netcom_ClientLoggedOut); RegisterClientEvents(client); ChatManager = new ChatTextManager(instance, new RichTextBoxPrinter(rtbChat)); ChatManager.PrintStartupMessage(); this.instance.MainForm.Load += new EventHandler(MainForm_Load); lvwObjects.ListViewItemSorter = new SorterClass(instance); cbChatType.SelectedIndex = 1; GUI.GuiHelpers.ApplyGuiFixes(this); }
void ChatConsole_Disposed(object sender, EventArgs e) { instance.ClientChanged -= new EventHandler <ClientChangedEventArgs>(instance_ClientChanged); netcom.ClientLoginStatus -= new EventHandler <LoginProgressEventArgs>(netcom_ClientLoginStatus); netcom.ClientLoggedOut -= new EventHandler(netcom_ClientLoggedOut); UnregisterClientEvents(client); chatManager.Dispose(); chatManager = null; }
private void InitializeChatTab() { chatConsole = new ChatConsole(instance); mainChatManger = chatConsole.ChatManager; RadegastTab tab = AddTab("chat", "Chat", chatConsole); tab.AllowClose = false; tab.AllowDetach = false; tab.AllowHide = false; }
public ChatConsole(RadegastInstance instance) { InitializeComponent(); Disposed += new EventHandler(ChatConsole_Disposed); if (!instance.advancedDebugging) { ctxAnim.Visible = false; ctxTextures.Visible = false; } this.instance = instance; this.instance.ClientChanged += new EventHandler <ClientChangedEventArgs>(instance_ClientChanged); if (instance.GlobalSettings["chat_font_size"].Type != OSDType.Real) { instance.GlobalSettings["chat_font_size"] = OSD.FromReal(cbxInput.Font.Size); } instance.GlobalSettings.OnSettingChanged += new Settings.SettingChangedCallback(GlobalSettings_OnSettingChanged); // Callbacks netcom.ClientLoginStatus += new EventHandler <LoginProgressEventArgs>(netcom_ClientLoginStatus); netcom.ClientLoggedOut += new EventHandler(netcom_ClientLoggedOut); RegisterClientEvents(client); chatManager = new ChatTextManager(instance, new RichTextBoxPrinter(rtbChat)); chatManager.PrintStartupMessage(); this.instance.MainForm.Load += new EventHandler(MainForm_Load); lvwObjects.ListViewItemSorter = new SorterClass(instance); cbChatType.SelectedIndex = 1; UpdateFontSize(); }
public ChatConsole(RadegastInstance instance) { InitializeComponent(); Disposed += new EventHandler(ChatConsole_Disposed); if (!instance.advancedDebugging) { ctxAnim.Visible = false; ctxTextures.Visible = false; } this.instance = instance; this.instance.ClientChanged += new EventHandler<ClientChangedEventArgs>(instance_ClientChanged); if (instance.GlobalSettings["chat_font_size"].Type != OSDType.Real) { instance.GlobalSettings["chat_font_size"] = OSD.FromReal(cbxInput.Font.Size); } instance.GlobalSettings.OnSettingChanged += new Settings.SettingChangedCallback(GlobalSettings_OnSettingChanged); // Callbacks netcom.ClientLoginStatus += new EventHandler<LoginProgressEventArgs>(netcom_ClientLoginStatus); netcom.ClientLoggedOut += new EventHandler(netcom_ClientLoggedOut); RegisterClientEvents(client); chatManager = new ChatTextManager(instance, new RichTextBoxPrinter(rtbChat)); chatManager.PrintStartupMessage(); this.instance.MainForm.Load += new EventHandler(MainForm_Load); lvwObjects.ListViewItemSorter = new SorterClass(instance); cbChatType.SelectedIndex = 1; UpdateFontSize(); }
void ChatConsole_Disposed(object sender, EventArgs e) { instance.ClientChanged -= new EventHandler<ClientChangedEventArgs>(instance_ClientChanged); netcom.ClientLoginStatus -= new EventHandler<LoginProgressEventArgs>(netcom_ClientLoginStatus); netcom.ClientLoggedOut -= new EventHandler(netcom_ClientLoggedOut); UnregisterClientEvents(client); chatManager.Dispose(); chatManager = null; }