//通过热键启动解析对应序号的文本 public static Boolean SetScriptTxt(int ID) { currentID = ID; JsonFile jsonFile = new JsonFile(); JObject jObject = JObject.Parse(jsonFile.ReadFile(@".\script\script_config.json")); //更新json配置文件中的currentId jObject["currentConfigId"] = ID; //删除再创建 File.Delete(@".\script\script_config.json"); jsonFile.WriteFile(@".\script\script_config.json", jObject.ToString()); return(true); }