private void CboRepeat_OnSelectionChanged(object sender, SelectionChangedEventArgs e) { if (IsLoading) { return; } Reg.SaveSetting(Glob.Keys.CboRepeatSelectedIndex, CboRepeat.SelectedIndex); FindReadLoopTimes(); }
private void SliderImageSize_OnValueChanged(object sender, RangeBaseValueChangedEventArgs e) { if (IsLoading) { return; } SetImageAndInkCanvasSize(); Reg.SaveSetting(Glob.Keys.SliderImageSizeValue, SliderImageSize.Value); }
private void LearnModePage_Loaded(object sender, RoutedEventArgs e) { SharedNavigationController.ShowHideGrdLoading(true); IsLoading = false; SliderImageSize.Value = Reg.GetSetting(Glob.Keys.SliderImageSizeValue, 50); LoadCboRepeats(); CboRepeat.SelectedIndex = Reg.GetSetting(Glob.Keys.CboRepeatSelectedIndex, 0); SetImageAndInkCanvasSize(); TbJustForFocus.Focus(FocusState.Programmatic); SharedNavigationController.ShowHideGrdLoading(false); }
private async void BtnDeveloper_Click(object sender, RoutedEventArgs e) { var dialog = new InputBoxDialog(); await dialog.ShowAsync(); if (dialog.Result == null) { return; } var command = dialog.Result.ToLower(); switch (command) { case "done": timer.Stop(); ViewModel.NextItem = null; ViewModel.GoBackLearnPage(); break; case "notdone": timer.Stop(); ViewModel.NextItem = null; var playerName = LevelPageViewModel.GetCurrentPlayer(); var level = LevelPageViewModel.GetSelectedLevel(); var joinedWord = string.Concat(playerName, ".", level, ".", Constants.LearnPage, ".", Constants.LevelCompleted); Reg.SaveSetting(joinedWord, false); Glob.MainFrame.GoBack(); break; case "activate": //var activation = new Activation(); //var questionString = activation.GetQuestionString(); //dialog.Title = "Client-id: " + questionString; //dialog.ShowValue = questionString; //await dialog.ShowAsync(); //await activation.Activate(dialog.Result); break; case "cmdhelp": case "showhelp": await Glob.MsgBox_Async( "Warning: Improper usage will lead to failure of the app!" + Environment.NewLine + "Activate +5->*5->Pxx/sun/55786, deactivate/no55786" + Environment.NewLine + "isfreeforpromotion=true, isfreeforpromotion=false, " + Environment.NewLine + "cmd0/ratingnotdone, cmd5/ratingdone, xxx/del/deletesettings/delall, " + Environment.NewLine + "cmd6/easy/completefalse"); break; case "isfreeforpromotion=false": case "cmd9=false": //Reg.SaveSetting(Glob.Settings.IsFreeForPromotion, false); await Glob.MsgBox_Async("IsFreeForPromotion = false"); break; case "isfreeforpromotion=true": case "cmd9=true": //Reg.SaveSetting(Glob.Settings.IsFreeForPromotion, true); await Glob.MsgBox_Async("IsFreeForPromotion = true"); break; case "deactivate": case "no55786": //Reg.SaveSetting(AppData.Addon100Lessons, false); //Reg.SaveSetting(AppData.Addon200Lessons, false); //MyConstants.IsPro200 = MyConstants.IsPro100 = false; await Glob.MsgBox_Async("Successfully De-Activated! Restart the App if required."); break; case "ratingdone": case "cmd5": //Reg.SaveSetting(Glob.Settings.Rating, 5); //Reg.SaveSetting(Glob.Settings.hide_count, 100); //Reg.SaveSetting(Glob.Settings.SimpleRatingDone, true); await Glob.MsgBox_Async("Done!"); break; case "ratingnotdone": case "cmd0": //Reg.SaveSetting(Glob.Settings.Rating, 0); //Reg.SaveSetting(Glob.Settings.hide_count, 100); //Reg.SaveSetting(Glob.Settings.SimpleRatingDone, false); await Glob.MsgBox_Async("Done!"); break; case "delall": case "deletesettings": await ApplicationData.Current.ClearAsync(); CoreApplication.Exit(); break; case "del": case "xxx": await Reg.DeleteAllSettings(true); await ApplicationData.Current.ClearAsync(); CoreApplication.Exit(); break; case "completefalse": case "cmd6": case "easy": //Reg.SaveSetting(Glob.Settings.CompletePrevious, false); //bCompletePrevious = false; //await Glob.MsgBox_Async("Done! CompletePrevious = false"); break; case "nocompletefalse": case "nocmd6": case "noeasy": //Reg.SaveSetting(Glob.Settings.CompletePrevious, true); //bCompletePrevious = true; //await Glob.MsgBox_Async("Easy mode activated: Navigate to any lesson now"); break; case "sun": //Use it for Emergency case "55786": //Use it for Emergency case "checkpurchase": //Use it for Emergency //Reg.SaveSetting(AppData.Addon200Lessons, true); //Reg.SaveSetting(Glob.Settings.GivenFreeForActivationCode, true); //MyConstants.IsPro200 = true; //await Glob.MsgBox_Async("Successfully Activated! Thanks for purchasing. Restart the App if required."); break; case "sun-easy": //Use it for Emergency case "55786-easy": //Use it for Emergency case "checkpurchase-easy": //Use it for Emergency //Reg.SaveSetting(AppData.Addon200Lessons, true); //Reg.SaveSetting(Glob.Settings.GivenFreeForActivationCode, true); //MyConstants.IsPro200 = true; //Reg.SaveSetting(Glob.Settings.CompletePrevious, false); //bCompletePrevious = false; //await Glob.MsgBox_Async("Successfully Activated! Thanks for purchasing. Restart the App if required." + // Environment.NewLine + "(Easy mode activated: Navigate to any lesson)"); break; default: break; } }