/// <summary> /// /// </summary> /// <param name="workerIndent"></param> public PluginPackAttribute(string workerIndent) { this.WorkIndent = workerIndent; bool isChanged = false; var dirPath = String.Concat( AppDomain.CurrentDomain.BaseDirectory, PluginConfig.PLUGIN_DIRECTORY, workerIndent, "/"); if (!Directory.Exists(dirPath)) { Directory.CreateDirectory(dirPath).Create(); } settings = new SettingFile(string.Concat(dirPath, "plugin.config")); if (!settings.Contains("state")) { settings.Add("state", "Normal"); isChanged = true; } if (!settings.Contains("override.url.indent")) { settings.Add("override.url.indent", ""); isChanged = true; } if (isChanged) { settings.Flush(); } }
public static void InitWeixin(SettingFile set) { Variables.Token = set["Weixin_Token"]; Variables.AppId = set["Weixin_AppId"]; Variables.AppSecret = set["Weixin_AppSecret"]; Variables.AppEncodeString = set["Weixin_AppEncodeString"]; Variables.ApiDomain = set["Weixin_ApiDomain"]; Variables.MenuButtons = set["Weixin_MenuButtons"]; Variables.WxWelcomeMessage = set["Weixin_WelcomeMessage"] ?? ""; Variables.WxEnterMessage = set["Weixin_EnterMessage"] ?? ""; Variables.WxDefaultResponseMessage = set["Weixin_DefaultResponseMessage"]??""; }