diff --git a/WPTweaker/Common/RegistryEntry.cs b/WPTweaker/Common/RegistryEntry.cs index ebf6ee9..b2d2c8b 100644 --- a/WPTweaker/Common/RegistryEntry.cs +++ b/WPTweaker/Common/RegistryEntry.cs @@ -65,6 +65,8 @@ public class RegistryEntry public string Comparer { get; set; } public Int64 Min { get; set; } public Int64 Max { get; set; } + private bool _firstTime = true; + private dynamic _originalValue; public static bool IsInteropUnlocked() { #if ARM @@ -125,6 +127,14 @@ public bool IsSet } } + public bool IsChanged + { + get + { + return Value != _originalValue; + } + } + public void Reset() { Value = DefaultValue; } public dynamic Value @@ -198,6 +208,13 @@ public dynamic Value { Debug.WriteLine(string.Format("Reading registry key {0}\non path {1}\nreturned {2}\n", KeyName, string.Concat(Hive, "\\", KeyPath), result)); } + + if (_firstTime) + { + _firstTime = false; + _originalValue = DataConverter.FromString(result, DataType); + } + return DataConverter.FromString(result, DataType); } diff --git a/WPTweaker/Common/Tweak.cs b/WPTweaker/Common/Tweak.cs index 214b3cd..c0efe7e 100644 --- a/WPTweaker/Common/Tweak.cs +++ b/WPTweaker/Common/Tweak.cs @@ -159,6 +159,14 @@ public dynamic DefaultValue } } + public bool IsChanged + { + get + { + return Entries.Count(e => e.RegEntry.IsChanged) > 0; + } + } + public string ValueToString { get diff --git a/WPTweaker/Controls/EnumTweak.xaml.cs b/WPTweaker/Controls/EnumTweak.xaml.cs index c9b87b1..7d7ecf9 100644 --- a/WPTweaker/Controls/EnumTweak.xaml.cs +++ b/WPTweaker/Controls/EnumTweak.xaml.cs @@ -35,6 +35,7 @@ void ValueChanged(object sender, string hashedKeys) { _ignoreChange = true; ValuesList.SelectedIndex = index; + _ignoreChange = false; } } } diff --git a/WPTweaker/MainPage.xaml.cs b/WPTweaker/MainPage.xaml.cs index 6bfc416..5a9adde 100644 --- a/WPTweaker/MainPage.xaml.cs +++ b/WPTweaker/MainPage.xaml.cs @@ -84,8 +84,8 @@ protected override async void OnNavigatedTo(NavigationEventArgs e) if (_settings.RunCount++ == 5) { if (MessageBox.Show("Would you like to support this project by installing and rating \"5 stars\" my apps from the store? "+ - "It will take not more than five minutes of your time...\n\n"+ - "I hope these appls will be useful for you ☺\n\n" + + "It will take less than 5 minutes of your time...\n\n" + + "I hope you will like these apps ☺\n\n" + "Press [OK] to open store or [Cancel] to igonre this note", "Developer's note", MessageBoxButton.OKCancel) == MessageBoxResult.OK) { await Launcher.LaunchUriAsync(new Uri("ms-windows-store:search?keyword=senssoft")); @@ -200,7 +200,8 @@ void TweakValueChanged(object sender, string hashedKeys) { foreach (var tweak in _tweaks) { - if (senderTweak != tweak && tweak.CheckForUpdate(hashedKeys)) _rebootCounter += tweak.RequireReboot; + if (senderTweak != tweak) tweak.CheckForUpdate(hashedKeys); + else _rebootCounter += tweak.RequireReboot * (tweak.IsChanged ? 1 : -1); } } }