Add an option to toggle assets being opened

This commit is contained in:
TSG 2019-06-22 20:42:36 -04:00
parent a6b4b47f82
commit 6c6c7be7f1
6 changed files with 49 additions and 8 deletions

View File

@ -142,6 +142,9 @@
<setting name="createIconForCreativeGalleries" serializeAs="String">
<value>True</value>
</setting>
<setting name="tryToOpenAssets" serializeAs="String">
<value>True</value>
</setting>
</FModel.Properties.Settings>
</userSettings>
<runtime>

View File

@ -65,6 +65,7 @@ namespace FModel.Forms
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.textBox6 = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.checkBox_tryToOpen = new System.Windows.Forms.CheckBox();
this.groupBox3.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox4.SuspendLayout();
@ -108,6 +109,7 @@ namespace FModel.Forms
// groupBox2
//
this.groupBox2.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.groupBox2.Controls.Add(this.checkBox_tryToOpen);
this.groupBox2.Controls.Add(this.textBox1);
this.groupBox2.Controls.Add(this.label1);
this.groupBox2.Location = new System.Drawing.Point(12, 67);
@ -121,7 +123,7 @@ namespace FModel.Forms
//
this.textBox1.Location = new System.Drawing.Point(54, 19);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(500, 20);
this.textBox1.Size = new System.Drawing.Size(329, 20);
this.textBox1.TabIndex = 2;
//
// label1
@ -466,6 +468,16 @@ namespace FModel.Forms
this.label12.TabIndex = 9;
this.label12.Text = "Watermark:";
//
// checkBox_tryToOpen
//
this.checkBox_tryToOpen.AutoSize = true;
this.checkBox_tryToOpen.Location = new System.Drawing.Point(389, 22);
this.checkBox_tryToOpen.Name = "checkBox_tryToOpen";
this.checkBox_tryToOpen.Size = new System.Drawing.Size(162, 17);
this.checkBox_tryToOpen.TabIndex = 8;
this.checkBox_tryToOpen.Text = "Try to open Extracted Assets";
this.checkBox_tryToOpen.UseVisualStyleBackColor = true;
//
// Settings
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -543,5 +555,6 @@ namespace FModel.Forms
private System.Windows.Forms.CheckBox checkBox2;
private System.Windows.Forms.TextBox textBox6;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.CheckBox checkBox_tryToOpen;
}
}

View File

@ -30,6 +30,8 @@ namespace FModel.Forms
}
else { textBox6.Text = Properties.Settings.Default.challengesWatermark; }
checkBox_tryToOpen.Checked = Properties.Settings.Default.tryToOpenAssets;
//MERGER
textBox3.Text = Properties.Settings.Default.mergerFileName;
imgsPerRow.Value = Properties.Settings.Default.mergerImagesRow;
@ -110,6 +112,8 @@ namespace FModel.Forms
Properties.Settings.Default.challengesDebug = checkBox2.Checked;
Properties.Settings.Default.challengesWatermark = textBox6.Text;
Properties.Settings.Default.tryToOpenAssets = checkBox_tryToOpen.Checked;
//MERGER
Properties.Settings.Default.mergerFileName = textBox3.Text;
Properties.Settings.Default.mergerImagesRow = Decimal.ToInt32(imgsPerRow.Value);

View File

@ -1359,8 +1359,14 @@ namespace FModel
if (File.Exists(soundPathConverted))
{
Utilities.OpenWithDefaultProgramAndNoFocus(soundPathConverted);
UpdateConsole("Opening " + ThePak.CurrentUsedItem + ".ogg", Color.FromArgb(255, 66, 244, 66), "Success");
if (Properties.Settings.Default.tryToOpenAssets)
{
Utilities.OpenWithDefaultProgramAndNoFocus(soundPathConverted);
UpdateConsole("Opening " + ThePak.CurrentUsedItem + ".ogg", Color.FromArgb(255, 66, 244, 66), "Success");
} else
{
UpdateConsole("Extracted " + ThePak.CurrentUsedItem + ".ogg", Color.FromArgb(255, 66, 244, 66), "Success");
}
}
else
UpdateConsole("Couldn't convert " + ThePak.CurrentUsedItem, Color.FromArgb(255, 244, 66, 66), "Error");

View File

@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Ce code a été généré par un outil.
// Version du runtime :4.0.30319.42000
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
// le code est régénéré.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
@ -12,7 +12,7 @@ namespace FModel.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.1.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@ -550,5 +550,17 @@ namespace FModel.Properties {
this["createIconForCreativeGalleries"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool tryToOpenAssets {
get {
return ((bool)(this["tryToOpenAssets"]));
}
set {
this["tryToOpenAssets"] = value;
}
}
}
}

View File

@ -134,5 +134,8 @@
<Setting Name="createIconForCreativeGalleries" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="tryToOpenAssets" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>