public void GroupChange() { this.EmailOptions = new ObservableCollection <EmailGroupOption>(); foreach (var item in this.SelectGroupItem.ListEmail) { EmailGroupOption op = new EmailGroupOption(item); op.IsSelected = true; this.EmailOptions.Add(op); } this.NotesOptions = new ObservableCollection <NotesGroupOption>(); foreach (var item in this.SelectGroupItem.ListNotes) { NotesGroupOption op = new NotesGroupOption(item); op.IsSelected = true; this.NotesOptions.Add(op); } this.FtpOptions = new ObservableCollection <FtpGroupOption>(); foreach (var item in this.SelectGroupItem.ListFtp) { FtpGroupOption op = new FtpGroupOption(item); op.IsSelected = true; this.FtpOptions.Add(op); } this.LanOptions = new ObservableCollection <LanGroupOption>(); foreach (var item in this.SelectGroupItem.ListLan) { LanGroupOption op = new LanGroupOption(item); op.IsSelected = true; this.LanOptions.Add(op); } }
public void AddFtp() { if (this.ftpTempPath == null || this.ftpTempPath.Trim().Equals(string.Empty)) { this.Hint = "临时路径不能为空!"; return; } if (this.FtpOptions == null) { this.FtpOptions = new ObservableCollection <FtpGroupOption>(); } FtpAddress addr = new FtpAddress(); addr.FtpPath = this.ftpTempPath.Trim(); addr.FtpUserName = this.ftpUserName; addr.FtpPwd = this.ftpPwd; FtpGroupOption op = new FtpGroupOption(addr); op.IsSelected = true; this.FtpOptions.Add(op); this.FtpTempPath = ""; this.FtpUserName = ""; this.FtpPwd = ""; }
public void InitFtpInfo() { FtpAddressConfig config = new FtpAddressConfig(); this.FtpOptions = new ObservableCollection <FtpGroupOption>(); foreach (var item in config.ListFtpAddr) { var op = new FtpGroupOption(item); this.FtpOptions.Add(op); } }