private void btnLogin_Click(object sender, RoutedEventArgs e) { LoginLogic logic = new LoginLogic(); try { logic.Login(this.txtUserName.Text, this.txtPassword.Password); this.DialogResult = true; currentUser = logic.currentUser; this.Close(); } catch(Zora.Core.Exceptions.ZoraException ex) { MessageBox.Show(ex.Result.ErrorCodeMessage); } }
public MainWindow(UserInfo currentUser) { InitializeComponent(); this.currentUser = currentUser; }