mirror of
https://github.com/4sval/FModel.git
synced 2026-04-04 16:15:52 -05:00
Crash fix when the watermark file is deleted.
This commit is contained in:
parent
c103b461e8
commit
d7a7c117e4
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@ namespace FModel.Forms
|
|||
{
|
||||
public UpdateModeSettings()
|
||||
{
|
||||
// Check if watermark exists
|
||||
Utilities.CheckWatermark();
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
//ICON CREATION
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user