/// <summary> /// Saves the config /// </summary> public void Save() { if (ConfigFileLocation.IsNullOrEmpty()) { return; } Encrypt(); new FileInfo(ConfigFileLocation).Save(ObjectToString(this)); Decrypt(); }
/// <summary> /// Loads the config /// </summary> public void Load() { if (ConfigFileLocation.IsNullOrEmpty()) { return; } string fileContent = new FileInfo(ConfigFileLocation).Read(); if (string.IsNullOrEmpty(fileContent)) { Save(); return; } LoadProperties(StringToObject(fileContent)); Decrypt(); }