public static void Initialize() { if (_isInitialized) { return; } try { InfoTaskDir = Different.GetInfoTaskDir(); GeneralDir = InfoTaskDir + @"General\"; TmpDir = InfoTaskDir + @"Tmp\"; DocsDir = InfoTaskDir + @"Docs\"; ControllerDir = InfoTaskDir + @"Controller\"; ReporterDir = InfoTaskDir + @"Reporter\"; ConfigFile = GeneralDir + "Config.accdb"; HistryTemplateFile = GeneralDir + "HistoryTemplate.accdb"; if (!DaoDb.Check(GeneralDir + "General.accdb", new[] { "Functions", "FunctionsOverloads" })) { Different.MessageError("Не допустимый General.accdb"); } if (!DaoDb.Check(ConfigFile, new[] { "SysTabl", "SysSubTabl" })) { Different.MessageError("Не допустимый Config.accdb"); } ControllerFile = ControllerDir + "ControllerData.accdb"; if (!DaoDb.Check(ControllerFile, new[] { "Threads", "Projects", "Providers" })) { Different.MessageError("Не допустимый ControllerData.accdb"); } ReporterFile = ReporterDir + "ReporterData.accdb"; ReportTemplateFile = ReporterDir + "ReportTemplate.accdb"; DebugMode = SysTabl.ValueS(ControllerFile, "DebugMode") == "True"; Oka.Register(); ReadProvidersLists(); _isInitialized = true; } catch (Exception ex) { ex.MessageError("Настроечный файл имеет недопустимый формат"); } }