支持配置信息加载保存
This commit is contained in:
Chenx221 2023-10-05 19:50:08 +08:00
parent 48dbbd8033
commit 859b2839a4
2 changed files with 26 additions and 0 deletions

View File

@ -351,6 +351,7 @@
button5.TabIndex = 5; button5.TabIndex = 5;
button5.Text = "浏览"; button5.Text = "浏览";
button5.UseVisualStyleBackColor = true; button5.UseVisualStyleBackColor = true;
button5.Click += button5_Click;
// //
// textBox5 // textBox5
// //
@ -376,6 +377,7 @@
button4.TabIndex = 2; button4.TabIndex = 2;
button4.Text = "浏览"; button4.Text = "浏览";
button4.UseVisualStyleBackColor = true; button4.UseVisualStyleBackColor = true;
button4.Click += button4_Click;
// //
// textBox4 // textBox4
// //

View File

@ -246,5 +246,29 @@ namespace AsmrManage
ConfigManager.SaveConfig(new AppConfig()); ConfigManager.SaveConfig(new AppConfig());
RefreshSettingPageInfo(); RefreshSettingPageInfo();
} }
private void button4_Click(object sender, EventArgs e) //P4 文件选框1
{
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.Title = "请选择正确的db数据库文件";
openFileDialog1.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
openFileDialog1.Filter = "sqlite db文件|asmr.db";
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
textBox4.Text = openFileDialog1.FileName;
}
}
private void button5_Click(object sender, EventArgs e)
{
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.Title = "请选择DB Browser for SQLite主程序";
openFileDialog1.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
openFileDialog1.Filter = "DB Browser for SQLite主程序|DB Browser for SQLite.exe";
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
textBox5.Text = openFileDialog1.FileName;
}
}
} }
} }