Beispiel #1
0
        // 程序自检函数,检查必要设置并初始化
        private void ProgramCheck()
        {
            // 如果数据存储路径注册表项不存在,则新建项并设置默认路径
            if (!Program.IsExitProgramPath())
            {
                Program.SetProgramPath(Program.defaultPath);
            }

            // 如果"小熠岩土勘察"文件夹不存在,则新建文件夹
            if (!System.IO.Directory.Exists(Program.ReadProgramPath()))
            {
                System.IO.Directory.CreateDirectory(Program.ReadProgramPath());
            }

            // 如果设置信息数据库不存在,则新建数据库,并初始化数据库表
            if (!System.IO.File.Exists(Program.ReadProgramPath() + "\\设置信息.gsygeo"))
            {
                SettingDataBase.Create();
            }

            // 清理空数据文件
            ProjectDataBase.ClearEmpthProject();
        }