Example #1
0
        public Form1()
        {
            InitializeComponent();

            //this.ControlBox = false;
            dataGridView1.DataSource = dt;
            dataGridView1.RowsDefaultCellStyle.Font          = new Font("宋体", 18, FontStyle.Regular);
            dataGridView1.ColumnHeadersDefaultCellStyle.Font = new Font("宋体", 18, FontStyle.Regular);
            T.Tick += new EventHandler(T_Tick);
            DevClass.Init();
        }
Example #2
0
        private void getUserId()
        {
            int    userid = 0;
            Action act;

            while (true)
            {
                DevClass.Capture();

                act = () => {
                    label1.Text = "正在验证中...";
                    label1.Refresh();
                };
                this.Invoke(act);


                userid = DevClass.Verify();

                if (userid == 0)
                {
                    act = () =>
                    {
                        label1.Text = "验证失败,请重新按入指纹";
                        label1.Refresh();
                    };
                    this.Invoke(act);
                }
                else
                {
                    break;
                }
            }

            act = () => { ShowByUserId(userid); };
            this.Invoke(act);
        }