diff --git a/EnvyUpdate/MainWindow.xaml.cs b/EnvyUpdate/MainWindow.xaml.cs index d139842..6522ee3 100644 --- a/EnvyUpdate/MainWindow.xaml.cs +++ b/EnvyUpdate/MainWindow.xaml.cs @@ -115,6 +115,12 @@ namespace EnvyUpdate GlobalVars.isMobile = Util.IsMobile(); Debug.LogToFile("INFO Mobile: " + GlobalVars.isMobile); + + if (File.Exists(Path.Combine(GlobalVars.saveDirectory, "autodl.envy"))) + { + Debug.LogToFile("INFO Auto-download is enabled."); + GlobalVars.autoDownload = true; + } } private void Window_StateChanged(object sender, EventArgs e) { diff --git a/EnvyUpdate/SettingsPage.xaml.cs b/EnvyUpdate/SettingsPage.xaml.cs index 6534512..77698d7 100644 --- a/EnvyUpdate/SettingsPage.xaml.cs +++ b/EnvyUpdate/SettingsPage.xaml.cs @@ -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")); + } } } }