Ejemplo n.º 1
0
        public ConferenceIMTabWindow(METAboltInstance instance, UUID session, string sessionName)
        {
            InitializeComponent();
            Disposed += new EventHandler(IMTabWindow_Disposed);

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

            this.session = session;

            textManager = new IMTextManager(this.instance, new RichTextBoxPrinter(rtbIMText), IMTextManagerType.Conference, this.session, sessionName);

            // Callbacks
            netcom.ClientLoginStatus  += new EventHandler <LoginProgressEventArgs>(netcom_ClientLoginStatus);
            netcom.ClientDisconnected += new EventHandler <DisconnectedEventArgs>(netcom_ClientDisconnected);
            instance.GlobalSettings.OnSettingChanged += new Settings.SettingChangedCallback(GlobalSettings_OnSettingChanged);

            if (!client.Self.GroupChatSessions.ContainsKey(session))
            {
                client.Self.ChatterBoxAcceptInvite(session);
            }

            UpdateFontSize();
        }
Ejemplo n.º 2
0
 public void CleanUp()
 {
     instance.TabConsole.RemoveTab(SessionId.ToString());
     textManager.CleanUp();
     textManager = null;
     RemoveNetcomEvents();
 }
Ejemplo n.º 3
0
        private void PrintLastLog()
        {
            string last = string.Empty;

            try
            {
                last = IMTextManager.ReadEndTokens(instance.ChatFileName(sessionName + ".txt"), 20, Encoding.UTF8, Environment.NewLine);
            }
            catch { }

            if (string.IsNullOrEmpty(last))
            {
                return;
            }

            string[] lines = last.Split(Environment.NewLine.ToCharArray());
            for (int i = 0; i < lines.Length; i++)
            {
                string msg = lines[i].Trim();
                if (!string.IsNullOrEmpty(msg))
                {
                    textPrinter.PrintTextLine(msg, SystemColors.GrayText);
                }
            }

            textPrinter.PrintTextLine("====", SystemColors.GrayText);
        }
Ejemplo n.º 4
0
 public void CleanUp()
 {
     this.cbxInput.Text = string.Empty;
     instance.TabConsole.RemoveTabEntry(SessionId.ToString());
     textManager.CleanUp();
     textManager = null;
     target      = UUID.Zero;
     RemoveNetcomEvents();
 }
Ejemplo n.º 5
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();
        }
Ejemplo n.º 6
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;
            }
        }
Ejemplo n.º 7
0
        public IMTabWindow(METAboltInstance instance, UUID target, UUID session, string toName)
        {
            InitializeComponent();
            Disposed += new EventHandler(IMTabWindow_Disposed);

            this.instance = instance;

            this.target  = target;
            this.session = session;
            this.toName  = toName;

            textManager = new IMTextManager(this.instance, new RichTextBoxPrinter(rtbIMText), IMTextManagerType.Agent, this.session, toName);

            AddNetcomEvents();

            UpdateFontSize();
        }
Ejemplo n.º 8
0
        public GroupIMTabWindow(METAboltInstance instance, UUID session, string sessionName)
        {
            InitializeComponent();
            Disposed += new EventHandler(IMTabWindow_Disposed);

            this.instance = instance;
            this.session  = session;

            textManager = new IMTextManager(this.instance, new RichTextBoxPrinter(rtbIMText), IMTextManagerType.Group, this.session, sessionName);

            btnShow.Text = "Show";
            chatSplit.Panel2Collapsed = true;

            // Callbacks
            RegisterClientEvents(client);
            if (!client.Self.GroupChatSessions.ContainsKey(session))
            {
                client.Self.RequestJoinGroupChat(session);
            }
            UpdateFontSize();
            Load += new EventHandler(GroupIMTabWindow_Load);
        }
Ejemplo n.º 9
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";
        }
Ejemplo n.º 10
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";
        }
Ejemplo n.º 11
0
 public void CleanUp()
 {
     this.cbxInput.Text = string.Empty;
     instance.TabConsole.RemoveTabEntry(SessionId.ToString());
     textManager.CleanUp();
     textManager = null;
     target = UUID.Zero;
     RemoveNetcomEvents();
 }
Ejemplo n.º 12
0
 public void CleanUp()
 {
     textManager.CleanUp();
     textManager = null;
     instance    = null;
 }
Ejemplo n.º 13
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;
            }
        }
Ejemplo n.º 14
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();
        }