Ejemplo n.º 1
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (textBox1.Text.Length > 1)
     {
         try
         {
             if (textBox2.Text.Trim().Length > 1)
             {
                 DbHelperSQLite.connectionString = "Data Source=" + textBox1.Text.Trim() + ";Version=3;Password="******"";
             }
             else
             {
                 DbHelperSQLite.connectionString = "Data Source=" + textBox1.Text.Trim() + ";Version=3;";
             }
             DbHelperSQLite.ChangePSW(textBox3.Text.Trim());
             MessageBox.Show("修改密码成功!");
         }
         catch (System.Exception ex)
         {
             MessageBox.Show("修改密码失败!");
         }
     }
     else
     {
         MessageBox.Show("请选择SQLITE文件!");
     }
 }