using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace MyLoginForm
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void btnOK_Click(object sender, RoutedEventArgs e)
        {
            txtMessage.Text = txtLastname.Text + txtFirstname.Text + "您好!" +
                Environment.NewLine + "您设的密码是：" + password.Password + Environment.NewLine
                + "现在时间是：" + DateTime.Now.ToLongTimeString();
        }

        private void txtLastname_TextChanged(object sender, TextChangedEventArgs e)
        {
                btnOK.IsEnabled = true;
        }

        private void txtFirstname_TextChanged(object sender, TextChangedEventArgs e)
        {
            btnOK.IsEnabled = true;
        }

        private void btnCancel_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
