Beispiel #1
0
        private void listViewStyle_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (listViewStyle.SelectedIndices.Count > 0)
            {
                tabControl1.TabPages.Clear();
                GSOStyle         oldStyle   = null;
                EnumAltitudeMode oldAltMode = m_Geometry.AltitudeMode;
                // 先复制一个原来的哦,以便在对话框取消的时候恢复
                if (m_Geometry.Style != null)
                {
                    oldStyle = m_Geometry.Style.Clone();
                }
                if (listViewStyle.SelectedIndices[0] == 0)
                {
                    GSOSimpleLineStyle3D simpleLineStyle = m_Geometry.Style as GSOSimpleLineStyle3D;
                    if (simpleLineStyle == null)
                    {
                        m_Geometry.Style = new GSOSimpleLineStyle3D();
                    }

                    FrmSetLineStyle dlg = new FrmSetLineStyle(m_Geometry.Style, mfeature, mlayer, m_GlobeControl);
                    if (dlg.ShowDialog(this) == DialogResult.Cancel)
                    {
                        m_Geometry.Style = oldStyle;
                    }
                }
                else if (listViewStyle.SelectedIndices[0] == 1)
                {
                    GSOPipeLineStyle3D pipeLineStyle = m_Geometry.Style as GSOPipeLineStyle3D;

                    // 管线暂不支持依地模式
                    if (m_Geometry.AltitudeMode == EnumAltitudeMode.ClampToGround)
                    {
                        m_Geometry.AltitudeMode = EnumAltitudeMode.RelativeToGround;
                    }
                    if (pipeLineStyle == null)
                    {
                        m_Geometry.Style = new GSOPipeLineStyle3D();
                    }

                    FrmSetPipelineStyle dlg = new FrmSetPipelineStyle(m_Geometry.Style, mfeature, mlayer, m_GlobeControl);

                    // 恢复一下
                    if (dlg.ShowDialog(this) == DialogResult.Cancel)
                    {
                        m_Geometry.Style        = oldStyle;
                        m_Geometry.AltitudeMode = oldAltMode;
                    }
                }
            }
        }
        public CtrlPipelineStyleSetting(GSOStyle style, GSOFeature feature, GSOLayer layer, GSOGlobeControl globeControl)
        {
            InitializeComponent();
            m_GlobeControl = globeControl;
            mlayer = layer;
            mfeature = feature;
            altituMode = feature.Geometry.AltitudeMode;

            // 如果m_OldStyle不存在,先备份一个
            if (style != null)
            {
                m_OldStyle = style.Clone();
            }
            m_Style = style;
        }
Beispiel #3
0
        public CtrlExtentSectionlineStyleSetting(GSOStyle style, GSOFeature feature, GSOLayer layer, GSOGlobeControl globeControl)
        {
            InitializeComponent();
            m_GlobeControl = globeControl;
            mlayer         = layer;
            mfeature       = feature;
            altituMode     = feature.Geometry.AltitudeMode;

            // 如果m_OldStyle不存在,先备份一个
            if (style != null)
            {
                m_OldStyle = style.Clone();
            }
            m_Style = style;
        }
Beispiel #4
0
        private void listViewStyle_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (listViewStyle.SelectedIndices.Count > 0)
            {
                m_GlobeControl.Globe.AddToEditHistroy(mlayer, mfeature, EnumEditType.Modify);

                EnumAltitudeMode oldAltMode = m_Geometry.AltitudeMode;

                if (listViewStyle.SelectedIndices[0] == 0)
                {
                    AddTabPages("simpleLineStyle", "简单线", new CtrlLineStyleSetting(m_Geometry.Style, mfeature, mlayer, m_GlobeControl));
                }
                else if (listViewStyle.SelectedIndices[0] == 1)
                {
                    AddTabPages("pipelineStyle", "管线", new CtrlPipelineStyleSetting(m_Geometry.Style, mfeature, mlayer, m_GlobeControl));
                }
                else if (listViewStyle.SelectedIndices[0] == 2)
                {
                    AddTabPages("extendSectionLineStyle", "管沟", new CtrlExtentSectionlineStyleSetting(m_Geometry.Style, mfeature, mlayer, m_GlobeControl));
                }
            }
        }