|
@@ -1244,7 +1244,7 @@ end:
|
|
|
return r.Match(value).Success;
|
|
|
}
|
|
|
|
|
|
- public static bool InsertJsonConfig(string node, string key)
|
|
|
+ public static bool InsertJsonConfig(string node, string key, bool value = false)
|
|
|
{
|
|
|
JObject jObject;
|
|
|
using (StreamReader file = new StreamReader(LocalPath.localpath + "\\Config.json"))
|
|
@@ -1252,7 +1252,7 @@ end:
|
|
|
using (JsonTextReader reader = new JsonTextReader(file))
|
|
|
{
|
|
|
jObject = (JObject)JToken.ReadFrom(reader);
|
|
|
- jObject[node][key] = true;
|
|
|
+ jObject[node][key] = value;
|
|
|
}
|
|
|
}
|
|
|
using (StreamWriter writer = new StreamWriter(LocalPath.localpath + "\\Config.json"))
|