Newer
Older
EMS_REFACTOR / FrmPipeSetEdit.cs
nn-203 on 26 Jul 2017 1 KB first commit
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using DevComponents.DotNetBar;
using GeoScene.Globe;

namespace Cyberpipe
{
    public partial class frmPipeSetEdit :Office2007Form
    {
        GSOGlobeControl globeControl1;
        List<string> pipeLayerNames;
        public frmPipeSetEdit(GSOGlobeControl globeControl,List<string> _list)
        {
            InitializeComponent();
            globeControl1 = globeControl;
            pipeLayerNames = _list;
        }
        /// <summary>
        /// 确定按钮事件处理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnEnter_Click(object sender, EventArgs e)
        {
            GSOLayer layer = globeControl1.Globe.Layers.GetLayerByCaption(cmbPipeShow.Text);
            if (layer == null) return;
            layer.Editable = true;
            globeControl1.Globe.DestLayerFeatureAdd = layer;
            DialogResult = DialogResult.OK;
        }
        /// <summary>
        /// 窗体初始化事件处理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void frmPipeSetEdit_Load(object sender, EventArgs e)
        {            
            foreach (string pipeLineName in pipeLayerNames)
            {
                cmbPipeShow.Items.Add(pipeLineName);
            }
            if (cmbPipeShow.Items.Count <= 0)
            {
                return;
            }
            cmbPipeShow.SelectedIndex = 0;
        }

    }
}