diff --git a/FModel/Forms/About.cs b/FModel/Forms/About.cs index 99bcbcd5..31392df4 100644 --- a/FModel/Forms/About.cs +++ b/FModel/Forms/About.cs @@ -24,7 +24,7 @@ namespace FModel.Forms private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { - System.Diagnostics.Process.Start("https://github.com/iAmAsval/FModel#how-to-use"); + System.Diagnostics.Process.Start("https://github.com/iAmAsval/FModel/blob/master/README.md#how-to-use"); } } } diff --git a/FModel/Forms/Settings.cs b/FModel/Forms/Settings.cs index fd297a4a..5daedfdd 100644 --- a/FModel/Forms/Settings.cs +++ b/FModel/Forms/Settings.cs @@ -14,6 +14,9 @@ namespace FModel.Forms public Settings() { + // Check if watermark exists + Utilities.CheckWatermark(); + InitializeComponent(); textBox2.Text = Properties.Settings.Default.PAKsPath; @@ -36,6 +39,9 @@ namespace FModel.Forms checkBoxSaveAsMergeImages.Checked = Properties.Settings.Default.mergerImagesSaveAs; imgsPerRow.Value = Properties.Settings.Default.mergerImagesRow; + // Check if watermark exists + Utilities.CheckWatermark(); + //WATERMARK button1.Enabled = Properties.Settings.Default.isWatermark; checkBox7.Checked = Properties.Settings.Default.isWatermark; diff --git a/FModel/Forms/UpdateModeSettings.cs b/FModel/Forms/UpdateModeSettings.cs index d7a17469..0f46505c 100644 --- a/FModel/Forms/UpdateModeSettings.cs +++ b/FModel/Forms/UpdateModeSettings.cs @@ -10,6 +10,9 @@ namespace FModel.Forms { public UpdateModeSettings() { + // Check if watermark exists + Utilities.CheckWatermark(); + InitializeComponent(); //ICON CREATION diff --git a/FModel/MainWindow.cs b/FModel/MainWindow.cs index e0f12218..ca647625 100644 --- a/FModel/MainWindow.cs +++ b/FModel/MainWindow.cs @@ -36,6 +36,9 @@ namespace FModel public MainWindow() { + // Check if watermark exists + Utilities.CheckWatermark(); + InitializeComponent(); App.MainFormToUse = this; @@ -551,6 +554,9 @@ namespace FModel } private void UpdateModeExtractSave() { + // Check if watermark exists + Utilities.CheckWatermark(); + CreatePakList(null, false, true, true); Invoke(new Action(() => @@ -1331,6 +1337,9 @@ namespace FModel private void ExtractProcess() { + // Check if watermark exists + Utilities.CheckWatermark(); + scintilla1.Text = ""; pictureBox1.Image = null; ExtractButton.Enabled = false; diff --git a/FModel/Methods/Utilities/Utilities.cs b/FModel/Methods/Utilities/Utilities.cs index 63829e18..c194a256 100644 --- a/FModel/Methods/Utilities/Utilities.cs +++ b/FModel/Methods/Utilities/Utilities.cs @@ -186,5 +186,22 @@ namespace FModel } } } + + public static void CheckWatermark() + { + if (!string.IsNullOrEmpty(Properties.Settings.Default.wFilename) && + !File.Exists(Properties.Settings.Default.wFilename)) + { + Properties.Settings.Default.wFilename = string.Empty; + Properties.Settings.Default.isWatermark = false; + } + + if (!string.IsNullOrEmpty(Properties.Settings.Default.UMFilename) && + !File.Exists(Properties.Settings.Default.UMFilename)) + { + Properties.Settings.Default.UMFilename = string.Empty; + Properties.Settings.Default.UMWatermark = false; + } + } } }