예제 #1
0
        private async void Window_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
        {
            if (e.Key == Key.Enter)
            {
                check_user = new ZSklad.Context(txtBox.Text, lblPasswordBox.Password);
                bool check_credentials = await check_user.CheckCredentials();

                this.DialogResult = true;
                //this.Close();
            }
        }
예제 #2
0
        private async void btPassword_Click(object sender, RoutedEventArgs e)
        {
            ZSklad.Context check_user        = new ZSklad.Context(txtBox.Text, lblPasswordBox.Password);
            bool           check_credentials = await check_user.CheckCredentials();

            if (check_credentials)
            {
                this.DialogResult = true;
                this.Close();
            }
            else
            {
                MessageBox.Show("přihlášení selhalo");
            }
        }
예제 #3
0
 public MainWindow(ZSklad.Context context)
 {
     ctx = context;
     InitializeComponent();
 }