Esempio n. 1
0
        public IMTabWindow(METAboltInstance instance, UUID target, UUID session, string toName)
        {
            InitializeComponent();

            SetExceptionReporter();
            Application.ThreadException += new ThreadExceptionHandler().ApplicationThreadException;

            this.instance = instance;
            netcom = this.instance.Netcom;

            afffile = this.instance.AffFile = instance.Config.CurrentConfig.SpellLanguage + ".aff";   // "en_GB.aff";
            dicfile = this.instance.DictionaryFile = instance.Config.CurrentConfig.SpellLanguage + ".dic";   // "en_GB.dic";

            this.target = target;
            this.session = session;
            this.toName = toName;
            tab = instance.TabConsole;

            textManager = new IMTextManager(this.instance, new RichTextBoxPrinter(instance, rtbIMText), this.session, this.toName);
            this.Disposed += new EventHandler(IMTabWindow_Disposed);

            AddNetcomEvents();

            tsbTyping.ToolTipText = toName + " is typing";

            ApplyConfig(this.instance.Config.CurrentConfig);
            this.instance.Config.ConfigApplied += new EventHandler<ConfigAppliedEventArgs>(Config_ConfigApplied);

            CreateSmileys();

            if (this.instance.IMHistyoryExists(this.toName, false))
            {
                toolStripButton2.Enabled = true;
            }

            tbtnProfile.ToolTipText = toName + "'s Profile";
        }
Esempio n. 2
0
        public IMTabWindowGroup(METAboltInstance instance, UUID session, UUID target, string toName, OpenMetaverse.Group grp)
        {
            InitializeComponent();

            SetExceptionReporter();
            Application.ThreadException += new ThreadExceptionHandler().ApplicationThreadException;

            label1.Text = "Starting session with " + grp.Name + " please wait...";
            label1.Visible = true;

            this.instance = instance;
            netcom = this.instance.Netcom;
            client = this.instance.Client;

            afffile = this.instance.AffFile = instance.Config.CurrentConfig.SpellLanguage + ".aff";   // "en_GB.aff";
            dicfile = this.instance.DictionaryFile = instance.Config.CurrentConfig.SpellLanguage + ".dic";   // "en_GB.dic";

            this.target = target;
            this.session = session;
            //this.session = client.Self..AgentID ^ grp.ID;
            this.toName = toName;
            this.imgroup = grp;
            tab = instance.TabConsole;

            WaitForSessionStart.Reset();

            textManager = new IMTextManager(this.instance, new RichTextBoxPrinter(instance, rtbIMText), this.session, toName, grp);
            this.Disposed += new EventHandler(IMTabWindow_Disposed);

            AddNetcomEvents();

            ApplyConfig(this.instance.Config.CurrentConfig);
            this.instance.Config.ConfigApplied += new EventHandler<ConfigAppliedEventArgs>(Config_ConfigApplied);

            //people = new SafeDictionary<UUID, string>();

            client.Self.GroupChatJoined += new EventHandler<GroupChatJoinedEventArgs>(Self_OnGroupChatJoin);
            client.Self.ChatSessionMemberAdded += new EventHandler<ChatSessionMemberAddedEventArgs>(Self_OnChatSessionMemberAdded);
            client.Self.ChatSessionMemberLeft += new EventHandler<ChatSessionMemberLeftEventArgs>(Self_OnChatSessionMemberLeft);
            client.Avatars.UUIDNameReply += new EventHandler<UUIDNameReplyEventArgs>(Avatars_OnAvatarNames);

            client.Self.RequestJoinGroupChat(session);
            CreateSmileys();

            if (this.instance.IMHistyoryExists(this.toName, true))
            {
                toolStripButton2.Enabled = true;
            }
        }
Esempio n. 3
0
 public void CleanUp()
 {
     this.cbxInput.Text = string.Empty;
     instance.TabConsole.RemoveTabEntry(SessionId.ToString());
     textManager.CleanUp();
     textManager = null;
     target = UUID.Zero;
     RemoveNetcomEvents();
 }
Esempio n. 4
0
        public void CleanUp()
        {
            //
            client.Self.GroupChatJoined -= new EventHandler<GroupChatJoinedEventArgs>(Self_OnGroupChatJoin);
            client.Self.ChatSessionMemberAdded -= new EventHandler<ChatSessionMemberAddedEventArgs>(Self_OnChatSessionMemberAdded);
            client.Self.ChatSessionMemberLeft -= new EventHandler<ChatSessionMemberLeftEventArgs>(Self_OnChatSessionMemberLeft);
            client.Avatars.UUIDNameReply -= new EventHandler<UUIDNameReplyEventArgs>(Avatars_OnAvatarNames);

            this.instance.Config.ConfigApplied -= new EventHandler<ConfigAppliedEventArgs>(Config_ConfigApplied);
            textManager.CleanUp();
            textManager = null;
            people = null;
            RemoveNetcomEvents();
        }