diff --git a/UWPHook/App.config b/UWPHook/App.config index 731f6de..6a92738 100644 --- a/UWPHook/App.config +++ b/UWPHook/App.config @@ -1,6 +1,21 @@  + + +
+ + + + + + False + + + + + + \ No newline at end of file diff --git a/UWPHook/App.xaml b/UWPHook/App.xaml index 90735cb..eed0b7e 100644 --- a/UWPHook/App.xaml +++ b/UWPHook/App.xaml @@ -9,7 +9,7 @@ - + diff --git a/UWPHook/GamesWindow.xaml b/UWPHook/GamesWindow.xaml index 9296e0d..94bb13f 100644 --- a/UWPHook/GamesWindow.xaml +++ b/UWPHook/GamesWindow.xaml @@ -11,7 +11,7 @@ TextElement.FontSize="14" FontFamily="Segoe UI Light" mc:Ignorable="d" - Title="GamesWindow" Height="600" Width="800" Icon="Resources/hook_icon.ico"> + Title="GamesWindow" Height="600" Width="800"> diff --git a/UWPHook/GamesWindow.xaml.cs b/UWPHook/GamesWindow.xaml.cs index ad152e1..147c0de 100644 --- a/UWPHook/GamesWindow.xaml.cs +++ b/UWPHook/GamesWindow.xaml.cs @@ -1,5 +1,6 @@ using SharpSteam; using System; +using System.Globalization; using System.IO; using System.Linq; using System.Threading; @@ -22,8 +23,19 @@ namespace UWPHook Apps = new AppEntryModel(); listGames.ItemsSource = Apps.Entries; + if (Properties.Settings.Default.ChangeLanguage) + { + this.Title = "true "; + } + else + { + this.Title = "false "; + } + + this.Title += Properties.Settings.Default.TargetLanguage; + //If null or 1, the app was launched normally - if (Environment.GetCommandLineArgs() != null) + if (Environment.GetCommandLineArgs() == null) { //When length is 1, the only argument is the path where the app is installed if (Environment.GetCommandLineArgs().Length > 1) @@ -115,6 +127,8 @@ namespace UWPHook private void HelpButton_Click(object sender, RoutedEventArgs e) { + SettingsWindow window = new SettingsWindow(); + window.ShowDialog(); } } } diff --git a/UWPHook/Properties/Settings.Designer.cs b/UWPHook/Properties/Settings.Designer.cs index b43e125..9328ab6 100644 --- a/UWPHook/Properties/Settings.Designer.cs +++ b/UWPHook/Properties/Settings.Designer.cs @@ -8,23 +8,43 @@ // //------------------------------------------------------------------------------ -namespace UWPHook.Properties -{ - - +namespace UWPHook.Properties { + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] + public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { + + public static Settings Default { + get { return defaultInstance; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool ChangeLanguage { + get { + return ((bool)(this["ChangeLanguage"])); + } + set { + this["ChangeLanguage"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string TargetLanguage { + get { + return ((string)(this["TargetLanguage"])); + } + set { + this["TargetLanguage"] = value; + } + } } } diff --git a/UWPHook/Properties/Settings.settings b/UWPHook/Properties/Settings.settings index 033d7a5..56c1587 100644 --- a/UWPHook/Properties/Settings.settings +++ b/UWPHook/Properties/Settings.settings @@ -1,7 +1,12 @@  - - - - - + + + + + False + + + + + \ No newline at end of file diff --git a/UWPHook/Resources/briano.jpg b/UWPHook/Resources/briano.jpg new file mode 100644 index 0000000..c416b50 Binary files /dev/null and b/UWPHook/Resources/briano.jpg differ diff --git a/UWPHook/Settings.cs b/UWPHook/Settings.cs index 724e521..4debcb1 100644 --- a/UWPHook/Settings.cs +++ b/UWPHook/Settings.cs @@ -6,7 +6,7 @@ // The PropertyChanged event is raised after a setting's value is changed. // The SettingsLoaded event is raised after the setting values are loaded. // The SettingsSaving event is raised before the setting values are saved. - internal sealed partial class Settings { + public sealed partial class Settings { public Settings() { // // To add event handlers for saving and changing settings, uncomment the lines below: diff --git a/UWPHook/SettingsWindow.xaml b/UWPHook/SettingsWindow.xaml index 5b4e50f..f593fd2 100644 --- a/UWPHook/SettingsWindow.xaml +++ b/UWPHook/SettingsWindow.xaml @@ -23,7 +23,42 @@ - - + + + + + + + + + + + + + + + diff --git a/UWPHook/SettingsWindow.xaml.cs b/UWPHook/SettingsWindow.xaml.cs index e1a2788..1e270cb 100644 --- a/UWPHook/SettingsWindow.xaml.cs +++ b/UWPHook/SettingsWindow.xaml.cs @@ -1,7 +1,9 @@ using System; using System.Collections.Generic; +using System.Globalization; using System.Linq; using System.Text; +using System.Threading; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; @@ -22,6 +24,25 @@ namespace UWPHook public SettingsWindow() { InitializeComponent(); + + Properties.Settings.Default.ChangeLanguage = true; + + foreach (var culture in CultureInfo.GetCultures(CultureTypes.AllCultures)) + { + cultures_comboBox.Items.Add(culture.TextInfo.CultureName); + } + } + + private void ToggleButton_Checked(object sender, RoutedEventArgs e) + { + + } + + private void saveButton_Click(object sender, RoutedEventArgs e) + { + Properties.Settings.Default.ChangeLanguage = (bool)language_toggle.IsChecked; + Properties.Settings.Default.TargetLanguage = cultures_comboBox.SelectedItem.ToString(); + Properties.Settings.Default.Save(); } } } diff --git a/UWPHook/UWPHook.csproj b/UWPHook/UWPHook.csproj index d8ee1e4..d0ed16b 100644 --- a/UWPHook/UWPHook.csproj +++ b/UWPHook/UWPHook.csproj @@ -134,7 +134,7 @@ - SettingsSingleFileGenerator + PublicSettingsSingleFileGenerator Settings.Designer.cs @@ -185,6 +185,9 @@ True + + +