Cleanup() public static method

Clears all views.
public static Cleanup ( ) : void
return void
Example #1
0
        private void ChangeSettings(Settings settings, bool isPathChanged, bool isResolutionChanged)
        {
            this.settingsRepository.UpdateCurrentSettings(settings);

            if (isResolutionChanged)
            {
                ImageQuestionData.CurrentResolution = this.SelectedResolution;
            }

            GpsTracker.Instance.GpsAllowed = settings.IsGpsEnabled;

            this.Refresh();

            if (isPathChanged)
            {
                Membership.ResetCurrentUser();
                string navigationSource = string.Format(LOGIN_SOURCE, this.serverPath);
                NavigationProvider.Navigate(new System.Uri(navigationSource, System.UriKind.Relative));
                Locator.Cleanup();
            }
        }
Example #2
0
 private void OnDialogCompleted(object sender, ConfirmationResulEventArgs e)
 {
     if (e.DialogResult == Coding4Fun.Phone.Controls.PopUpResult.Ok)
     {
         this.currentSettings = settingsRepository.ResetCurrentSettings();
         bool isServicePathChanged = this.currentSettings.Server.Address != this.ServerPath;
         SyncContext.Post((parameter) =>
         {
             if (isServicePathChanged)
             {
                 Membership.ResetCurrentUser();
                 string navigationSource = string.Format(LOGIN_SOURCE, this.currentSettings.Server.Address);
                 NavigationProvider.Navigate(new System.Uri(navigationSource, System.UriKind.Relative));
                 Locator.Cleanup();
             }
             else
             {
                 this.Refresh();
             }
         }, null);
     }
 }