Inheritance: IDisposable
Exemple #1
0
        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);
        }
Exemple #2
0
 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;
 }
Exemple #3
0
        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;
        }
Exemple #4
0
        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();
        }
Exemple #5
0
        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;
        }
Exemple #6
0
        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();
        }
Exemple #7
0
 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;
 }