diff --git a/FModel/Converter/UnrealEngineDataToOGG.cs b/FModel/Converter/UnrealEngineDataToOGG.cs index 66e8135b..2143562f 100644 --- a/FModel/Converter/UnrealEngineDataToOGG.cs +++ b/FModel/Converter/UnrealEngineDataToOGG.cs @@ -11,7 +11,7 @@ namespace FModel.Converter static byte[] _oggNoHeader = { 0x4F, 0x67, 0x67, 0x53 }; static byte[] _uexpToDelete = { 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x05, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00 }; static byte[] _oggOutNewArray; - public static List SearchBytePattern(byte[] pattern, byte[] bytes) + private static List SearchBytePattern(byte[] pattern, byte[] bytes) { List positions = new List(); int patternLength = pattern.Length; @@ -32,7 +32,7 @@ namespace FModel.Converter } return positions; } - public static bool TryFindAndReplace(T[] source, T[] pattern, T[] replacement, out T[] newArray) + private static bool TryFindAndReplace(T[] source, T[] pattern, T[] replacement, out T[] newArray) { if (source == null) throw new ArgumentNullException(nameof(source)); diff --git a/FModel/CurrentCommit.txt b/FModel/CurrentCommit.txt index 2b5a717c..820bc14a 100644 --- a/FModel/CurrentCommit.txt +++ b/FModel/CurrentCommit.txt @@ -1 +1 @@ -5ba2a9e +4d81e3a diff --git a/FModel/Forms/Settings.Designer.cs b/FModel/Forms/Settings.Designer.cs index df09e06a..d21c2628 100644 --- a/FModel/Forms/Settings.Designer.cs +++ b/FModel/Forms/Settings.Designer.cs @@ -53,6 +53,7 @@ this.textBox3 = new System.Windows.Forms.TextBox(); this.label4 = new System.Windows.Forms.Label(); this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); this.label7 = new System.Windows.Forms.Label(); this.textBox5 = new System.Windows.Forms.TextBox(); this.label6 = new System.Windows.Forms.Label(); @@ -313,6 +314,7 @@ // groupBox5 // this.groupBox5.Anchor = System.Windows.Forms.AnchorStyles.Top; + this.groupBox5.Controls.Add(this.checkBox1); this.groupBox5.Controls.Add(this.label7); this.groupBox5.Controls.Add(this.textBox5); this.groupBox5.Controls.Add(this.label6); @@ -325,11 +327,22 @@ this.groupBox5.TabStop = false; this.groupBox5.Text = "Optional - Backup PAKs 1000+"; // + // checkBox1 + // + this.checkBox1.AutoSize = true; + this.checkBox1.Location = new System.Drawing.Point(499, 71); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.Size = new System.Drawing.Size(60, 17); + this.checkBox1.TabIndex = 7; + this.checkBox1.Text = "Reveal"; + this.checkBox1.UseVisualStyleBackColor = true; + this.checkBox1.CheckedChanged += new System.EventHandler(this.CheckBox1_CheckedChanged); + // // label7 // this.label7.AutoSize = true; this.label7.ForeColor = System.Drawing.Color.Red; - this.label7.Location = new System.Drawing.Point(294, 72); + this.label7.Location = new System.Drawing.Point(214, 72); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(262, 13); this.label7.TabIndex = 6; @@ -340,9 +353,9 @@ // this.textBox5.Location = new System.Drawing.Point(95, 45); this.textBox5.Name = "textBox5"; - this.textBox5.PasswordChar = '*'; this.textBox5.Size = new System.Drawing.Size(459, 20); this.textBox5.TabIndex = 4; + this.textBox5.UseSystemPasswordChar = true; // // label6 // @@ -357,9 +370,9 @@ // this.textBox4.Location = new System.Drawing.Point(74, 19); this.textBox4.Name = "textBox4"; - this.textBox4.PasswordChar = '*'; this.textBox4.Size = new System.Drawing.Size(480, 20); this.textBox4.TabIndex = 2; + this.textBox4.UseSystemPasswordChar = true; // // label2 // @@ -437,5 +450,6 @@ private System.Windows.Forms.TextBox textBox4; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label7; + private System.Windows.Forms.CheckBox checkBox1; } } \ No newline at end of file diff --git a/FModel/Forms/Settings.cs b/FModel/Forms/Settings.cs index 0333870f..e0ee6dc7 100644 --- a/FModel/Forms/Settings.cs +++ b/FModel/Forms/Settings.cs @@ -349,5 +349,19 @@ namespace FModel.Forms Application.OpenForms[assetsForm.Name].Focus(); } } + + private void CheckBox1_CheckedChanged(object sender, EventArgs e) + { + if (checkBox1.Checked) + { + textBox4.UseSystemPasswordChar = false; + textBox5.UseSystemPasswordChar = false; + } + else + { + textBox4.UseSystemPasswordChar = true; + textBox5.UseSystemPasswordChar = true; + } + } } } diff --git a/FModel/MainWindow.cs b/FModel/MainWindow.cs index c4f02f70..2f49b87a 100644 --- a/FModel/MainWindow.cs +++ b/FModel/MainWindow.cs @@ -786,14 +786,22 @@ namespace FModel } else if (_backupDynamicKeys != null) { + string oldGuid = string.Empty; foreach (string myString in _backupDynamicKeys) { string[] parts = myString.Split(':'); + string newGuid = DynamicPAKs.getPakGuidFromKeychain(parts); - if (DynamicPAKs.getPakGuidFromKeychain(parts) == arCurrentUsedPakGuid) + /*** + * if same guid several time in keychain do not backup twice + * it works fine that way because of the loop through all the paks + * even if in keychain we do "found 1004" -> "found 1001" -> "found 1004" through the paks we do 1000 -> 1001 -> 1002... + ***/ + if (newGuid == arCurrentUsedPakGuid && oldGuid != newGuid) { byte[] bytes = Convert.FromBase64String(parts[1]); string aeskey = BitConverter.ToString(bytes).Replace("-", ""); + oldGuid = newGuid; try {