private void buttonEdit1_Click(object sender, EventArgs e)
 {
     try
     {
         DirectorySelection dirsel = new DirectorySelection(Environment.SpecialFolder.MyComputer, "", false);//("承包地块图层*.shp|*.shp", false);
         if (dirsel.IsDirectorySelected() == true)
         {
             this.textBox2.Text = dirsel.GetSelectedPath;
         }
     }
     catch (Exception ee)
     {
         MessageBox.Show(ee.Message, "提示");
     }
 }
Beispiel #2
0
 //选择 另存到目录内为:
 private void Btn_SaveAsShape_Click(object sender, EventArgs e)
 {
     try
     {
         DirectorySelection dirSel = new DirectorySelection(Environment.SpecialFolder.Desktop, "", true);
         if (dirSel.IsDirectorySelected() == true)
         {
             string dirPath = dirSel.GetSelectedPath;
             this.textBox1.Text = dirPath;
         }
     }
     catch (Exception ee)
     {
         MessageBox.Show(ee.Message, "提示");
     }
 }