Beispiel #1
0
 private void SubmitButton_OnClick(object sender, RoutedEventArgs e)
 {
     if (CheckEntries(UsernameTextBox.Text, PasswordTextBox.Text))
     {
         try
         {
             if (Login.Validate(UsernameTextBox.Text, PasswordTextBox.Text))
             {
                 // -- Open PageDataEntry
                 var pageDataEntry     = new PageDataEntry();
                 var navigationService = this.NavigationService;
                 navigationService?.Navigate(pageDataEntry);
             }
             else
             {
                 MessageBox.Show("Credentials are incorrect. Please re-enter");
             }
         }
         catch (Exception exception)
         {
             Console.WriteLine(exception);
             throw;
         }
     }
 }
        private void CloseButton_OnClick(object sender, RoutedEventArgs e)
        {
            var pageDataEntry = new PageDataEntry();

            if (NavigationService != null)
            {
                NavigationService.Navigate(pageDataEntry);
            }
        }
Beispiel #3
0
        private void BackButton_OnClick(object sender, RoutedEventArgs e)
        {
            var pageDataEntry     = new PageDataEntry();
            var navigationService = NavigationService;

            if (navigationService != null)
            {
                navigationService.Navigate(pageDataEntry);
            }
        }