internal static void LoadSettings() { _curDllLocation = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); //Путь до папки Settings на локальном компьютере. _localSettingsFolder = Path.GetDirectoryName(_curDllLocation); _settingsPikFile = getSettings <SettingsPikFile>(Path.Combine(_curDllLocation, "SettingsPIK.xml")); if (_settingsPikFile == null) { _settingsPikFile = SettingsPikFile.Default(); } _serverSettingsFolder = GetServerSettingsPath(_settingsPikFile?.ServerSettingsPath);// TODO: Можно проверить доступность серверного пути, и если он недоступен, попробовать другой. _serverShareSettingsFolder = GetServerShareLibPath(); try { // Загрузка группы юзера из файла UsersLisr2 _userGroup = getUserGroupFromServer(GetServerUserListFile()); } catch { _userGroup = getUserGroupFromLocalSide(GetServerUserListFile()); } if (_userGroup == "Нет") { throw new Exceptions.NoGroupException(); } UserGroupsCombined = GetUserCombinedGroups(); _userGroups = getUserGroups(); _settingsGroupFile = LoadSettingsGroupFiles(); }
public static SettingsPikFile Default() { SettingsPikFile res = new SettingsPikFile() { ProfileName = "ПИК", ServerSettingsPath = @"\\dsk2.picompany.ru\project\CAD_Settings\AutoCAD_server\Адаптация", PathVariables = new PathVariable { Supports = new List <Variable> { new Variable { Name = "SupportPaths", Value = "Fonts" }, new Variable { Name = "SupportPaths", Value = "Support" } }, ToolPalettePaths = new List <Variable> { new Variable { Name = "ToolPalettePaths", Value = "ToolPalette", IsReWrite = true } }, TemplatePath = new Variable { Name = "TemplatePath", Value = "Template", IsReWrite = true }, QNewTemplateFile = new Variable { Name = "QNewTemplateFile", Value = "Template", IsReWrite = true }, }, LoginCADManager = "KhisyametdinovVT", MailCADManager = "*****@*****.**" }; return(res); }
public static SettingsPikFile Default() { SettingsPikFile res = new SettingsPikFile() { ProfileName = "ПИК", ServerSettingsPath = @"\\dsk2.picompany.ru\project\CAD_Settings\AutoCAD_server\Адаптация", PathVariables = new PathVariable { Supports = new List<Variable> { new Variable { Name= "SupportPaths", Value = "Fonts" }, new Variable { Name= "SupportPaths", Value = "Support" } }, ToolPalettePaths = new List<Variable> { new Variable { Name = "ToolPalettePaths", Value = "ToolPalette", IsReWrite = true } }, TemplatePath = new Variable { Name = "TemplatePath", Value = "Template", IsReWrite = true }, QNewTemplateFile = new Variable { Name = "QNewTemplateFile", Value = "Template", IsReWrite = true }, }, LoginCADManager = "KhisyametdinovVT", MailCADManager = "*****@*****.**" }; return res; }