Esempio n. 1
0
        private void btnAnalyse_Click(object obj, EventArgs eventArgs)
        {
            CheckListFeatureLayerItem pclass = this.LayerBox.SelectedItem as CheckListFeatureLayerItem;

            this.DeleteAllElements(this.m_iApp.ActiveView);
            if (this.preAlarmResult_0 == null)
            {
                this.preAlarmResult_0                = new PreAlarmResult(m_iApp, _config);
                this.preAlarmResult_0.App            = this.m_iApp;
                this.preAlarmResult_0.m_pCurLayer    = pclass.m_pFeatureLayer;
                this.preAlarmResult_0.m_strLayerName = this.LayerBox.Text;
                this.preAlarmResult_0.m_nExpireTime  = (int)Convert.ToSingle(this.txBoxExpireTime.Text.Trim());
                this.preAlarmResult_0.Show();
            }
            else if (this.preAlarmResult_0.Visible)
            {
                this.preAlarmResult_0.m_strLayerName = this.LayerBox.Text;
                this.preAlarmResult_0.m_pCurLayer    = pclass.m_pFeatureLayer;
                this.preAlarmResult_0.m_nExpireTime  = (int)Convert.ToSingle(this.txBoxExpireTime.Text.Trim());
                this.preAlarmResult_0.ThrougAllLayer();
            }
            else
            {
                this.preAlarmResult_0.m_strLayerName = this.LayerBox.Text;
                this.preAlarmResult_0.m_pCurLayer    = pclass.m_pFeatureLayer;
                this.preAlarmResult_0.m_nExpireTime  = (int)Convert.ToSingle(this.txBoxExpireTime.Text.Trim());
                this.preAlarmResult_0.ThrougAllLayer();
                this.preAlarmResult_0.Visible = true;
            }
        }
Esempio n. 2
0
        private void method_3()
        {
            this.m_alCheckedLayer = new ArrayList();
            int count = this.chkLstLayers.CheckedItems.Count;

            this.m_alCheckedLayer.Clear();
            for (int i = 0; i < count; i++)
            {
                CheckListFeatureLayerItem item = this.chkLstLayers.CheckedItems[i] as CheckListFeatureLayerItem;
                this.m_alCheckedLayer.Add(item.m_pFeatureLayer);
            }
        }
Esempio n. 3
0
 public void AddName(ILayer pLayer)
 {
     if (pLayer is IFeatureLayer)
     {
         IFeatureLayer featureLayer = pLayer as IFeatureLayer;
         if (this.pPipeCfg.IsPipelineLayer(featureLayer.FeatureClass))
         {
             CheckListFeatureLayerItem pclass = new CheckListFeatureLayerItem();
             pclass.m_pFeatureLayer = featureLayer;
             this.LayerBox.Items.Add(pclass);
         }
     }
 }
Esempio n. 4
0
 public void AddName(ILayer pLayer)
 {
     try
     {
         if (pLayer != null)
         {
             IFeatureLayer             featureLayer = pLayer as IFeatureLayer;
             CheckListFeatureLayerItem checkListFeatureLayerItem = new CheckListFeatureLayerItem()
             {
                 m_pFeatureLayer = featureLayer
             };
             IFeatureClass featureClass = featureLayer.FeatureClass;
             if (featureLayer.FeatureClass.FeatureType != (esriFeatureType)11)
             {
                 if ((!this.radBtnPt.Checked
                     ? false
                     : m_PipeConfig.IsPipelineLayer(featureLayer.Name, enumPipelineDataType.Point)))
                 {
                     this.chkLstLayers.Items.Add(checkListFeatureLayerItem);
                 }
                 if ((!this.radBtnLn.Checked
                     ? false
                     : m_PipeConfig.IsPipelineLayer(featureLayer.Name, enumPipelineDataType.Line)))
                 {
                     this.chkLstLayers.Items.Add(checkListFeatureLayerItem);
                 }
                 if ((!this.radBtnOther.Checked ||
                      m_PipeConfig.IsPipelineLayer(featureLayer.Name, enumPipelineDataType.Line)
                     ? false
                     : !m_PipeConfig.IsPipelineLayer(featureLayer.Name, enumPipelineDataType.Point)))
                 {
                     this.chkLstLayers.Items.Add(checkListFeatureLayerItem);
                 }
             }
         }
     }
     catch (Exception exception)
     {
     }
 }
Esempio n. 5
0
        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);
                    }
                }
            }
        }