Beispiel #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
            });
        }
Beispiel #2
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;
        }