private void enterSimuTraining(object sender, MouseButtonEventArgs e)
 {
     Node root = BreadCrumb.getRoot();
     Window index = new windows.IndexWindow(root);
     index.Show();
     this.Close();
 }
        private void authorize_Click(object sender, RoutedEventArgs e)
        {
            String authcode = auth_code.Text;
            String id = machine_code.Text.ToString();

            if (AuthUtil.authorize(id, authcode))
            {
                writeRegistry(authcode);
                Window index = new IndexWindow(BreadCrumb.getRoot());
                this.Close();
                index.Show();
            }
            else
            {
                MessageBox.Show("错误的验证码");
            }
        }
        protected override void OnStartup(StartupEventArgs e)
        {
            if (confirmAuthorization())
            {
                Window index = new IndexWindow(BreadCrumb.getRoot());
                index.Show();
            }
            else
            {
                Window auth = new AuthWindow();
                auth.Show();
            }

            base.OnStartup(e);

            //Window index = new IndexWindow(BreadCrumb.getRoot());
            //index.Show();
        }