Пример #1
0
        private void InitBrokePoint()
        {
            int userClassID;
            int userID;
            int userSubID;
            IFeatureClassContainer featureDataset =
                (IFeatureClassContainer)this._nearestEdgeInfo.GeometricNetwork.FeatureDataset;
            IFeatureClass pointClass = null;
            IFeatureClass lineClass  = null;
            int           num3       = 0;


            pointClass = _pipeLayer.GetLayers(enumPipelineDataType.Point)[0].FeatureClass;
            lineClass  = _pipeLayer.GetLayers(enumPipelineDataType.Line)[0].FeatureClass;
            this._networkInfo.LayerLine =
                MapHelper.FindFeatureLayerByFCName(m_iApp.FocusMap as IBasicMap, ((IDataset)lineClass).Name, false) as
                IFeatureLayer;
            this._networkInfo.LayerPoint =
                MapHelper.FindFeatureLayerByFCName(m_iApp.FocusMap as IBasicMap, ((IDataset)pointClass).Name, false) as
                IFeatureLayer;
            INetElements network = (INetElements)this._nearestEdgeInfo.GeometricNetwork.Network;

            network.QueryIDs(this._nearestEdgeInfo.EdgeID, esriElementType.esriETEdge, out userClassID, out userID,
                             out userSubID);
            this._networkInfo.LineFeature = lineClass.GetFeature(userID);
            Label label = this.lblPickPipeInfo;

            string[] name = new string[]
            { this._networkInfo.LayerLine.Name, ",", lineClass.OIDFieldName, "=", userID.ToString() };
            label.Text = string.Concat(name);
            string.Format("\r\n爆管点位置({0:f2},{1:f2},{2:f2})", this._nearestEdgeInfo.Location.X,
                          this._nearestEdgeInfo.Location.Y, this._nearestEdgeInfo.Location.Z);

            //初始化下拉菜单

            cmbDomainValues.Items.Clear();
            IBasicLayerInfo pLayerInfo = _pipeLayer.GetLayers(enumPipelineDataType.Point)[0];
            IYTField        pField     = pLayerInfo.GetField(PipeConfigWordHelper.PointWords.FSW);

            this.label1.Text = pField.Name;
            if (!string.IsNullOrEmpty(pField.DomainValues))
            {
                string[] domianValues = pField.DomainValues.Split('/');
                foreach (var onePair in domianValues)
                {
                    cmbDomainValues.Items.Add(onePair);
                }
            }
            if (this.listFieldValues.Items.Count == 0)
            {
                this.listFieldValues.Items.Add("阀门");
                this.listFieldValues.Items.Add("阀门井");
            }
        }
Пример #2
0
        public void GetValues(ArrayList Values)
        {
            Values.Clear();
            if (this._networkInfo.LayerPoint == null)
            {
                return;
            }
            IBasicLayerInfo pipePoint =
                m_Config.GetBasicLayerInfo(this._networkInfo.LayerPoint.FeatureClass.AliasName) as IBasicLayerInfo;

            //IPipePoint pipePoint = m_Config.GetSubLayer(this._networkInfo.LayerPoint, enumPipelineDataType.Point) as IPipePoint;

            //string text = CRegOperator.GetRegistryKey().GetValue("节点性质字段值", "").ToString();
            string text = pipePoint.GetField(PipeConfigWordHelper.PointWords.FSW).DomainValues;

            for (int num = text.IndexOf("/"); num != -1; num = text.IndexOf("/"))
            {
                Values.Add(text.Substring(0, num));
                text = text.Substring(num + 1, text.Length - num - 1);
            }
        }