private void button4_Click(object sender, EventArgs e)//打开词库
{
listView1.Items.Clear();
openFileDialog.Filter = "所有数据库文件|*.accdb";//设置文件类型
openFileDialog.Title = "选择要打开的词库"; //设置标题
openFileDialog.AddExtension = true; //是否自动增加所辍名
openFileDialog.AutoUpgradeEnabled = true; //是否随系统升级而升级外观
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
PublicClass.DBPath=openFileDialog.FileName;//直接把文件地址读到内存中去
LoadDB();//打开词库
}
else
{
return;
}
}
openFileDialog如何使用
最新推荐文章于 2024-04-07 15:10:09 发布