diff --git a/PCK-Studio/App.config b/PCK-Studio/App.config
index 09094ec7..76598544 100644
--- a/PCK-Studio/App.config
+++ b/PCK-Studio/App.config
@@ -80,9 +80,6 @@
Unknown
-
- SystemDefault
-
diff --git a/PCK-Studio/Forms/AppSettingsForm.cs b/PCK-Studio/Forms/AppSettingsForm.cs
index 76a18c15..c4fa0018 100644
--- a/PCK-Studio/Forms/AppSettingsForm.cs
+++ b/PCK-Studio/Forms/AppSettingsForm.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;
+using System.Linq;
using System.Windows.Forms;
using MetroFramework.Controls;
using PckStudio.Controls;
@@ -85,16 +86,16 @@ namespace PckStudio.Forms
Theme = MetroFramework.MetroThemeStyle.Dark,
Style = MetroFramework.MetroColorStyle.Silver,
};
- object[] values = Enum.GetNames(type);
+ object[] values = Enum.GetNames(type).Skip(type == typeof(ConsolePlatform) ? 1: 0).Select(s => s.Replace("_", " ")).ToArray();
control.Items.AddRange(values);
- control.Text = propertyValue.PropertyValue.ToString();
- control.SelectedItem = propertyValue.PropertyValue;
+ control.Text = propertyValue.PropertyValue.ToString().Replace("_", " ");
+ control.SelectedItem = propertyValue.PropertyValue.ToString().Replace("_", " ");
void ComboBox_SelectedIndexChanged(object sender, EventArgs e)
{
if (sender is ComboBox comboBox && comboBox.Tag is string settingsKey && settings[settingsKey].GetType() == type)
{
- settings[settingsKey] = Enum.Parse(type, (string)comboBox.SelectedItem, true);
+ settings[settingsKey] = Enum.Parse(type, ((string)comboBox.SelectedItem).Replace(" ", "_"), true);
}
}
diff --git a/PCK-Studio/Program.cs b/PCK-Studio/Program.cs
index e6987a8e..fa71d0b1 100644
--- a/PCK-Studio/Program.cs
+++ b/PCK-Studio/Program.cs
@@ -38,9 +38,9 @@ namespace PckStudio
if (Settings.Default.Platform == Core.ConsolePlatform.Unknown)
{
MessageBox.Show("Please choose on which console you're playing on.", "Select Platform", MessageBoxButtons.OK, MessageBoxIcon.Question);
- var platformChooser = new ItemSelectionPopUp(Enum.GetNames(typeof(Core.ConsolePlatform)).Skip(1).ToArray());
- if (platformChooser.ShowDialog() == DialogResult.OK && Enum.IsDefined(typeof(ConsolePlatform), platformChooser.SelectedItem))
- Settings.Default.Platform = (Core.ConsolePlatform)Enum.Parse(typeof(ConsolePlatform), platformChooser.SelectedItem);
+ var platformChooser = new ItemSelectionPopUp(Enum.GetNames(typeof(Core.ConsolePlatform)).Skip(1).Select(s => s.Replace("_", " ")).ToArray());
+ if (platformChooser.ShowDialog() == DialogResult.OK && Enum.IsDefined(typeof(ConsolePlatform), platformChooser.SelectedItem.Replace(" ", "_")))
+ Settings.Default.Platform = (Core.ConsolePlatform)Enum.Parse(typeof(ConsolePlatform), platformChooser.SelectedItem.Replace(" ", "_"));
}
ApplicationScope.Initialize();
diff --git a/PCK-Studio/Properties/Settings.Designer.cs b/PCK-Studio/Properties/Settings.Designer.cs
index fdfcc4bf..80cebed4 100644
--- a/PCK-Studio/Properties/Settings.Designer.cs
+++ b/PCK-Studio/Properties/Settings.Designer.cs
@@ -129,7 +129,7 @@ namespace PckStudio.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("SystemDefault")]
+ [global::System.Configuration.DefaultSettingValueAttribute("System_Default")]
public global::PckStudio.Core.App.AppLanguage UserLanguage {
get {
return ((global::PckStudio.Core.App.AppLanguage)(this["UserLanguage"]));
diff --git a/PCK-Studio/Properties/Settings.settings b/PCK-Studio/Properties/Settings.settings
index acbb42ea..56c9a612 100644
--- a/PCK-Studio/Properties/Settings.settings
+++ b/PCK-Studio/Properties/Settings.settings
@@ -30,7 +30,7 @@
Unknown
- SystemDefault
+ System_Default
\ No newline at end of file
diff --git a/PckStudio.Core/App/AppLanguage.cs b/PckStudio.Core/App/AppLanguage.cs
index 96c17062..f597faff 100644
--- a/PckStudio.Core/App/AppLanguage.cs
+++ b/PckStudio.Core/App/AppLanguage.cs
@@ -8,45 +8,45 @@ namespace PckStudio.Core.App
{
public enum AppLanguage : int
{
- SystemDefault,
- CzechCzechia,
+ System_Default,
+ Czech_Czechia,
Czechia,
Danish,
- DenmarkDanish,
- GermanAustria,
+ Denmark_Danish,
+ German_Austria,
German,
- GreekGreece,
+ Greek_Greece,
Greece,
- EnglishAustralia,
- EnglishCanada,
+ English_Australia,
+ English_Canada,
English,
- EnglishUnitedKingdom,
- EnglishIreland,
- EnglishNewZealand,
- EnglishUnitedStatesOfAmerica,
- SpanishSpain,
- SpanishMexico,
- FinnishFinland,
- FrenchFrance,
- FrenchCanada,
- ItalianItaly,
- JapaneseJapan,
- KoreanSouthKorea,
+ English_UnitedKingdom,
+ English_Ireland,
+ English_NewZealand,
+ English_USA,
+ Spanish_Spain,
+ Spanish_Mexico,
+ Finnish_Finland,
+ French_France,
+ French_Canada,
+ Italian_Italy,
+ Japanese_Japan,
+ Korean_South_Korea,
Latin,
- NorwegianNorway,
- NorwegianBokmålNorway,
- DutchNetherlands,
- DutchBelgium,
- PolishPoland,
- PortugueseBrazil,
- PortuguesePortugal,
- RussianRussia,
- SlovakSlovakia,
- SwedishSweden,
- TurkishTurkey,
- ChineseChina,
- ChineseHongKong,
- ChineseSingapore,
- ChineseTaiwan,
+ Norwegian_Norway,
+ Norwegian_Bokmål_Norway,
+ Dutch_Netherlands,
+ Dutch_Belgium,
+ Polish_Poland,
+ Portuguese_Brazil,
+ Portuguese_Portugal,
+ Russian_Russia,
+ Slovak_Slovakia,
+ Swedish_Sweden,
+ Turkish_Turkey,
+ Chinese_China,
+ Chinese_HongKong,
+ Chinese_Singapore,
+ Chinese_Taiwan,
}
}
diff --git a/PckStudio.Core/ConsolePlatform.cs b/PckStudio.Core/ConsolePlatform.cs
index a727029d..e3094c64 100644
--- a/PckStudio.Core/ConsolePlatform.cs
+++ b/PckStudio.Core/ConsolePlatform.cs
@@ -3,12 +3,12 @@
public enum ConsolePlatform
{
Unknown,
- Xbox360,
- XboxOne,
- PS3,
- PS4,
- PSVita,
- WiiU,
+ Xbox_360,
+ Xbox_One,
+ PS_3,
+ PS_4,
+ PS_Vita,
+ Wii_U,
Switch
}
}
\ No newline at end of file