/// <summary> /// Loads user settings from the specified file. The file should /// have been created using this class' Save method. /// You must implement ReadSettings for any data to be read. /// </summary> public void Load() { UserSettingsReader reader = new UserSettingsReader(EncryptionKey); reader.Load(SettingsPath); ReadSettings(reader); }
// Must override ReadSettings() to read values public override void ReadSettings(UserSettingsReader reader) { IPAddress = reader.Read("IPAddress", ""); DataSource = reader.ReadEncrypted("Source", ""); InitialCatalog = reader.ReadEncrypted("Catalog", ""); UserID = reader.ReadEncrypted("User", ""); Password = reader.ReadEncrypted("Password", ""); }
// Abstract methods public abstract void ReadSettings(UserSettingsReader reader);