C# 目录必须是上个文本框的子级目录
1 private void btNet_Click(object sender, EventArgs e){
2 fB.Description = "选择你要把.NET解释部署到哪个目录
它必须是站点根目录或者子级目录";
3 fB.SelectedPath = Application.StartupPath + "wwwroot";
4 do{
5 fB.SelectedPath = tbnet.Text;
6 if (fB.ShowDialog().GetHashCode() == 1){
7 if (fB.SelectedPath.Contains(tbRoot.Text)){
8 tbnet.Text = fB.SelectedPath;
9 }else if (MessageBox.Show("必须是站点主目录的平级目录或者子级目录", ".NET作用无法达到", MessageBoxButtons.RetryCancel, MessageBoxIcon.Information).GetHashCode() == 4){
10 continue;
11 }else{
12 break;
13 }
14 }else{
15 break;
16 }
17 }while (fB.SelectedPath.Contains(tbRoot.Text) == false);{
18 tbnet.Text = tbRoot.Text;
19 }
20 }
补充:软件开发 , C# ,