/// <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) { openMinimized = reader.Read("openMinimized", false); launchWeb = reader.Read("launchWeb", false); weblink = reader.ReadEncrypted("weblink", ""); launchServer = reader.Read("launchServer", false); signalrPort = reader.Read("signalrPort", 8945); username = reader.ReadEncrypted("username", ""); password = reader.ReadEncrypted("password", ""); autologin = reader.Read("autologin", false); }
// Abstract methods public abstract void ReadSettings(UserSettingsReader reader);