2022-07-06 22:59:50 +00:00
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
|
|
public class TYTDConfiguration
|
|
|
|
{
|
|
|
|
public TYTDConfiguration()
|
|
|
|
{
|
|
|
|
Url = "http://127.0.0.1:3252/";
|
|
|
|
LocalFiles=Environment.CurrentDirectory;
|
2023-01-10 17:03:44 +00:00
|
|
|
AddComplete = true;
|
2022-07-06 22:59:50 +00:00
|
|
|
}
|
|
|
|
public string Url {get;set;}
|
|
|
|
|
|
|
|
public string LocalFiles {get;set;}
|
|
|
|
|
2023-01-10 17:03:44 +00:00
|
|
|
public bool AddComplete {get;set;}
|
|
|
|
|
2022-07-06 22:59:50 +00:00
|
|
|
public static TYTDConfiguration Load()
|
|
|
|
{
|
|
|
|
if(!File.Exists("proxy.json")) return new TYTDConfiguration();
|
|
|
|
var res= JsonConvert.DeserializeObject<TYTDConfiguration>(File.ReadAllText("proxy.json"));
|
|
|
|
if(res != null)
|
|
|
|
{
|
|
|
|
return res;
|
|
|
|
}
|
|
|
|
return new TYTDConfiguration();
|
|
|
|
}
|
|
|
|
}
|