private void frmBurstReport_Load(object obj, EventArgs eventArgs) { ArrayList arrayList = new ArrayList(); CMapOperator.GetMapILayers(m_iApp.FocusMap, null, arrayList); //string pointTableFieldName = m_Config.GetPointTableFieldName("点性"); //this.label1.Text = pointTableFieldName; //for (int i = 0; i < arrayList.Count; i++) //{ // IFeatureLayer featureLayer = arrayList[i] as IFeatureLayer; // if (featureLayer == null || featureLayer.FeatureClass == null) continue; // if (featureLayer.FeatureClass.ShapeType != esriGeometryType.esriGeometryPoint) continue; // //! 在这儿修改判断条件,判断图层为点图层而且为管线点图层的方式需要做修改 // IBasicLayerInfo pipePoint = m_Config.GetBasicLayerInfo(featureLayer.FeatureClass.AliasName) as IBasicLayerInfo; // if (pipePoint!=null) // { // if (pipePoint.DataType != enumPipelineDataType.Point) continue; // IFeatureClass featureClass = featureLayer.FeatureClass; // this.label1.Text = pipePoint.GetFieldName(PipeConfigWordHelper.PointWords.FSW); // int num = featureClass.Fields.FindField(pipePoint.GetFieldName(PipeConfigWordHelper.PointWords.FSW)); // if (num != -1) // { // ArrayList uVByQueryDef = this.GetUVByQueryDef(featureLayer, pipePoint.GetFieldName(PipeConfigWordHelper.PointWords.FSW)); // for (int j = 0; j < uVByQueryDef.Count; j++) // { // string text = uVByQueryDef[j].ToString(); // if (text.Trim() != "" && !this.cmbDomainValues.Items.Contains(text)) // { // this.cmbDomainValues.Items.Add(text); // } // this.cmbDomainValues.Items.Add(text); // } // } // } //} //if (this.cmbDomainValues.Items.Count > 0) //{ // this.cmbDomainValues.SelectedIndex = 0; //} //ArrayList arrayList2 = new ArrayList(); //GetValues(arrayList2); //for (int j = 0; j < arrayList2.Count; j++) //{ // this.listFieldValues.Items.Add(arrayList2[j].ToString()); //} //if (this.listFieldValues.Items.Count == 0) //{ // this.listFieldValues.Items.Add("阀门"); // this.listFieldValues.Items.Add("阀门井"); //} this.radioUpAndDown.Checked = true; }
private void FormMaiShenAnalysis_Load(object obj, EventArgs eventArgs) { IFeature feature = ((IEnumFeature)_context.FocusMap.FeatureSelection).Next(); //if (feature == null || feature.Shape.GeometryType != esriGeometryType.esriGeometryPolygon) //{ // this.chkRegionAnalysis.Visible = false; //} ArrayList arrayList = new ArrayList(); CMapOperator.GetMapILayers(_context.FocusMap, null, arrayList); for (int i = 0; i < arrayList.Count; i++) { if (arrayList[i] is IFeatureLayer) { IFeatureLayer featureLayer = (IFeatureLayer)arrayList[i]; if (_config.IsPipelineLayer(featureLayer.Name, enumPipelineDataType.Line)) { CheckListFeatureLayerItem class1 = new CheckListFeatureLayerItem(); class1.m_pFeatureLayer = featureLayer; this.checkedListBox1.Items.Add(class1, true); } } } }