예제 #1
0
        public MainWindow()
        {
            InitializeComponent();

            //Runtime initialization is handled when the window is opened. When the window
            //is closed, the runtime MUST be unitialized.
            this.Loaded += new RoutedEventHandler(MainWindow_Loaded);
            //Handle the content obtained from the video camera, once received.

            this.KeyDown += new KeyEventHandler(MainWindow_KeyDown);

            timer = new System.Timers.Timer();

            initialSetting();
            dc = new DataConnection();
        }
예제 #2
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            dc = new DataConnection();

            if (dc.getPassword(textboxUname.Text)!=null)
            {
                if (dc.getPassword(textboxUname.Text).Equals(textboxPass.Password))
                {
                    textboxPass.Visibility = Visibility.Hidden;
                    textboxUname.Visibility = Visibility.Hidden;
                    labelUsername.Visibility = Visibility.Hidden;
                    labelPassword.Visibility = Visibility.Hidden;

                    recLogin.Visibility = Visibility.Hidden;
                    butLogin.Visibility = Visibility.Hidden;

                    userid = textboxUname.Text;
                }
                else
                {
                    MessageBox.Show("Password Mismatched " + textboxPass.Password + " " + dc.getPassword(textboxUname.Text));
                }
            }
        }