Beispiel #1
0
        public override void MountView()
        {
            if (!wasInit)
            {
                _translationUpdater.RegisterAndSetTranslation(tf => SetTokenViewModels(_tokenViewModelFactory));
                wasInit = true;
            }

            _currentSettingsProvider.SelectedProfileChanged += OnCurrentSettingsProviderOnSelectedProfileChanged;

            _timeServerAccounts = _accountsProvider?.Settings.TimeServerAccounts;
            if (_timeServerAccounts != null)
            {
                TimeServerAccountsView = new ListCollectionView(_timeServerAccounts);
                TimeServerAccountsView.SortDescriptions.Add(new SortDescription(nameof(TimeServerAccount.AccountInfo), ListSortDirection.Ascending));
            }

            if (Signature != null)
            {
                AskForPasswordLater = string.IsNullOrEmpty(Password);
            }

            SignReasonTokenViewModel.MountView();
            SignContactTokenViewModel.MountView();
            SignLocationTokenViewModel.MountView();
            EditTimeServerAccountCommand.MountView();

            base.MountView();
        }
Beispiel #2
0
        public override void UnmountView()
        {
            base.UnmountView();

            _currentSettingsProvider.SelectedProfileChanged -= OnCurrentSettingsProviderOnSelectedProfileChanged;
            SignReasonTokenViewModel?.UnmountView();
            SignContactTokenViewModel?.UnmountView();
            SignLocationTokenViewModel?.UnmountView();
            EditTimeServerAccountCommand.UnmountView();
        }