public static string XQ_Create(string frameworkVersion) { try { if (!Directory.Exists(Directory.GetCurrentDirectory() + "\\Config")) { Directory.CreateDirectory(Directory.GetCurrentDirectory() + "\\Config"); } XQMain.AppDirectory = Directory.GetCurrentDirectory() + "\\Config\\" + XQMain.AppInfo().name + "\\"; if (!Directory.Exists(XQMain.AppDirectory)) { Directory.CreateDirectory(XQMain.AppDirectory); } //初始化事件容器 EventContainer.Init(); //初始化基本XQAPI xqapi = new XQAPI(); xqapi.AppInfo = XQMain.AppInfo(); //返回AppInfo Json return(AppInfoStr()); } catch (Exception) { //错误 return(AppInfoStr()); } }
/// <summary> /// 得到AppInfo的json并返回 /// </summary> /// <returns></returns> public static string AppInfoStr() { return(JsonConvert.SerializeObject(XQMain.AppInfo())); }