protected override void ApplyBaseIni() { string basedOn = GetStringValue("INISystem", "BasedOn", string.Empty); if (!string.IsNullOrEmpty(basedOn)) { string path = string.Empty; if (basedOn.Contains("$THEME_DIR$")) { path = basedOn.Replace("$THEME_DIR$/", ProgramConstants.GetResourcePath()).Replace("$THEME_DIR$\\", ProgramConstants.GetResourcePath()); } else { path = Path.GetDirectoryName(FileName) + "/" + basedOn; } // Consolidate with the INI file that this INI file is based on if (!File.Exists(path)) { Logger.Log(FileName + ": Base INI file not found! " + path); } CCIniFile baseIni = new CCIniFile(path); ConsolidateIniFiles(baseIni, this); this.Sections = baseIni.Sections; } }
protected ClientConfiguration() { clientDefinitionsIni = new IniFile(ProgramConstants.GetBaseResourcePath() + CLIENT_DEFS); DTACnCNetClient_ini = new IniFile(ProgramConstants.GetResourcePath() + CLIENT_SETTINGS); gameOptions_ini = new IniFile(ProgramConstants.GetBaseResourcePath() + GAME_OPTIONS); }
protected ClientConfiguration() { if (!File.Exists(ProgramConstants.GetBaseResourcePath() + CLIENT_DEFS)) throw new FileNotFoundException("Couldn't find " + CLIENT_DEFS + ". Please verify that you're running the client from the correct directory."); clientDefinitionsIni = new IniFile(ProgramConstants.GetBaseResourcePath() + CLIENT_DEFS); DTACnCNetClient_ini = new IniFile(ProgramConstants.GetResourcePath() + CLIENT_SETTINGS); gameOptions_ini = new IniFile(ProgramConstants.GetBaseResourcePath() + GAME_OPTIONS); }
public void RefreshSettings() { DTACnCNetClient_ini = new IniFile(ProgramConstants.GetResourcePath() + CLIENT_SETTINGS); }