private async void NetworkStatusChanged(object sender) { if (!loggedIn) { PasswordVault vault = new PasswordVault(); if (vault.FindAllByResource("email").ToString() != null) { PasswordCredential cred = vault.FindAllByResource("email")[0]; cred.RetrievePassword(); if ((await LoginWithEmail(cred.UserName.ToString(), cred.Password.ToString())) != true) { } network.OnPropertyChanged("network"); } } }
private async void NetworkStatusChanged(object sender) { if (!loggedIn) { PasswordVault vault = new PasswordVault(); if (vault.FindAllByResource("email").ToString() != null) { PasswordCredential cred = vault.FindAllByResource("email")[0]; cred.RetrievePassword(); if ((await LoginWithEmail(cred.UserName.ToString(), cred.Password.ToString())) != true) { Frame rootFrame = Window.Current.Content as Frame; if (!rootFrame.Navigate(typeof(LandingPage), this)) { throw new Exception("Failed to create initial page"); } } network.OnPropertyChanged("network"); } } }