Ejemplo n.º 1
0
 /// <summary>
 /// 保存插件设置信息
 /// </summary>
 public static void SavePluginSet(PluginSetInfo pluginSetInfo)
 {
     lock (_locker)
     {
         IOHelper.SerializeToXml(pluginSetInfo, IOHelper.GetMapPath(_dbfilepath));
         _pluginsetinfo = null;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 保存插件设置信息
 /// </summary>
 public static void SavePluginSet(PluginSetInfo pluginSetInfo)
 {
     lock (_locker)
     {
         IOHelper.SerializeToXml(pluginSetInfo, IOHelper.GetMapPath(_dbfilepath));
         _pluginsetinfo = null;
     }
 }
Ejemplo n.º 3
0
        private static string _dbfilepath = "/plugins/BrnMall.OAuthPlugin.QQ/db.config";//数据文件路径

        /// <summary>
        ///获得插件设置信息
        /// </summary>
        /// <returns></returns>
        public static PluginSetInfo GetPluginSet()
        {
            if (_pluginsetinfo == null)
            {
                lock (_locker)
                {
                    if (_pluginsetinfo == null)
                    {
                        _pluginsetinfo = (PluginSetInfo)IOHelper.DeserializeFromXML(typeof(PluginSetInfo), IOHelper.GetMapPath(_dbfilepath));
                    }
                }
            }
            return _pluginsetinfo;
        }
Ejemplo n.º 4
0
        private static string _dbfilepath           = "/plugins/BrnMall.OAuthPlugin.QQ/db.config"; //数据文件路径

        /// <summary>
        ///获得插件设置信息
        /// </summary>
        /// <returns></returns>
        public static PluginSetInfo GetPluginSet()
        {
            if (_pluginsetinfo == null)
            {
                lock (_locker)
                {
                    if (_pluginsetinfo == null)
                    {
                        _pluginsetinfo = (PluginSetInfo)IOHelper.DeserializeFromXML(typeof(PluginSetInfo), IOHelper.GetMapPath(_dbfilepath));
                    }
                }
            }
            return(_pluginsetinfo);
        }
Ejemplo n.º 5
0
        public ActionResult Config(ConfigModel model)
        {
            if (ModelState.IsValid)
            {
                PluginSetInfo pluginSetInfo = new PluginSetInfo();

                pluginSetInfo.AuthUrl = model.AuthUrl.Trim();
                pluginSetInfo.AppKey = model.AppKey.Trim();
                pluginSetInfo.AppSecret = model.AppSecret.Trim();
                pluginSetInfo.Server = model.Server.Trim();
                pluginSetInfo.UNamePrefix = model.UNamePrefix.Trim();

                PluginUtils.SavePluginSet(pluginSetInfo);
                AddMallAdminLog("修改QQ开放授权插件配置信息");
                return PromptView(Url.Action("config", "plugin", new { configController = "AdminQQOAuth", configAction = "Config" }), "插件配置修改成功");
            }
            return PromptView(Url.Action("config", "plugin", new { configController = "AdminQQOAuth", configAction = "Config" }), "信息有误,请重新填写");
        }