Ejemplo n.º 1
0
        protected override void Add()
        {
            base.Add();
            var model = _CurrentAccount.Clone();

            AllAccounts.Add(model);
            AllAccountsFirms.Add(model);
            _CurrentAccount = model;
        }
Ejemplo n.º 2
0
 public DesignTimeAccountsViewModel() :
     base(new CurrentSettingsProvider(new DefaultSettingsProvider()), null, new DesignTimeCommandLocator(), new DesignTimeTranslationUpdater(), new DispatcherWrapper(), null)
 {
     AllAccounts.Add(new SmtpAccount {
         UserName = "******", Server = "SMTP.Server.org"
     });
     AllAccounts.Add(new DropboxAccount {
         AccountInfo = "Dropbox Account for UserName"
     });
     AllAccounts.Add(new FtpAccount {
         UserName = "******", Server = "FTP.Server.org"
     });
     AllAccounts.Add(new HttpAccount {
         UserName = "******", Url = "HTTP.Server.org"
     });
     AllAccounts.Add(new TimeServerAccount {
         UserName = "******", Url = "TimeServer.org"
     });
 }
Ejemplo n.º 3
0
        private void ConflateAllAccounts(PdfCreatorSettings settings)
        {
            _accounts = settings?.ApplicationSettings?.Accounts;

            if (_accounts == null)
            {
                return;
            }

            AllAccounts.Clear();

            _accounts.SmtpAccounts.CollectionChanged += RaiseAddAccountsBelowVisibilityChanged;
            AllAccounts.Add(new CollectionContainer {
                Collection = _accounts.SmtpAccounts
            });

            _accounts.DropboxAccounts.CollectionChanged += RaiseAddAccountsBelowVisibilityChanged;
            AllAccounts.Add(new CollectionContainer {
                Collection = _accounts.DropboxAccounts
            });

            _accounts.FtpAccounts.CollectionChanged += RaiseAddAccountsBelowVisibilityChanged;
            AllAccounts.Add(new CollectionContainer {
                Collection = _accounts.FtpAccounts
            });

            _accounts.HttpAccounts.CollectionChanged += RaiseAddAccountsBelowVisibilityChanged;
            AllAccounts.Add(new CollectionContainer {
                Collection = _accounts.HttpAccounts
            });

            _accounts.TimeServerAccounts.CollectionChanged += RaiseAddAccountsBelowVisibilityChanged;
            AllAccounts.Add(new CollectionContainer {
                Collection = _accounts.TimeServerAccounts
            });

            RaisePropertyChanged(nameof(AllAccounts));
        }
Ejemplo n.º 4
0
        private void ConflateAllAccounts()
        {
            if (Accounts == null)
            {
                return;
            }

            AllAccounts.Clear();

            Accounts.SmtpAccounts.CollectionChanged += RaiseAddAccountsBelowVisibilityChanged;
            AllAccounts.Add(new CollectionContainer {
                Collection = Accounts.SmtpAccounts
            });

            Accounts.DropboxAccounts.CollectionChanged += RaiseAddAccountsBelowVisibilityChanged;
            AllAccounts.Add(new CollectionContainer {
                Collection = Accounts.DropboxAccounts
            });

            Accounts.FtpAccounts.CollectionChanged += RaiseAddAccountsBelowVisibilityChanged;
            AllAccounts.Add(new CollectionContainer {
                Collection = Accounts.FtpAccounts
            });

            Accounts.HttpAccounts.CollectionChanged += RaiseAddAccountsBelowVisibilityChanged;
            AllAccounts.Add(new CollectionContainer {
                Collection = Accounts.HttpAccounts
            });

            Accounts.TimeServerAccounts.CollectionChanged += RaiseAddAccountsBelowVisibilityChanged;
            AllAccounts.Add(new CollectionContainer {
                Collection = Accounts.TimeServerAccounts
            });

            RaisePropertyChanged(nameof(AllAccounts));
        }