예제 #1
0
        private void fingerPrint_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            if (fingerVerified == true)
            {
                Transition();
            }
            else
            {
                if (serial != null)
                {
                    if (serial.IsOpen)
                    {
                        serial.Close();
                    }
                }

                UserControl usc    = new UserControlWelcome(data);
                var         parent = (Grid)this.Parent;
                parent.Children.Add(usc);
                parent.Children.Remove(this);
            }

            if (serial != null)
            {
                serial.Close();
            }
        }
예제 #2
0
        public MainWindow()
        {
            InitializeComponent();

            data = new LoginData();
            UserControl usc = new UserControlWelcome(data);

            data.setUserName("root");
            data.setPassword("mysql");
            GridMain.Children.Add(usc);
        }