Resolve "ASCII export and import for Git" #83

Merged
thorsten merged 30 commits from 48-ascii-export-and-import-for-git into main 2023-02-12 12:55:07 +00:00
4 changed files with 14 additions and 3 deletions
Showing only changes of commit 882c2bba2b - Show all commits

View File

@ -168,7 +168,11 @@ public static class AppSettings
#region DeepL Mode
public static async Task SetDeepLMode(SettingDeepLMode mode) => await AppSettings.SetSetting(SettingNames.DEEPL_MODE, mode);
public static async Task SetDeepLMode(SettingDeepLMode mode)
{
DeepL.ResetState();
await AppSettings.SetSetting(SettingNames.DEEPL_MODE, mode);
}
public static async Task<SettingDeepLMode> GetDeepLMode() => await AppSettings.GetSetting(SettingNames.DEEPL_MODE, SettingDeepLMode.DISABLED);
@ -176,7 +180,11 @@ public static class AppSettings
#region DeepL API Key
public static async Task SetDeepLAPIKey(string apiKey) => await AppSettings.SetSetting(SettingNames.DEEPL_API_KEY, apiKey);
public static async Task SetDeepLAPIKey(string apiKey)
{
DeepL.ResetState();
await AppSettings.SetSetting(SettingNames.DEEPL_API_KEY, apiKey);
}
public static async Task<string> GetDeepLAPIKey() => await AppSettings.GetSetting(SettingNames.DEEPL_API_KEY, string.Empty);

View File

@ -76,4 +76,6 @@ public static class DeepL
return string.Empty;
}
}
public static void ResetState() => DEEPL_NOT_AVAILABLE = false;
}

View File

@ -2,5 +2,5 @@
public static class Version
{
public static string Text => $"v0.8.3 (2023-02-11), .NET {Environment.Version}";
public static string Text => $"v0.8.4 (2023-02-12), .NET {Environment.Version}";
}

View File

@ -79,6 +79,7 @@ internal static class Program
// Start the app:
do
{
Processor.DeepL.ResetState();
Application.Run(new Main());
} while (Program.RestartMainApp);
}