Ejemplo n.º 1
0
        protected override void HandleOnNavigatedTo(NavigationEventArgs e)
        {
            base.HandleOnNavigatedTo(e);
            if (!this._isInitialized)
            {
                this.RestorePageUnboundState();
                this._de.AddToDelayedExecution(delegate
                {
                    Execute.ExecuteOnUIThread(delegate
                    {
                        this.textBoxUsername.Focus();
                    });
                });
                base.DataContext    = (new ViewModelBase());
                this._isInitialized = true;
            }
            base.HandleValidationInputParams();

            //
            //base.HandleOnNavigatedTo(e);
            //base.DataContext = (new ViewModelBase());
            base.NavigationService.ClearBackStack();
            PushNotificationsManager.Instance.EnsureTheChannelIsClosed();
            AppGlobalStateManager.Current.HandleUserLogoutOrAuthorizationFailure();
            StickersSettings.Instance.Reset();
            SearchHintsUC.Reset();
            ContactsManager.Instance.DeleteAllContactsAsync();
            TileManager.Instance.UpdateTileWithCount(0, new Action(() => { }));
            NewsViewModel.Instance.Reset();
            WebBrowserExtensions.ClearCookiesAsync(new WebBrowser());
            BaseDataManager.Instance.NeedRefreshBaseData = true;
        }
Ejemplo n.º 2
0
 protected override void HandleOnNavigatedTo(NavigationEventArgs e)
 {
     base.HandleOnNavigatedTo(e);
     base.DataContext = (new ViewModelBase());
     base.NavigationService.ClearBackStack();
     PushNotificationsManager.Instance.EnsureTheChannelIsClosed();
     AppGlobalStateManager.Current.HandleUserLogoutOrAuthorizationFailure();
     StickersSettings.Instance.Reset();
     SearchHintsUC.Reset();
     ContactsManager.Instance.DeleteAllContactsAsync();
     TileManager.Instance.UpdateTileWithCount(0, new Action(() => { }));
     NewsViewModel.Instance.Reset();
     WebBrowserExtensions.ClearCookiesAsync(new WebBrowser());
     BaseDataManager.Instance.NeedRefreshBaseData = true;
 }