/// <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(); }
/// <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); } }
/// <summary> /// Remove a UIMessageGroup from the Message UI. /// </summary> public void RemoveMessageGroup(UIMessageGroup grp) { MessageWindows.Remove(grp); Remove(grp); ReorderIcons(); }
/// <summary> /// Remove a UIMessageGroup from the Message UI. /// </summary> public void RemoveMessageGroup(UIMessageGroup grp) { MessageWindows.Remove(grp); this.Remove(grp); ReorderIcons(); }
/// <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); }
/// <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(); }