private void LoginButton_Click()
        {
            content.Message.Value = string.Empty;

            if (userAuthentication == null)
            {
                content.Message.Value = Resources.LoginNotAvailable;
                return;
            }

            if (!content.IsValid)
            {
                return;
            }

            var result = userAuthentication.Authenticate(content.UserId.Value, content.Password.Value);

            if (result.Success)
            {
                navigator.NavigateTo(new UserContent(content.UserId.Value));
            }
            else
            {
                content.Message.Value = Resources.LoginFailureMessage;
            }
        }
示例#2
0
 private void LogoutButton_Click()
 {
     navigator.NavigateTo(new LoginContent());
 }
 private void OnAttachedToLogicalTree()
 {
     navigator.NavigateTo(new LoginContent());
 }