Ejemplo n.º 1
0
        private void FormMain_Load(object sender, EventArgs e)
        {
            //Ssh connect
            if (Ssh.OpenSave())
            {
                //Test database connect
                using (Database database = new Database()) {
                    if (!database.OpenSave())
                    {
                        FormSsh formSsh = new FormSsh();
                        formSsh.ShowDialog();
                    }
                }
            }
            else
            {
                FormSsh formSsh = new FormSsh();
                formSsh.ShowDialog();
            }
            //Rfid connect
            if (!Reader.Rfid.OpenLast())
            {
                FormRfidConnect formRfidConnect = new FormRfidConnect();
                formRfidConnect.ShowDialog();
            }
            controlReg.StartLoad();

            //test select
            using (Database database = new Database()) {
                database.OpenSave();
                Reg reg = database.GetRegByNumcard("0005550141");
            }
        }
Ejemplo n.º 2
0
        private void toolStripMenuItemRfidChange_Click(object sender, EventArgs e)
        {
            Rfid.Close();
            FormRfidConnect formRfidConnect = new FormRfidConnect();

            formRfidConnect.ShowDialog();
        }
Ejemplo n.º 3
0
 private void pictureBoxRfid_MouseDown(object sender, MouseEventArgs e)
 {
     if (Rfid.isOpen())
     {
         contextMenuStripRfidOpen.Show(pictureBoxRfid, pictureBoxRfid.Location.X - 85, pictureBoxRfid.Location.Y - 58);
     }
     else
     {
         FormRfidConnect formRfidConnect = new FormRfidConnect();
         formRfidConnect.ShowDialog();
     }
 }