using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace mainProgram { public partial class OpenProjectWindow : Form { public OpenProjectWindow() { InitializeComponent(); } private void SelectProjectPathBtn_Click(object sender, EventArgs e) { FolderBrowserDialog dialog = new FolderBrowserDialog(); dialog.Description = "请选择工程文件夹"; if (dialog.ShowDialog() == DialogResult.OK) { if (string.IsNullOrEmpty(dialog.SelectedPath)) { MessageBox.Show(this, "文件夹路径不能为空", "提示"); return; } string savePath = dialog.SelectedPath; ProjectPathTextBox.Text = savePath; } } private void OpenProjectPathBtn_Click(object sender, EventArgs e) { } private void CancelBtn_Click(object sender, EventArgs e) { Close(); } } }