示例#1
0
 public LoginViewModel(IDataService dataService, IBHNavigationService bHNavigationService)
 {
     InputParams = new LoginInput {
         username = "", password = ""
     };
     LoginCommand       = new RelayCommand <LoginInput>(login, (LoginInput a) => true);
     _navigationService = bHNavigationService;
 }
示例#2
0
 private void login(LoginInput arg)
 {
     if (arg.username.Equals("admin") && arg.password.Equals("admin"))
     {
         _navigationService.NavigateTo("Main");
     }
     else
     {
         MessageBox.Show("Login failed");
     }
 }