config.json editor

This commit is contained in:
Natsumi
2021-05-03 00:00:40 +12:00
parent 279b4c61bd
commit 35b23e0b13
3 changed files with 115 additions and 0 deletions

View File

@@ -54,6 +54,25 @@ namespace VRCX
return fileData.Length.ToString();
}
public string ReadConfigFile()
{
var logPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"Low\VRChat\VRChat\";
var configFile = Path.Combine(logPath, @"config.json");
if (!Directory.Exists(logPath) || !File.Exists(configFile))
{
return "";
}
var json = System.IO.File.ReadAllText(configFile);
return json;
}
public void WriteConfigFile(string json)
{
var logPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + @"Low\VRChat\VRChat\";
var configFile = Path.Combine(logPath, @"config.json");
System.IO.File.WriteAllText(configFile, json);
}
public void ShowDevTools()
{
MainForm.Instance.Browser.ShowDevTools();