Ejemplo n.º 1
0
        internal Chat(PluginControl pc) : base(pc)
        {
            // We want to process incoming chat
            control.instance.Client.Self.ChatFromSimulator +=
                new EventHandler <ChatEventArgs>(OnChat);
            control.instance.Client.Self.AlertMessage +=
                new EventHandler <AlertMessageEventArgs>(OnAlertMessage);
            METAbolt.METAboltTab chatTab    = control.instance.TabConsole.Tabs["chat"];
            METAbolt.ChatConsole chatscreen = (METAbolt.ChatConsole)chatTab.Control;

            nearby = chatscreen.lvwObjects;
            nearby.SelectedIndexChanged += new EventHandler(nearby_SelectedIndexChanged);

            nearby.GotFocus += new EventHandler(nearby_GotFocus);
            chatscreen.ChatInputText.GotFocus += new EventHandler(cbxInput_GotFocus);

            Title = "chat";

            // Make a recognition grammar to improve accuracy.
            Listener.CreateGrammar("chat",
                                   new string[] {
                MUTE_OBJECTS,
                UNMUTE_OBJECTS
            });
        }
Ejemplo n.º 2
0
        private void button3_Click(object sender, EventArgs e)
        {
            ChatConsole console = new ChatConsole(instance);

            console._textBox = _textBox1;
            //console.Show();
        }
Ejemplo n.º 3
0
        void UpdateFontSize()
        {
            float size = (float)instance.GlobalSettings["chat_font_size"].AsReal();

            cbxInput.Font  = ChatConsole.ChangeFontSize(cbxInput.Font, size);
            rtbIMText.Font = ChatConsole.ChangeFontSize(rtbIMText.Font, size);
            textManager.ReprintAllText();
        }
Ejemplo n.º 4
0
        private void InitializeChatTab()
        {
            chatConsole    = new ChatConsole(instance);
            mainChatManger = chatConsole.ChatManager;

            METAboltTab tab = AddTab("chat", "Chat", chatConsole);

            tab.AllowClose  = false;
            tab.AllowDetach = false;
            tab.AllowHide   = false;
        }
Ejemplo n.º 5
0
        void UpdateFontSize()
        {
            float size = (float)instance.GlobalSettings["chat_font_size"].AsReal();

            if (size < 2f || size > 100f)
            {
                size = 9f;
            }
            cbxInput.Font = ChatConsole.ChangeFontSize(cbxInput.Font, size);
            rtbChat.Font  = ChatConsole.ChangeFontSize(rtbChat.Font, size);
            chatManager.ReprintAllText();
        }
Ejemplo n.º 6
0
        public void Dispose()
        {
            control.instance.Client.Self.ChatFromSimulator -=
                new EventHandler <ChatEventArgs>(OnChat);
            control.instance.Client.Self.AlertMessage -=
                new EventHandler <AlertMessageEventArgs>(OnAlertMessage);

            if (control.instance.TabConsole != null && control.instance.TabConsole.TabExists("chat"))
            {
                METAbolt.METAboltTab chatTab    = control.instance.TabConsole.Tabs["chat"];
                METAbolt.ChatConsole chatscreen = (METAbolt.ChatConsole)chatTab.Control;

                nearby = chatscreen.lvwObjects;
                nearby.SelectedIndexChanged -= new EventHandler(nearby_SelectedIndexChanged);

                nearby.GotFocus -= new EventHandler(nearby_GotFocus);
                chatscreen.ChatInputText.GotFocus -= new EventHandler(cbxInput_GotFocus);
            }

            nearby = null;
        }
Ejemplo n.º 7
0
        private void InitializeChatTab()
        {
            if (InvokeRequired)
            {
                this.BeginInvoke(new MethodInvoker(delegate()
                {
                    InitializeChatTab();
                }));

                return;
            }

            chatConsole = new ChatConsole(instance);
            chatConsole.Dock = DockStyle.Fill;
            chatConsole.Visible = false;

            toolStripContainer1.ContentPanel.Controls.Add(chatConsole);

            METAboltTab tab = AddTab("chat", "Chat", chatConsole);
            tab.AllowClose = false;
            tab.AllowDetach = false;

            ToolStripItem item = new ToolStripSeparator();

            tstTabs.Items.Add(item);
        }
Ejemplo n.º 8
0
 private void button3_Click(object sender, EventArgs e)
 {
     ChatConsole console = new ChatConsole(instance);
     console._textBox = _textBox1;
     //console.Show();
 }