예제 #1
0
        private void LogInClick(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrEmpty(loginTextBox.Text))
            {
                MessageBox.Show("Error! Login is a required field", "Login error", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }

            if (string.IsNullOrEmpty(passwordTextBox.Password))
            {
                MessageBox.Show("Error! Password is a required field", "Password error", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }
            else
            {
                if (manager.TryLogin(loginTextBox.Text, passwordTextBox.Password) == true)
                {
                    var window = new ClientSearch(manager, loginTextBox.Text);
                    window.ShowDialog();
                }
                else
                {
                    var window = new SignUpWindow(manager);
                    window.ShowDialog();
                }
            }
        }
예제 #2
0
        private void SignUpClick(object sender, RoutedEventArgs e)
        {
            var window = new SignUpWindow(manager);

            window.ShowDialog();
        }