using System;
using System.Web;
using System.Collections;
using System.IO;
using System.Text;
using System.Collections.Generic;
using System.Data;

namespace UUN
{
    /// <summary>
    /// 针对整个网站内容的处理
    /// </summary>
    public static class 程序
    {
        public static 设置 设置;
        public static String 数据表前缀;
        /// <summary>
        /// 初始化程序的设置对象
        /// </summary>
        /// <param name="HC">此次请求的HTTP信息</param>
        public static void 初始化设置(HttpContext HC)
        {
            HC.Application.Lock();

            HC.Application["UUN_UUN3G"] = "";
            设置 = new 设置(File.ReadAllText(HC.Server.MapPath("~/Data/XML/SheZhi.xml"), Encoding.UTF8));

            数据表前缀 = Convert.ToString(设置["数据表前缀"]);

            HC.Application.UnLock();
        }
        /// <summary>
        /// 程序的安装位置
        /// </summary>
        public static String 安装位置
        {
            get
            {
                String 返回值 = HttpContext.Current.Request.ApplicationPath;
                if (!返回值.EndsWith("/"))
                    返回值 += "/";
                return 返回值;
            }
        }
    }
}