Ejemplo n.º 1
0
 public void Load(IDraftMailSource source)
 {
     mSource = source;
     Account = source.Account;
     Subject = source.Subject;
     IsReply = source.IsReply;
     Body    = source.Body;
     Recipients.Clear();
     foreach (var i in source.Recipients)
     {
         Recipients.Add(new DraftMailRecipient(i));
     }
 }
Ejemplo n.º 2
0
        public void Save(IDraftMailSource source = null)
        {
            if (source != null)
            {
                mSource = source;
            }
            List <UserCache.EntityInfo> list = new List <UserCache.EntityInfo>(Recipients.Count);

            foreach (var i in Recipients)
            {
                if (i.IsValid)
                {
                    list.Add(i.ToEntityInfo());
                }
            }

            mSource.Recipients = list.ToArray();

            mSource.Account = Account;
            mSource.Subject = Subject ?? "";
            mSource.IsReply = IsReply;
            mSource.Body    = Body ?? "";
            mSource.NotifySaved();
        }
Ejemplo n.º 3
0
 public DraftMail(IDraftMailSource source)
     : this()
 {
     Load(source);
 }