private void toolStripMenuItemSshChange_Click(object sender, EventArgs e) { Ssh.Close(); FormSsh formSsh = new FormSsh(); formSsh.ShowDialog(); }
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"); } }
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(); } }