コード例 #1
0
        private void kryptonButtonOk_Click(object sender, EventArgs e)
        {
            DbHelperSQL.connectionString = getDataBaseString();
            using (SqlConnection conn = new SqlConnection(DbHelperSQL.connectionString))
            {
                conn.Open();
                if (ConnectionState.Open == conn.State)
                {
                    conn.Close();
                    IniFile.setDataBaseString(IP, dataBaseName, userID, password);
                    this.Hide();

                    FormLogin AccessControl = new FormLogin(OpenMode.Login);
                    AccessControl.ShowDialog();
                }
                else
                {
                    MyMessageBox.MessageBoxOK("Êý¾Ý¿âÁ¬½Óʧ°Ü");
                }
            }
        }
コード例 #2
0
 private void toolStripMenuItemLock_Click(object sender, EventArgs e)
 {
     FormLogin formLogin = new FormLogin(OpenMode.Unclock);
     formLogin.ShowDialog();
 }