Beispiel #1
0
        /// <summary>
        /// Initialises a new instance of the Skycap.Data.MailHeader class.
        /// </summary>
        /// <param name="emailAddress">The email address.</param>
        /// <param name="uid">The unique message id.</param>
        /// <param name="message">The mail message.</param>
        /// <param name="mailbox">The mailbox.</param>
        public MailHeader(string emailAddress, string uid, StructuredMessage message, Mailbox mailbox)
        {
            // Initialise local variables
            EmailAddress = emailAddress;
            Uid          = uid;
            Comments     = message.Header.Comments;
            Mailbox      = mailbox;
            MessagePath  = message.MessagePath;
            Date         = message.Date;
            From         = (message.From == null ? string.Empty : (string.IsNullOrEmpty(message.From.DisplayName) ? message.From.Address : message.From.DisplayName));
            Subject      = message.Header.Subject;
            IsSeen       = message.IsSeen;
            IsDeleted    = message.IsDeleted;
            AttachmentsImageVisibility = (message.Attachments.Count > 0 ? Visibility.Visible : Visibility.Collapsed);
            ImportanceVisibility       = (message.Header.Importance == MailImportance.Normal ? Visibility.Collapsed : Visibility.Visible);
            switch (message.Header.Importance)
            {
            case MailImportance.Low:
                ImportanceForeground = "Blue";
                break;

            case MailImportance.High:
                ImportanceForeground = "Red";
                break;

            default:
                ImportanceForeground = "Black";
                break;
            }
            IsFlagged     = message.IsFlagged;
            IsImapMessage = (message is ImapMessage);
        }
Beispiel #2
0
 /// <summary>
 /// Initialises a new instance of the Skycap.Net.Common.MessageEventArgs class.
 /// </summary>
 /// <param name="mailbox">The mailbox.</param>
 /// <param name="uid">The unique message id.</param>
 /// <param name="message">The message.</param>
 public MessageEventArgs(Mailbox mailbox, string uid, StructuredMessage message)
 {
     // Initialise local variables
     Mailbox = mailbox;
     Uid     = uid;
     Message = message;
 }
 /// <summary>
 /// Initialises a new instance of the Skycap.Data.MessageNavigationContext class.
 /// </summary>
 /// <param name="message">The message.</param>
 /// <param name="navigationContext">The navigation context.</param>
 public MessageNavigationContext(StructuredMessage message, NavigationContext navigationContext)
 {
     // Initialise local variables
     Message           = message;
     NavigationContext = navigationContext;
 }
Beispiel #4
0
 /// <summary>
 /// Updates the flags.
 /// </summary>
 /// <param name="message">The message.</param>
 public void UpdateFlags(StructuredMessage message)
 {
     IsDeleted = message.IsDeleted;
     IsFlagged = message.IsFlagged;
     IsSeen    = message.IsSeen;
 }