Exemplo n.º 1
0
 private void Startup()
 {
     try
     {
         FrTagMain form = new FrTagMain();
         if (rb1.Checked)
         {
             RfidConfig._rfidModel = RFIDModule.F6C;
         }
         else if (rb2.Checked)
         {
             RfidConfig._rfidModel = RFIDModule.F6B;
         }
         else if (rb3.Checked)
         {
             RfidConfig._rfidModel = RFIDModule.F6C_F6B;
         }
         
         if (form != null)
         {
             Hide();
             form.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     this.Close();
 }
Exemplo n.º 2
0
        private void btok_Click(object sender, EventArgs e)
        {
            RFIDModule();
            FrTagMain frtag = new FrTagMain();

            frtag.ShowDialog();
            Close();
        }
Exemplo n.º 3
0
        private void button2_Click_1(object sender, EventArgs e)
        {
            FrTagMain frtag = new FrTagMain(1);

            frtag.ShowDialog();
        }
Exemplo n.º 4
0
        /// <summary>
        /// �ж��豸���
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Loader(object sender, EventArgs e)
        {
            bool isfound = false;

            try
            {
                progressBarWait.Value = 20;
                FrTagMain form = null;
                if (!isfound)
                {
                    isfound = ReaderF6C();
                    if (isfound)
                    {
                        form = new FrTagMain();
                    }
                    else
                    {
                        progressBarWait.Value = 50;
                    }
                }

                //if (!isfound)
                //{
                //    int iFlag = 0;
                //    isfound = ReaderF6B(out iFlag);
                //    if (isfound)
                //    {
                //        if (iFlag == 2)
                //        {
                //            RfidConfig._rfidModel = RFIDModule.F6G;
                //        }
                //        else
                //        {
                //            RfidConfig._rfidModel = RFIDModule.F6B;
                //        }
                //    }
                //    else
                //    {
                //        progressBarWait.Value = 100;
                //    }
                //}

                if (isfound && form != null)
                {
                    progressBarWait.Value = progressBarWait.Maximum;
                    form.Load            += new EventHandler(showform_Load);
                    form.ShowDialog();
                }
                else
                {
                    progressBarWait.Value = progressBarWait.Maximum;

                    MessageBox.Show("模块不能工作!");
                }
            }
            catch (Exception ex)
            {
                ShowInfoAsync(ex.Message);
                Thread.Sleep(3000);
            }
            finally
            {
                Close();
            }
        }