Inheritance: IDisposable
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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;
 }