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 Newtonsoft.Json;
|
||||
using toast_mcl.Config;
|
||||
using System;
|
||||
|
||||
namespace toast_mcl.Programs;
|
||||
public static class ConfigUtils
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static ConfigSettings ?Settings { get; private set;}
|
||||
|
||||
private static readonly string ConfigFolderPath = Path.Combine(Base.AppDirectory, "toast_mc");
|
||||
private static readonly string ConfigFilePath = Path.Combine(ConfigFolderPath, "config.json");
|
||||
|
||||
|
@ -21,12 +24,15 @@ public static class ConfigUtils
|
|||
{
|
||||
CreateDefaultConfig();
|
||||
}
|
||||
LoadConfig();
|
||||
}
|
||||
|
||||
private static void CreateDefaultConfig()
|
||||
{
|
||||
Settings = DefaultConfig.GetDefaultConfig();
|
||||
SaveConfig();
|
||||
}
|
||||
|
||||
public static void LoadConfig()
|
||||
{
|
||||
if (File.Exists(ConfigFilePath))
|
||||
|
|
Loading…
Reference in New Issue
Block a user