示例#1
0
        private void toolStripMenuItemSshChange_Click(object sender, EventArgs e)
        {
            Ssh.Close();
            FormSsh formSsh = new FormSsh();

            formSsh.ShowDialog();
        }
示例#2
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");
            }
        }
示例#3
0
 private void pictureBoxSsh_MouseDown(object sender, MouseEventArgs e)
 {
     if (Ssh.isOpen())
     {
         contextMenuStripSshOpen.Show(pictureBoxSsh, pictureBoxSsh.Location.X + 35, pictureBoxSsh.Location.Y - 58);
     }
     else
     {
         FormSsh formSsh = new FormSsh();
         formSsh.ShowDialog();
     }
 }