Ejemplo n.º 1
0
        private void HandleGroupIM(InstantMessageEventArgs e)
        {
            // Ignore group IM from a muted group
            if (null != client.Self.MuteList.Find(me => me.Type == MuteType.Group && (me.ID == e.IM.IMSessionID || me.ID == e.IM.FromAgentID)))
            {
                return;
            }

            if (TabExists(e.IM.IMSessionID.ToString()))
            {
                METAboltTab tab = tabs[e.IM.IMSessionID.ToString()];
                tab.Highlight();
                return;
            }

            instance.MediaManager.PlayUISound(UISounds.IM);

            Control active = FindFocusedControl(instance.MainForm);

            GroupIMTabWindow imTab = AddGroupIMTab(e.IM.IMSessionID, Utils.BytesToString(e.IM.BinaryBucket));

            imTab.TextManager.ProcessIM(e);
            tabs[e.IM.IMSessionID.ToString()].Highlight();

            if (active != null)
            {
                active.Focus();
            }
        }
Ejemplo n.º 2
0
        private void HandleIM(InstantMessageEventArgs e)
        {
            bool isNew = ShowIMTab(e.IM.FromAgentID, e.IM.FromAgentName, false);

            if (!TabExists(e.IM.IMSessionID.ToString()))
            {
                return;                                          // this should now exist. sanity check anyway
            }
            METAboltTab tab = tabs[e.IM.IMSessionID.ToString()];

            tab.Highlight();

            if (isNew)
            {
                ((IMTabWindow)tab.Control).TextManager.ProcessIM(e);
            }
        }
Ejemplo n.º 3
0
        private void HandleConferenceIM(InstantMessageEventArgs e)
        {
            if (TabExists(e.IM.IMSessionID.ToString()))
            {
                METAboltTab tab = tabs[e.IM.IMSessionID.ToString()];
                tab.Highlight();
                return;
            }

            instance.MediaManager.PlayUISound(UISounds.IM);

            Control active = FindFocusedControl(instance.MainForm);

            ConferenceIMTabWindow imTab = AddConferenceIMTab(e.IM.IMSessionID, Utils.BytesToString(e.IM.BinaryBucket));

            tabs[e.IM.IMSessionID.ToString()].Highlight();
            imTab.TextManager.ProcessIM(e);

            if (active != null)
            {
                active.Focus();
            }
        }