mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-18 08:23:12 +00:00
3f38b123a3
mostly renaming things, includes a little bit of added sugar and splitting methods to simplify the codebase. all methods are now PascalCase
24 lines
660 B
C#
24 lines
660 B
C#
using System.Configuration;
|
|
using System.IO;
|
|
|
|
namespace PKHeX.WinForms
|
|
{
|
|
public static class ConfigUtil
|
|
{
|
|
public static bool CheckConfig()
|
|
{
|
|
try
|
|
{
|
|
ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal);
|
|
return true;
|
|
}
|
|
catch (ConfigurationErrorsException e)
|
|
{
|
|
string path = (e.InnerException as ConfigurationErrorsException)?.Filename;
|
|
if (path != null && File.Exists(path))
|
|
File.Delete(path);
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|