/// <summary> /// Sets the settings view model properties based on the data in the client data store /// </summary> public async Task LoadAsync() { // Get the stored credentials var storedCredentials = await ClientDataStore.GetLoginCredentialsAsync(); Name = new TextEntryViewModel { Label = "Name", OriginalText = $"{storedCredentials?.FirstName} {storedCredentials?.LastName}", CommitAction = SaveNameAsync }; Username = new TextEntryViewModel { Label = "Username", OriginalText = storedCredentials?.Username, CommitAction = SaveUsernameAsync }; Password = new PasswordEntryViewModel { Label = "Password", FakePassword = "******", CommitAction = SavePasswordAsync }; Email = new TextEntryViewModel { Label = "Email", OriginalText = storedCredentials?.Email, CommitAction = SaveEmailAsync }; }
/// <summary> /// Default constructor /// </summary> public SettingsDesignModel() { Name = new TextEntryViewModel { Label = "Name", OriginalText = "Luke Melrose" }; Username = new TextEntryViewModel { Label = "Username", OriginalText = "luke" }; Password = new PasswordEntryViewModel { Label = "Password", FakePassword = "******" }; Email = new TextEntryViewModel { Label = "Email", OriginalText = "*****@*****.**" }; }