/*** Public Methods ****************************************************************************************************/

        /// <summary>
        /// Reset App to various states using parameter enumResetApp.
        /// </summary>
        /// <param name="enumResetApp">Enum used to reset App setup values.</param>
        public void AppReset(EnumResetApp enumResetApp)
        {
            switch (enumResetApp)
            {
            case EnumResetApp.DoNothing:                    // Do nothing. Most common so exit quick.
                break;

            case EnumResetApp.ResetApp:                     // Clear all data store settings.
                applicationDataContainer.Values.Clear();
                break;

            case EnumResetApp.ResetPurchaseHistory:         // Clear App purchase history forcing a new purchase check.
                applicationDataContainer.Values.Remove(ds_BoolAppPurchased);
                boolAppPurchased = false;
                break;

            case EnumResetApp.ResetRateHistory:             // Clear App rate history.
                applicationDataContainer.Values.Remove(ds_BoolAppRated);
                boolAppRated = false;
                break;

            case EnumResetApp.ShowDataStoreValues:          // Show data store values via Debug.
                LibMPC.ListDataStoreItems(applicationDataContainer);
                break;

            case EnumResetApp.ResetLockerFolder:            // Reset Locker folder location.
                applicationDataContainer.Values.Remove(ds_BoolLockerFolderSelected);
                boolLockerFolderSelected = false;
                FrameMP.Navigate(typeof(SetupFolder));
                FrameMP.BackStack.Clear();                  // Clear page navigation history.
                break;

            case EnumResetApp.ResetFirstRunHistory:         // Clear App first run history so sample CheckBox in page SetupFolder() will be checked.
                applicationDataContainer.Values.Remove(ds_BoolFirstRun);
                applicationDataContainer.Values.Remove(ds_BoolCboxSamples);
                break;

            default:        // Throw exception so error can be discovered and corrected.
                throw new NotSupportedException($"MainPage.AppReset(): enumResetApp={enumResetApp} not found in switch statement.");
            }
        }
Exemple #2
0
        /*** Public Methods ****************************************************************************************************/

        /// <summary>
        /// Navigate to page Start and clear back history.
        /// </summary>
        public void NavigateToPageStart()
        {
            FrameMP.Navigate(typeof(Start));
            FrameMP.BackStack.Clear();
        }
 /// <summary>
 /// Navigate to page Settings().
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ButSettings_Click(object sender, RoutedEventArgs e)
 {
     _ = sender;     // Discard unused parameter.
     _ = e;          // Discard unused parameter.
     FrameMP.Navigate(typeof(Settings));
 }
 /// <summary>
 /// Navigate to page AboutToggles.
 /// </summary>
 public void ShowPageAboutToggles()
 {
     FrameMP.Navigate(typeof(AboutToggles));
 }
 /// <summary>
 /// Navigate to page HomePage.
 /// </summary>
 public void ShowPageHomePage()
 {
     FrameMP.Navigate(typeof(HomePage));
     FrameMP.BackStack.Clear();      // Clear navigation history after navigating from pages SetupPassword and EnterPassword.
 }
 /// <summary>
 /// Navigate to page EnterPassword.
 /// </summary>
 public void ShowPageEnterPassword()
 {
     FrameMP.Navigate(typeof(EnterPassword));
     FrameMP.BackStack.Clear();      // Clear navigation history.
 }
 /// <summary>
 /// Navigate to page SetupFolder.
 /// </summary>
 public void ShowPageSetupFolder()
 {
     FrameMP.Navigate(typeof(SetupFolder));
     FrameMP.BackStack.Clear();      // Clear navigation history.
 }
 /// <summary>
 /// Navigate to page Home.
 /// </summary>
 public void ShowPageHome()
 {
     FrameMP.Navigate(typeof(Home));
     FrameMP.BackStack.Clear();      // Clear navigation history after arriving at page Home.
 }
 /// <summary>
 /// Navigate to page DisplaySimulatedLoads.
 /// </summary>
 public void ShowPageDisplaySimulatedLoads()
 {
     FrameMP.Navigate(typeof(DisplaySimulatedLoads));
 }
 /// <summary>
 /// Navigate to page DisplayResults.
 /// </summary>
 public void ShowPageDisplayResults()
 {
     FrameMP.Navigate(typeof(DisplayResults));
 }
 /// <summary>
 /// Navigate to page EnterLoadsUniform.
 /// </summary>
 public void ShowPageEnterLoadsUniform()
 {
     FrameMP.Navigate(typeof(EnterLoadsUniform));
 }
 /// <summary>
 /// Navigate to page EnterLoadsConcentrated.
 /// </summary>
 public void ShowPageEnterLoadsConcentrated()
 {
     FrameMP.Navigate(typeof(EnterLoadsConcentrated));
 }
 /// <summary>
 /// Navigate to page EnterSupports.
 /// </summary>
 public void ShowPageEnterSupports()
 {
     FrameMP.Navigate(typeof(EnterSupports));
 }
 /// <summary>
 /// Navigate to page EnterBeamProperties.
 /// </summary>
 public void ShowPageEnterBeamProperties()
 {
     FrameMP.Navigate(typeof(EnterBeamProperties));
 }
Exemple #15
0
 /// <summary>
 /// Navigate to page About.
 /// </summary>
 public void NavigateToPageAbout()
 {
     FrameMP.Navigate(typeof(About));
 }
Exemple #16
0
 /// <summary>
 /// Navigate to page ShowBars.
 /// </summary>
 public void NavigateToPageShowBars()
 {
     FrameMP.Navigate(typeof(ShowBars));
 }
Exemple #17
0
        /*** Public Methods ****************************************************************************************************/

        /// <summary>
        /// Navigate to page Conversions.
        /// </summary>
        public void NavigateToPageConversions()
        {
            FrameMP.Navigate(typeof(Conversions));  // Navigate to page Conversions.
            FrameMP.BackStack.Clear();              // Clear page navigation history.
        }