Esempio n. 1
0
        private void getFeaturePathBoundary()
        {
            string outPath = null;
            string outName = "";

            ESRI.ArcGIS.CatalogUI.IGxDialog gxDialog = new ESRI.ArcGIS.CatalogUI.GxDialogClass();
            gxDialog.AllowMultiSelect = false;
            ESRI.ArcGIS.Catalog.IGxObjectFilter flt = null;
            flt = new ESRI.ArcGIS.Catalog.GxFilterFeatureClassesClass();
            gxDialog.ObjectFilter = flt;
            gxDialog.Title        = "Select a Feature Class";
            ESRI.ArcGIS.Catalog.IEnumGxObject eGxObj;
            if (gxDialog.DoModalOpen(0, out eGxObj))
            {
                ESRI.ArcGIS.Catalog.IGxObject gxObj = eGxObj.Next();
                outPath = gxObj.FullName;
                outName = gxObj.BaseName;
                if (!ftrDic.ContainsKey(outName))
                {
                    ftrDic.Add(outName, geoUtil.getFeatureClass(outPath));
                    cmbProjectBoundary.Items.Add(outName);
                }
                else
                {
                    ftrDic[outName] = geoUtil.getFeatureClass(outPath);
                }
                cmbProjectBoundary.SelectedItem = outName;
            }
            return;
        }
 private void getFeaturePath()
 {
     string outPath = null;
     string outName = "";
     ESRI.ArcGIS.CatalogUI.IGxDialog gxDialog = new ESRI.ArcGIS.CatalogUI.GxDialogClass();
     gxDialog.AllowMultiSelect = false;
     ESRI.ArcGIS.Catalog.IGxObjectFilter flt = null;
     flt = new ESRI.ArcGIS.Catalog.GxFilterFeatureClassesClass();
     gxDialog.ObjectFilter = flt;
     gxDialog.Title = "Select a Feature";
     ESRI.ArcGIS.Catalog.IEnumGxObject eGxObj;
     if (gxDialog.DoModalOpen(0, out eGxObj))
     {
         ESRI.ArcGIS.Catalog.IGxObject gxObj = eGxObj.Next();
         outPath = gxObj.FullName;
         outName = gxObj.BaseName;
         if (!ftrDic.ContainsKey(outName))
         {
             ftrDic.Add(outName, geoUtil.getFeatureClass(outPath));
             cmbSampleFeatureClass.Items.Add(outName);
         }
         else
         {
             ftrDic[outName] = geoUtil.getFeatureClass(outPath);
         }
         cmbSampleFeatureClass.Text = outName;
     }
     return;
 }