Exemple #1
0
        private void buttonTailPartStyle_Click(object sender, EventArgs e)
        {
            if (m_Geometry != null)
            {
                if(m_Geometry.Type==EnumGeometryType.GeoPolyline3D)
                {
                    GSOSimpleLineStyle3D geoStyle3d = m_Geometry.ExtrudeStyle.TailStyle as GSOSimpleLineStyle3D;
                    if (geoStyle3d != null)
                    {
                        FrmSetLineStyle dlg = new FrmSetLineStyle(geoStyle3d, m_GlobeControl);
                        dlg.Show(this);
                    }

                }
                else
                {
                    GSOSimplePolygonStyle3D geoStyle3d = m_Geometry.ExtrudeStyle.TailStyle as GSOSimplePolygonStyle3D;
                    if (geoStyle3d != null)
                    {
                        FrmSetPolygonStyle dlg = new FrmSetPolygonStyle(geoStyle3d, m_GlobeControl);
                        dlg.Show(this);
                    }

                }

            }
        }
 private void buttonSetLineStyle_Click(object sender, EventArgs e)
 {
     GSOSimplePolygonStyle3D geoStyle3d = m_Style as GSOSimplePolygonStyle3D;
     if (geoStyle3d != null)
     {
         FrmSetLineStyle dlg = new FrmSetLineStyle(geoStyle3d.OutlineStyle, m_GlobeControl);
         dlg.Show(this);
     }
 }
Exemple #3
0
        private void buttonSetLineStyle_Click(object sender, EventArgs e)
        {
            GSOSimplePolygonStyle3D geoStyle3d = m_Style as GSOSimplePolygonStyle3D;

            if (geoStyle3d != null)
            {
                FrmSetLineStyle dlg = new FrmSetLineStyle(geoStyle3d.OutlineStyle, m_GlobeControl);
                dlg.Show(this);
            }
        }
        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;
                    }
                }
            }
        }
Exemple #5
0
 private void buttonTailPartStyle_Click(object sender, EventArgs e)
 {
     if (m_Geometry != null)
     {
         if (m_Geometry.Type == EnumGeometryType.GeoPolyline3D)
         {
             GSOSimpleLineStyle3D geoStyle3d = m_Geometry.ExtrudeStyle.TailStyle as GSOSimpleLineStyle3D;
             if (geoStyle3d != null)
             {
                 FrmSetLineStyle dlg = new FrmSetLineStyle(geoStyle3d, m_GlobeControl);
                 dlg.Show(this);
             }
         }
         else
         {
             GSOSimplePolygonStyle3D geoStyle3d = m_Geometry.ExtrudeStyle.TailStyle as GSOSimplePolygonStyle3D;
             if (geoStyle3d != null)
             {
                 FrmSetPolygonStyle dlg = new FrmSetPolygonStyle(geoStyle3d, m_GlobeControl);
                 dlg.Show(this);
             }
         }
     }
 }
        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;

                    }
                }
            }
        }