示例#1
0
 /// <summary>
 /// 创建GDB
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btn_createGDB_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrWhiteSpace(txt_newGDBFolder.Text))
     {
         MessageBox.Show("请选择GDB保存路径");
         return;
     }
     if (string.IsNullOrWhiteSpace(txt_newGDBName.Text))
     {
         MessageBox.Show("请填写GDB名称");
         return;
     }
     try
     {
         string gdbPath = ZWorkspace.CreateGDB(txt_newGDBFolder.Text, txt_newGDBName.Text);
         if (!string.IsNullOrWhiteSpace(gdbPath))
         {
             txt_gdbPath.Text     = gdbPath;
             panel_newGDB.Visible = false;
         }
     }
     catch (Exception ex) {
         MessageBox.Show(ex.Message);
     }
 }
示例#2
0
 /// <summary>
 /// 确定按钮
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btn_OK_GDB_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrWhiteSpace(gdbPath))
     {
         MessageBox.Show("请选择*.gdb文件");
     }
     else
     {
         workspaceHelper = ZWorkspace.GetFileGDBWorkspace(gdbPath);
         DialogResult    = DialogResult.OK;
     }
 }