change to GPLv3 from MPL 2.0
This commit is contained in:
parent
89916dd828
commit
00139993b7
|
@ -2,12 +2,15 @@ using System.Linq;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using toast_mcl.Config;
|
using toast_mcl.Config;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace toast_mcl.Programs;
|
namespace toast_mcl.Programs;
|
||||||
public static class ConfigUtils
|
public static class ConfigUtils
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
public static ConfigSettings ?Settings { get; private set;}
|
public static ConfigSettings ?Settings { get; private set;}
|
||||||
|
|
||||||
private static readonly string ConfigFolderPath = Path.Combine(Base.AppDirectory, "toast_mc");
|
private static readonly string ConfigFolderPath = Path.Combine(Base.AppDirectory, "toast_mc");
|
||||||
private static readonly string ConfigFilePath = Path.Combine(ConfigFolderPath, "config.json");
|
private static readonly string ConfigFilePath = Path.Combine(ConfigFolderPath, "config.json");
|
||||||
|
|
||||||
|
@ -21,12 +24,15 @@ public static class ConfigUtils
|
||||||
{
|
{
|
||||||
CreateDefaultConfig();
|
CreateDefaultConfig();
|
||||||
}
|
}
|
||||||
|
LoadConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void CreateDefaultConfig()
|
private static void CreateDefaultConfig()
|
||||||
{
|
{
|
||||||
Settings = DefaultConfig.GetDefaultConfig();
|
Settings = DefaultConfig.GetDefaultConfig();
|
||||||
SaveConfig();
|
SaveConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void LoadConfig()
|
public static void LoadConfig()
|
||||||
{
|
{
|
||||||
if (File.Exists(ConfigFilePath))
|
if (File.Exists(ConfigFilePath))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user