Exemplo n.º 1
0
 public void AddRcver()
 {
     if (this.rcverText == null || this.rcverText.Trim().Equals(string.Empty))
     {
         this.Hint = "添加收件人时,不能为空!";
     }
     else
     {
         NotesAddress addr = new NotesAddress();
         addr.NotesAlias = this.rcverText;
         addr.NotesName  = "";
         this.RcverList.Add(addr);
         this.RcverText = "";
     }
 }
Exemplo n.º 2
0
 public void Add()
 {
     if (this.address == null || this.address.Trim().Equals(string.Empty) ||
         this.name == null || this.name.Trim().Equals(string.Empty))
     {
         this.Hint = "姓名、Notes地址不能为空!";
     }
     else
     {
         NotesAddress item = new NotesAddress();
         item.NotesAlias = this.name.Trim();
         item.NotesName  = this.address.Trim();
         this.ContactList.Add(item);
         config.ListNotesAddr = this.contactList.ToList();
         config.WriteConfigToFile();
         this.Hint    = "Notes联系人保存成功!";
         this.Address = "";
         this.Name    = "";
     }
 }
Exemplo n.º 3
0
        public void AddNotes()
        {
            if (this.notesTempRcver == null || this.notesTempRcver.Trim().Equals(string.Empty))
            {
                this.Hint = "临时收件人不能为空!";
                return;
            }
            if (this.NotesOptions == null)
            {
                this.NotesOptions = new ObservableCollection <NotesGroupOption>();
            }

            NotesAddress addr = new NotesAddress();

            addr.NotesName = this.notesTempRcver.Trim();
            NotesGroupOption op = new NotesGroupOption(addr);

            op.IsSelected = true;
            this.NotesOptions.Add(op);
            this.NotesTempRcver = "";
        }
Exemplo n.º 4
0
 public NotesGroupOption(NotesAddress addr)
 {
     this.Address    = addr;
     this.IsSelected = false;
 }