mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-25 00:45:44 +00:00
Add Setting for platfrom
This commit is contained in:
@@ -80,6 +80,9 @@
|
||||
<setting name="ValidateImageDimension" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="Platform" serializeAs="String">
|
||||
<value>Unknown</value>
|
||||
</setting>
|
||||
</PckStudio.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
|
||||
@@ -38,9 +38,7 @@ namespace PckStudio
|
||||
public MainForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
#if DEBUG
|
||||
DLCManager.Default.Platform = ConsolePlatform.WiiU;
|
||||
#endif
|
||||
|
||||
Text = Application.ProductName;
|
||||
|
||||
labelVersion.Text = $"{Application.ProductName}: {ApplicationScope.CurrentVersion}";
|
||||
|
||||
@@ -7,6 +7,8 @@ using System.Linq;
|
||||
using PckStudio.Internal;
|
||||
using PckStudio.Core.App;
|
||||
using PckStudio.Properties;
|
||||
using PckStudio.Core.DLC;
|
||||
using PckStudio.Forms.Additional_Popups;
|
||||
|
||||
|
||||
namespace PckStudio
|
||||
@@ -30,8 +32,16 @@ namespace PckStudio
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Updater.Initialize(RawProjectUrl, Settings.Default.AutoUpdate);
|
||||
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)));
|
||||
if (platformChooser.ShowDialog() == DialogResult.OK && Enum.IsDefined(typeof(Core.ConsolePlatform), platformChooser.SelectedItem))
|
||||
Settings.Default.Platform = (Core.ConsolePlatform)Enum.Parse(typeof(Core.ConsolePlatform), platformChooser.SelectedItem);
|
||||
}
|
||||
|
||||
ApplicationScope.Initialize();
|
||||
DLCManager.Default.Platform = Settings.Default.Platform;
|
||||
Trace.TraceInformation("Startup");
|
||||
RPC.Initialize();
|
||||
MainInstance = new MainForm();
|
||||
|
||||
14
PCK-Studio/Properties/Settings.Designer.cs
generated
14
PCK-Studio/Properties/Settings.Designer.cs
generated
@@ -12,7 +12,7 @@ namespace PckStudio.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.10.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
@@ -126,5 +126,17 @@ namespace PckStudio.Properties {
|
||||
this["ValidateImageDimension"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("Unknown")]
|
||||
public global::PckStudio.Core.ConsolePlatform Platform {
|
||||
get {
|
||||
return ((global::PckStudio.Core.ConsolePlatform)(this["Platform"]));
|
||||
}
|
||||
set {
|
||||
this["Platform"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,5 +29,8 @@
|
||||
<Setting Name="ValidateImageDimension" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="Platform" Type="PckStudio.Core.ConsolePlatform" Scope="User">
|
||||
<Value Profile="(Default)">Unknown</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
Reference in New Issue
Block a user