コード例 #1
0
        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");
                }
            }
        }
コード例 #2
0
        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");
                }
            }
        }