Inheritance: FSO.Client.UI.Framework.UIContainer
示例#1
0
        /// <summary>
        /// Opens mail without the confirmation dialog. Use when manually opening mail from the inbox.
        /// </summary>
        public void OpenEmail(MessageAuthor sender, string subject, string message)
        {
            bool GroupExisted = false;

            for (int i = 0; i < MessageWindows.Count; i++)
            {
                //Did conversation already exist?
                if (MessageWindows[i].name.Equals(sender.Author, StringComparison.InvariantCultureIgnoreCase))
                {
                    GroupExisted = true;
                    //MessageWindows[i].AddMessage(message);
                    break;
                }
            }

            if (!GroupExisted)
            {
                var group = new UIMessageGroup(UIMessageType.Read, sender, this);
                MessageWindows.Add(group);
                Add(group);

                group.SetEmail(subject, message);
            }

            ReorderIcons();
        }
示例#2
0
        /// <summary>
        /// Display an IM message in its currently open window. If there is no window, this will create a new one.
        /// </summary>
        public void PassMessage(MessageAuthor Sender, string Message)
        {
            UIMessageGroup group = GetMessageGroup(Sender.Author, UIMessageType.IM);

            if (group == null)
            {
                group = new UIMessageGroup(UIMessageType.IM, Sender, this);
                MessageWindows.Add(group);
                this.Add(group);
                ReorderIcons();
                group.Show(null);

                if (Message != null)
                {
                    HITVM.Get().PlaySoundEvent(UISounds.CallRecieveFirst);
                }
            }
            else
            {
                HITVM.Get().PlaySoundEvent((soundAlt) ? UISounds.CallRecieve : UISounds.CallRecieveNext);
                soundAlt = !soundAlt;
            }

            if (Message != null)
            {
                group.AddMessage(Message);
            }
        }
示例#3
0
 /// <summary>
 /// Remove a UIMessageGroup from the Message UI.
 /// </summary>
 public void RemoveMessageGroup(UIMessageGroup grp)
 {
     MessageWindows.Remove(grp);
     Remove(grp);
     ReorderIcons();
 }
示例#4
0
 /// <summary>
 /// Remove a UIMessageGroup from the Message UI.
 /// </summary>
 public void RemoveMessageGroup(UIMessageGroup grp)
 {
     MessageWindows.Remove(grp);
     this.Remove(grp);
     ReorderIcons();
 }
示例#5
0
        /// <summary>
        /// Display an IM message in its currently open window. If there is no window, this will create a new one.
        /// </summary>
        public void PassMessage(MessageAuthor Sender, string Message)
        {
            UIMessageGroup group = GetMessageGroup(Sender.Author, UIMessageType.IM);
            if (group == null)
            {
                group = new UIMessageGroup(UIMessageType.IM, Sender, this);
                MessageWindows.Add(group);
                this.Add(group);
                ReorderIcons();
                group.Show(null);

                if (Message != null)
                {
                    HITVM.Get().PlaySoundEvent(UISounds.CallRecieveFirst);
                }
            }
            else
            {
                HITVM.Get().PlaySoundEvent((soundAlt) ? UISounds.CallRecieve : UISounds.CallRecieveNext);
                soundAlt = !soundAlt;
            }

            if (Message != null) group.AddMessage(Message);
        }
示例#6
0
        /// <summary>
        /// Opens mail without the confirmation dialog. Use when manually opening mail from the inbox.
        /// </summary>
        public void OpenEmail(MessageAuthor sender, string subject, string message)
        {
            bool GroupExisted = false;

            for (int i = 0; i < MessageWindows.Count; i++)
            {
                //Did conversation already exist?
                if (MessageWindows[i].name.Equals(sender.Author, StringComparison.InvariantCultureIgnoreCase))
                {
                    GroupExisted = true;
                    MessageWindows[i].AddMessage(message);
                    break;
                }
            }

            if (!GroupExisted)
            {
                var group = new UIMessageGroup(UIMessageType.Read, sender, this);
                MessageWindows.Add(group);
                this.Add(group);

                group.SetEmail(subject, message);
            }

            ReorderIcons();
        }