Esempio n. 1
0
        /// <summary>
        /// 获取默认模板id
        /// </summary>
        /// <returns></returns>
        //public static int GetDefaultTemplateID()
        //{
        //     return GetConfig().Templateid;
        //}



        /// <summary>
        /// 获得设置项信息
        /// </summary>
        /// <returns>设置项</returns>
        public static bool SetIpDenyAccess(string denyipaccess)
        {
            bool result;

            lock (lockHelper)
            {
                try
                {
                    MyAttachmentsTypeConfigInfo configInfo = MyAttachmentsTypeConfigs.GetConfig();
                    //configInfo.Ipdenyaccess = configInfo.Ipdenyaccess + "\n" + denyipaccess;
                    MyAttachmentsTypeConfigs.Serialiaze(configInfo, Utils.GetMapPath(BaseConfigs.GetForumPath + "config/MyAttachmentsTypeConfiginfo.config"));
                    result = true;
                }
                catch
                {
                    return(false);
                }
            }
            return(result);
        }
Esempio n. 2
0
        /// <summary>
        /// 获取默认模板id
        /// </summary>
        /// <returns></returns>
        //public static int GetDefaultTemplateID()
        //{
        //     return GetConfig().Templateid;
        //}



        /// <summary>
        /// 获得设置项信息
        /// </summary>
        /// <returns>设置项</returns>
        public static bool SetIpDenyAccess(string denyipaccess)
        {
            bool result;

            lock (lockHelper)
            {
                try
                {
                    MyAttachmentsTypeConfigInfo configInfo = MyAttachmentsTypeConfigs.GetConfig();
                    //configInfo.Ipdenyaccess = configInfo.Ipdenyaccess + "\n" + denyipaccess;
                    MyAttachmentsTypeConfigs.Serialiaze(configInfo, AppDomain.CurrentDomain.BaseDirectory + "config/MyAttachmentsTypeConfiginfo.config");
                    result = true;
                }
                catch
                {
                    return(false);
                }
            }
            return(result);
        }