Ejemplo n.º 1
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.º 2
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));
        }