Example #1
0
 internal bool  Add(MailCount x)
 {
     a.Add(x);
     if (c != null)
     {
         c(x);
     }
     return(Save());
 }
Example #2
0
        public void Add(string to)
        {
            var x = new MailCount()
            {
                user = to
            };

            To.Add(x);
        }
Example #3
0
        public bool Add(string name, string usr, string pwd, Host host)
        {
            var x = new MailCount()
            {
                name = name, user = usr, pwd = pwd, code = host.code
            };

            return(Add(x));
        }
Example #4
0
 private void UpdateBoxes()
 {
     if (mail == null)
     {
         mail = new MailCount();
     }
     host.SelectedItem = this.mail.Host;
     this.email.Text   = mail.user;
     this.pwd.Text     = mail.pwd;
     this.name.Text    = mail.name;
 }
Example #5
0
 private void Save_Click(object sender, EventArgs e)
 {
     if (mail == null)
     {
         mail = new MailCount();
     }
     _Save();
     if (!counts.Contains(mail))
     {
         counts.Add(mail);
     }
     Close();
 }
Example #6
0
        public bool Remove(MailCount h)
        {
            var i = a.IndexOf(h);

            if (i == -1)
            {
                return(true);
            }
            a.RemoveAt(i);
            if (r != null)
            {
                r(h, i);
            }
            return(true);
        }
Example #7
0
        private void _Save()
        {
            if (mail == null)
            {
                mail = new MailCount();
            }
            this.mail.Host = (Host)host.SelectedItem;
            if (mail.Host != null)
            {
                this.mail.code = mail.Host.code;
            }
            else
            {
                Message("Host Not Selected");
            }

            mail.user = this.email.Text;
            mail.pwd  = this.pwd.Text;
            mail.name = this.name.Text;
        }
Example #8
0
 void counts_Created(MailCount obj)
 {
     UpdateFT();
 }
Example #9
0
 void counts_Removed(MailCount arg1, int arg2)
 {
     UpdateFT();
 }
Example #10
0
 public void Add(MailCount to)
 {
     To.Add(to);
 }
Example #11
0
 public void AddTo(MailCount f)
 {
     To.Add(new MailAddress(f.user, f.name));
 }
Example #12
0
 public void SetFrom(MailCount f)
 {
     From = f;
     from = new MailAddress(f.user, f.name);
 }
Example #13
0
 public User(MailCount mc) : this()
 {
     mail = mc;
     UpdateBoxes();
 }
Example #14
0
 internal bool Contains(MailCount mail)
 {
     return(a.Contains(mail));
 }
Example #15
0
 internal static Host GetHost(MailCount From)
 {
     throw new NotImplementedException();
 }