save autodl setting

This commit is contained in:
Jakob 2024-02-26 19:46:46 +01:00
parent a271150b0c
commit 9eba20f28a
2 changed files with 14 additions and 0 deletions

View file

@ -95,11 +95,19 @@ namespace EnvyUpdate
private void chkAutodl_Checked(object sender, RoutedEventArgs e)
{
GlobalVars.autoDownload = true;
if (!File.Exists(Path.Combine(GlobalVars.saveDirectory, "autodl.envy")))
{
File.Create(Path.Combine(GlobalVars.saveDirectory, "autodl.envy"));
}
}
private void chkAutodl_Unchecked(object sender, RoutedEventArgs e)
{
GlobalVars.autoDownload = false;
if (File.Exists(Path.Combine(GlobalVars.saveDirectory, "autodl.envy")))
{
File.Delete(Path.Combine(GlobalVars.saveDirectory, "autodl.envy"));
}
}
}
}