public Login() { this.InitializeComponent(); KeyboardAccelerator GoBack = new KeyboardAccelerator(); GoBack.Key = Windows.System.VirtualKey.GoBack; GoBack.Invoked += BackInvoked; KeyboardAccelerator AltLeft = new KeyboardAccelerator(); AltLeft.Key = Windows.System.VirtualKey.Left; AltLeft.Invoked += BackInvoked; this.KeyboardAccelerators.Add(GoBack); this.KeyboardAccelerators.Add(AltLeft); // ALT routes here AltLeft.Modifiers = Windows.System.VirtualKeyModifiers.Menu; this._viewModel = new LoginPassenger(); }
private void btnLogin_Click(object sender, EventArgs e) { string userName = txtUserName.Text; string passWord = txtPassword.Text; LoginPassenger loginPassanger = new LoginPassenger(); loginPassanger.Name = userName; loginPassanger.Password = passWord; try { int loginBLL = _loginPassangerBussiness.GetIdCorrectLoginBLL(loginPassanger); MessageBox.Show(loginBLL.ToString()); } catch (Exception ex) { MessageBox.Show(ex.Message); } }