fixed rare crashes

This commit is contained in:
Asval 2019-06-16 23:07:02 +02:00
parent 4cb1d5eab3
commit 7203caf3db
7 changed files with 31 additions and 23 deletions

View File

@ -49,7 +49,11 @@ namespace FModel.Forms
private void OKButton_Click(object sender, EventArgs e)
{
Properties.Settings.Default.AESKey = textBox2.Text.Substring(2).ToUpper();
if (!string.IsNullOrWhiteSpace(textBox2.Text))
{
Properties.Settings.Default.AESKey = textBox2.Text.Substring(2).ToUpper();
}
else { Properties.Settings.Default.AESKey = ""; }
DynamicKeysManager.AESEntries = new List<AESEntry>();
for (int i = 0; i < ThePak.dynamicPaksList.Count; i++)

View File

@ -65,10 +65,10 @@
this.linkLabel2.AutoSize = true;
this.linkLabel2.Location = new System.Drawing.Point(398, 91);
this.linkLabel2.Name = "linkLabel2";
this.linkLabel2.Size = new System.Drawing.Size(42, 13);
this.linkLabel2.Size = new System.Drawing.Size(43, 13);
this.linkLabel2.TabIndex = 2;
this.linkLabel2.TabStop = true;
this.linkLabel2.Text = "Donate";
this.linkLabel2.Text = "Discord";
this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked);
//
// label1

View File

@ -19,7 +19,7 @@ namespace FModel.Forms
private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("https://paypal.me/AsvalD3SK1NG");
System.Diagnostics.Process.Start("https://discordapp.com/invite/JmWvXKb");
}
}
}

View File

@ -46,6 +46,7 @@
this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.filesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.searchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.copySelectedFilePathToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.imageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.saveImageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.autoSaveImagesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -70,7 +71,6 @@
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
this.backgroundWorker2 = new System.ComponentModel.BackgroundWorker();
this.copySelectedFilePathToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.statusStrip1.SuspendLayout();
this.menuStrip1.SuspendLayout();
this.panel1.SuspendLayout();
@ -196,7 +196,7 @@
//
this.settingsToolStripMenuItem.Image = global::FModel.Properties.Resources.properties_16xLG;
this.settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
this.settingsToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));
this.settingsToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F1;
this.settingsToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.settingsToolStripMenuItem.Text = "Settings";
this.settingsToolStripMenuItem.Click += new System.EventHandler(this.settingsToolStripMenuItem_Click);
@ -213,11 +213,19 @@
// searchToolStripMenuItem
//
this.searchToolStripMenuItem.Name = "searchToolStripMenuItem";
this.searchToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F1;
this.searchToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F2;
this.searchToolStripMenuItem.Size = new System.Drawing.Size(216, 22);
this.searchToolStripMenuItem.Text = "Search";
this.searchToolStripMenuItem.Click += new System.EventHandler(this.searchToolStripMenuItem_Click);
//
// copySelectedFilePathToolStripMenuItem
//
this.copySelectedFilePathToolStripMenuItem.Name = "copySelectedFilePathToolStripMenuItem";
this.copySelectedFilePathToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F3;
this.copySelectedFilePathToolStripMenuItem.Size = new System.Drawing.Size(216, 22);
this.copySelectedFilePathToolStripMenuItem.Text = "Copy Selected File Path";
this.copySelectedFilePathToolStripMenuItem.Click += new System.EventHandler(this.CopySelectedFilePathToolStripMenuItem_Click);
//
// imageToolStripMenuItem
//
this.imageToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -232,7 +240,7 @@
// saveImageToolStripMenuItem
//
this.saveImageToolStripMenuItem.Name = "saveImageToolStripMenuItem";
this.saveImageToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.saveImageToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
this.saveImageToolStripMenuItem.Text = "Save Image";
this.saveImageToolStripMenuItem.Click += new System.EventHandler(this.saveImageToolStripMenuItem_Click);
//
@ -240,18 +248,18 @@
//
this.autoSaveImagesToolStripMenuItem.CheckOnClick = true;
this.autoSaveImagesToolStripMenuItem.Name = "autoSaveImagesToolStripMenuItem";
this.autoSaveImagesToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.autoSaveImagesToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
this.autoSaveImagesToolStripMenuItem.Text = "Auto Save Images";
//
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator3.Size = new System.Drawing.Size(165, 6);
//
// mergeImagesToolStripMenuItem
//
this.mergeImagesToolStripMenuItem.Name = "mergeImagesToolStripMenuItem";
this.mergeImagesToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.mergeImagesToolStripMenuItem.Size = new System.Drawing.Size(168, 22);
this.mergeImagesToolStripMenuItem.Text = "Merge Images";
this.mergeImagesToolStripMenuItem.Click += new System.EventHandler(this.mergeImagesToolStripMenuItem_Click);
//
@ -464,14 +472,6 @@
this.backgroundWorker2.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker2_DoWork);
this.backgroundWorker2.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorker2_RunWorkerCompleted);
//
// copySelectedFilePathToolStripMenuItem
//
this.copySelectedFilePathToolStripMenuItem.Name = "copySelectedFilePathToolStripMenuItem";
this.copySelectedFilePathToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F2;
this.copySelectedFilePathToolStripMenuItem.Size = new System.Drawing.Size(216, 22);
this.copySelectedFilePathToolStripMenuItem.Text = "Copy Selected File Path";
this.copySelectedFilePathToolStripMenuItem.Click += new System.EventHandler(this.CopySelectedFilePathToolStripMenuItem_Click);
//
// MainWindow
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

View File

@ -278,7 +278,11 @@ namespace FModel
{
try
{
JohnWick.MyExtractor = new PakExtractor(Settings.Default.PAKsPath + "\\" + ThePak.mainPaksList[i].thePak, Settings.Default.AESKey);
if (!string.IsNullOrWhiteSpace(Settings.Default.AESKey))
{
JohnWick.MyExtractor = new PakExtractor(Settings.Default.PAKsPath + "\\" + ThePak.mainPaksList[i].thePak, Settings.Default.AESKey);
}
else { break; }
}
catch (Exception)
{

View File

@ -131,7 +131,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABa
CAAAAk1TRnQBSQFMAgEBAgEAATABAQEwAQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CAAAAk1TRnQBSQFMAgEBAgEAATgBAQE4AQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

View File

@ -62,8 +62,8 @@ namespace FModel
{
int index = listBeforeData.IndexOf(str);
Console.WriteLine("DName: " + listBeforeData[index - 3]);
Console.WriteLine("Description: " + listBeforeData[index - 1]);
//Console.WriteLine("DName: " + listBeforeData[index - 3]);
//Console.WriteLine("Description: " + listBeforeData[index - 1]);
myNamespacesList.Add(listBeforeData[index - 3]);
myNamespacesList.Add(listBeforeData[index - 1]);