コード例 #1
0
ファイル: Test-XwDbCommand.cs プロジェクト: maxsnts/XwMaxLib
 //***********************************************************************************
 static public void SQLITE_CHANGE_PASSWORD()
 {
     using (XwDbCommand sql = new XwDbCommand("DBCONN_LITETEST"))
     {
         sql.ChangePassword("test");
     }
 }
コード例 #2
0
        //*************************************************************************************************************
        private void butRemovePass_Click(object sender, EventArgs e)
        {
            using (XwDbCommand sql = new XwDbCommand(Config.GetConnectionString(), "Data.SQLite"))
            {
                sql.ChangePassword("");
                Config.MasterPassword = "";
            }

            MessageBox.Show("Password removed", "XwRemote", MessageBoxButtons.OK, MessageBoxIcon.Warning);
        }
コード例 #3
0
        //*************************************************************************************************************
        private void butSetPassword_Click(object sender, EventArgs e)
        {
            if (textMasterPassword.Text == "")
            {
                MessageBox.Show("Passwords must not be empty", "XwRemote", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            if (textMasterPassword.Text != textPasswordRepeat.Text)
            {
                MessageBox.Show("Passwords do not match", "XwRemote", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            using (XwDbCommand sql = new XwDbCommand(Config.GetConnectionString(), "Data.SQLite"))
            {
                sql.ChangePassword(textMasterPassword.Text);
                Config.MasterPassword = textMasterPassword.Text;
            }

            MessageBox.Show("Password added", "XwRemote", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }