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

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

            SessionId = session;

            TextManager = new IMTextManager(this.instance, new RichTextBoxPrinter(rtbIMText), IMTextManagerType.Conference, SessionId, 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);
            }

            GUI.GuiHelpers.ApplyGuiFixes(this);
        }
Exemplo n.º 2
0
        public ConferenceIMTabWindow(RadegastInstance 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);
            }

            Radegast.GUI.GuiHelpers.ApplyGuiFixes(this);
        }
Exemplo n.º 3
0
 public void CleanUp()
 {
     instance.TabConsole.RemoveTab(SessionId.ToString());
     textManager.CleanUp();
     textManager = null;
     RemoveNetcomEvents();
 }
Exemplo n.º 4
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);
        }
Exemplo n.º 5
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))
                {
                    if (fontSettings.ContainsKey("History"))
                    {
                        var fontSetting = fontSettings["History"];
                        textPrinter.ForeColor = fontSetting.ForeColor;
                        textPrinter.BackColor = fontSetting.BackColor;
                        textPrinter.Font      = fontSetting.Font;
                    }
                    else
                    {
                        textPrinter.ForeColor = SystemColors.GrayText;
                        textPrinter.BackColor = Color.Transparent;
                        textPrinter.Font      = Settings.FontSetting.DefaultFont;
                    }
                    textPrinter.PrintTextLine(msg);
                }
            }

            if (fontSettings.ContainsKey("History"))
            {
                var fontSetting = fontSettings["History"];
                textPrinter.ForeColor = fontSetting.ForeColor;
                textPrinter.BackColor = fontSetting.BackColor;
                textPrinter.Font      = fontSetting.Font;
            }
            else
            {
                textPrinter.ForeColor = SystemColors.GrayText;
                textPrinter.BackColor = Color.Transparent;
                textPrinter.Font      = Settings.FontSetting.DefaultFont;
            }
            textPrinter.PrintTextLine("====");
        }
Exemplo n.º 6
0
        public IMTabWindow(RadegastInstance 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();
        }
Exemplo n.º 7
0
        public IMTabWindow(RadegastInstance instance, UUID target, UUID session, string toName)
        {
            InitializeComponent();
            Disposed += new EventHandler(IMTabWindow_Disposed);

            this.instance = instance;

            this.target = target;
            SessionId   = session;
            TargetName  = toName;

            TextManager = new IMTextManager(this.instance, new RichTextBoxPrinter(rtbIMText), IMTextManagerType.Agent, SessionId, toName);

            AddNetcomEvents();

            GUI.GuiHelpers.ApplyGuiFixes(this);
        }
Exemplo n.º 8
0
        public IMTabWindow(RadegastInstance 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();
        }
Exemplo n.º 9
0
        public GroupIMTabWindow(RadegastInstance 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);
        }
Exemplo n.º 10
0
        public GroupIMTabWindow(RadegastInstance 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);
        }
Exemplo n.º 11
0
 public void CleanUp()
 {
     textManager.CleanUp();
     textManager = null;
     instance = null;
 }
Exemplo n.º 12
0
 public void CleanUp()
 {
     instance.TabConsole.RemoveTab(SessionId.ToString());
     textManager.CleanUp();
     textManager = null;
     RemoveNetcomEvents();
 }
Exemplo n.º 13
0
 public void CleanUp()
 {
     textManager.CleanUp();
     textManager = null;
     instance    = null;
 }