diff --git a/PCK-Studio/App.config b/PCK-Studio/App.config
index daa93f3b..4ee0e293 100644
--- a/PCK-Studio/App.config
+++ b/PCK-Studio/App.config
@@ -58,6 +58,9 @@
False
+
+ False
+
diff --git a/PCK-Studio/Forms/Utilities/AppBehaviorSettingsForm.Designer.cs b/PCK-Studio/Forms/Utilities/AppBehaviorSettingsForm.Designer.cs
index ca0ba769..edab25aa 100644
--- a/PCK-Studio/Forms/Utilities/AppBehaviorSettingsForm.Designer.cs
+++ b/PCK-Studio/Forms/Utilities/AppBehaviorSettingsForm.Designer.cs
@@ -32,6 +32,7 @@
this.SettingToolTip = new MetroFramework.Components.MetroToolTip();
this.endianCheckBox = new MetroFramework.Controls.MetroCheckBox();
this.autoUpdateCheckBox = new MetroFramework.Controls.MetroCheckBox();
+ this.autoLoadPckCheckBox = new MetroFramework.Controls.MetroCheckBox();
this.SuspendLayout();
//
// autoSaveCheckBox
@@ -83,11 +84,26 @@
this.SettingToolTip.SetToolTip(this.autoUpdateCheckBox, "Whether to automatically check for updates");
this.autoUpdateCheckBox.UseSelectable = true;
//
+ // autoLoadPckCheckBox
+ //
+ this.autoLoadPckCheckBox.AutoSize = true;
+ this.autoLoadPckCheckBox.Location = new System.Drawing.Point(23, 126);
+ this.autoLoadPckCheckBox.Name = "autoLoadPckCheckBox";
+ this.autoLoadPckCheckBox.Size = new System.Drawing.Size(184, 15);
+ this.autoLoadPckCheckBox.Style = MetroFramework.MetroColorStyle.White;
+ this.autoLoadPckCheckBox.TabIndex = 3;
+ this.autoLoadPckCheckBox.Text = "Auto Load addittional pck files";
+ this.autoLoadPckCheckBox.Theme = MetroFramework.MetroThemeStyle.Dark;
+ this.SettingToolTip.SetToolTip(this.autoLoadPckCheckBox, "Whether to automatically load files inside that end in .pck");
+ this.autoLoadPckCheckBox.UseSelectable = true;
+ this.autoLoadPckCheckBox.CheckedChanged += new System.EventHandler(this.autoLoadPckCheckBox_CheckedChanged);
+ //
// AppBehaviorSettingsForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(527, 270);
+ this.Controls.Add(this.autoLoadPckCheckBox);
this.Controls.Add(this.autoUpdateCheckBox);
this.Controls.Add(this.endianCheckBox);
this.Controls.Add(this.autoSaveCheckBox);
@@ -111,5 +127,6 @@
private MetroFramework.Components.MetroToolTip SettingToolTip;
private MetroFramework.Controls.MetroCheckBox endianCheckBox;
private MetroFramework.Controls.MetroCheckBox autoUpdateCheckBox;
+ private MetroFramework.Controls.MetroCheckBox autoLoadPckCheckBox;
}
}
\ No newline at end of file
diff --git a/PCK-Studio/Forms/Utilities/AppBehaviorSettingsForm.cs b/PCK-Studio/Forms/Utilities/AppBehaviorSettingsForm.cs
index 68d9343e..0e289324 100644
--- a/PCK-Studio/Forms/Utilities/AppBehaviorSettingsForm.cs
+++ b/PCK-Studio/Forms/Utilities/AppBehaviorSettingsForm.cs
@@ -30,10 +30,16 @@ namespace PckStudio.Forms.Utilities
Settings.Default.UseLittleEndianAsDefault = endianCheckBox.Checked;
}
+ private void autoLoadPckCheckBox_CheckedChanged(object sender, EventArgs e)
+ {
+ Settings.Default.LoadSubPcks = autoLoadPckCheckBox.Checked;
+ }
+
private void LoadSettings()
{
autoSaveCheckBox.Checked = Settings.Default.AutoSaveChanges;
endianCheckBox.Checked = Settings.Default.UseLittleEndianAsDefault;
+ autoLoadPckCheckBox.Checked = Settings.Default.LoadSubPcks;
}
private void AppBehaviorSettingsForm_FormClosing(object sender, FormClosingEventArgs e)
diff --git a/PCK-Studio/Forms/Utilities/AppBehaviorSettingsForm.resx b/PCK-Studio/Forms/Utilities/AppBehaviorSettingsForm.resx
index 9b5d83ba..ab1b49e0 100644
--- a/PCK-Studio/Forms/Utilities/AppBehaviorSettingsForm.resx
+++ b/PCK-Studio/Forms/Utilities/AppBehaviorSettingsForm.resx
@@ -120,4 +120,7 @@
17, 17
+
+ 17, 17
+
\ No newline at end of file
diff --git a/PCK-Studio/MainForm.cs b/PCK-Studio/MainForm.cs
index 419000d4..e404abf3 100644
--- a/PCK-Studio/MainForm.cs
+++ b/PCK-Studio/MainForm.cs
@@ -289,10 +289,9 @@ namespace PckStudio
file.Filename = file.Filename.Remove(0, parentPath.Length);
TreeNode node = BuildNodeTreeBySeperator(root, file.Filename, '/');
node.Tag = file;
- switch (file.Filetype)
+ if (Settings.Default.LoadSubPcks && (file.Filetype == PckFile.FileData.FileType.SkinDataFile ||
+ file.Filetype == PckFile.FileData.FileType.TexturePackInfoFile))
{
- case PckFile.FileData.FileType.SkinDataFile:
- case PckFile.FileData.FileType.TexturePackInfoFile:
if (file.Data.Length == 0)
break;
using (var stream = new MemoryStream(file.Data))
@@ -312,10 +311,6 @@ namespace PckStudio
Debug.WriteLine(ex.Message);
}
}
- break;
- default: // unknown file format
- //throw new InvalidDataException(nameof(file.filetype));
- break;
}
SetPckFileIcon(node, file.Filetype);
};
diff --git a/PCK-Studio/Properties/Settings.Designer.cs b/PCK-Studio/Properties/Settings.Designer.cs
index 71a5e851..b9b30362 100644
--- a/PCK-Studio/Properties/Settings.Designer.cs
+++ b/PCK-Studio/Properties/Settings.Designer.cs
@@ -55,5 +55,17 @@ namespace PckStudio.Properties {
this["UseLittleEndianAsDefault"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool LoadSubPcks {
+ get {
+ return ((bool)(this["LoadSubPcks"]));
+ }
+ set {
+ this["LoadSubPcks"] = value;
+ }
+ }
}
}
diff --git a/PCK-Studio/Properties/Settings.settings b/PCK-Studio/Properties/Settings.settings
index 64066773..c2794ec2 100644
--- a/PCK-Studio/Properties/Settings.settings
+++ b/PCK-Studio/Properties/Settings.settings
@@ -11,5 +11,8 @@
False
+
+ False
+
\ No newline at end of file