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

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