• 大小: 12.95MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-08-04
  • 语言: C#
  • 标签: Skyline  C#  管线  三维  

资源简介

skyline二次开发,采用C#语言,生成管线,加载3D模型,均采用两种不同方式,bin文件夹中提供了各类数据

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using TerraExplorerX;
using System.Data.OleDb;

namespace SkylineTest
{
    public partial class Form1 : Form
    {
        private TerraExplorerX.TerraExplorer TECoClass;

        //创建圆需要用到的接口
        private ITerraExplorer5 mTerraExplorer;
        private IobjectManager5 mobjectManager;
        private IMenu mMenue;
        private IInformationTree5 mInformationTee;
        private ITENavigationMap5 mNavigation;
        private IRender5 mRender;
        private IPlane5 mPlane;
        private _ITENavigationMapEvents mTEnavigationEvt;
        private ITerrain3DRegbase5 mTerra3DRegbase;
        private ICoordSys3 mCoordSys;

        private OleDbCommand sqlCommand1;
        private OleDbConnection sqlConnection1;

        public Form1()
        {
            InitializeComponent();

            TECoClass = new TerraExplorerClass();
            mTerraExplorer = (ITerraExplorer5)TECoClass;
            mPlane = (IPlane5)TECoClass;
            mNavigation = (ITENavigationMap5)TECoClass;
            mRender = (IRender5)TECoClass;
            mMenue = (IMenu)TECoClass;
            mobjectManager = (IobjectManager5)TECoClass;
            mInformationTee = (IInformationTree5)TECoClass;

            //mTEnavigationEvt = (_ITENavigationMapEvents)TECoClass;

            //TECoClass.OnLButtonDblClk += new _ITerraExplorerEvents5_OnLButtonDblClkEventHandler(map_OnLButton);
            try
            {
                //mTerraExplorer.LoadEx(Application.StartupPath + @“\globe.mpt“ ““ ““ 0);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }

        private void 打开OToolStripMenuItem_Click(object sender EventArgs e)
        {
            try
            {
                string filename;
                OpenFileDialog OpenFL = new OpenFileDialog();
                OpenFL.title = “Open a File“;
                OpenFL.Filter = “FLY(*.fly文件)|*.fly|MPT(*.mpt文件)|*.mpt|All Format(*.*)|*.*“;
                OpenFL.ShowDialog();
                filename = OpenFL.FileName;
                mTerraExplorer.LoadEx(filename ““ ““ 0);
            }
            catch (Exception)
            {
                
            }
            
        }

        private void 加载管线数据ToolStripMenuItem_Click(object sender EventArgs e)
        {
            try
            {
                string sConnString = “Provider=MicroSoft.Jet.OLEDB.4.0;Data Source=“ + Application.StartupPath + @“\test.mdb“;
                sqlConnection1 = new OleDbConnection(sConnString);

                mCoordSys = (ICoordSys3)TECoClass;


                string sSQL = “SELECT *FROM GX“;
                sqlCommand1 = new OleDbCommand(sSQL sqlConnection1);

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件         294  2016-04-11 16:44  注意先看一下.txt
     目录           0  2016-04-11 16:02  SkylineTest\
     目录           0  2016-04-11 16:02  SkylineTest\SkylineTest\
     文件       31313  2014-04-11 15:22  SkylineTest\SkylineTest\Form1.Designer.cs
     文件       18007  2014-04-11 15:38  SkylineTest\SkylineTest\Form1.cs
     文件       24906  2014-04-11 15:22  SkylineTest\SkylineTest\Form1.resx
     文件         492  2016-01-08 10:57  SkylineTest\SkylineTest\Program.cs
     目录           0  2016-04-11 16:02  SkylineTest\SkylineTest\Properties\
     文件        1354  2016-01-08 10:57  SkylineTest\SkylineTest\Properties\AssemblyInfo.cs
     文件        3119  2014-04-11 14:12  SkylineTest\SkylineTest\Properties\Resources.Designer.cs
     文件        6201  2014-04-11 14:12  SkylineTest\SkylineTest\Properties\Resources.resx
     文件        1098  2016-01-08 10:57  SkylineTest\SkylineTest\Properties\Settings.Designer.cs
     文件         249  2016-01-08 10:57  SkylineTest\SkylineTest\Properties\Settings.settings
     文件        4830  2014-04-11 14:15  SkylineTest\SkylineTest\SkylineTest.csproj
     目录           0  2016-04-11 16:02  SkylineTest\SkylineTest\bin\
     目录           0  2016-04-11 16:32  SkylineTest\SkylineTest\bin\Debug\
     文件       15872  2016-04-11 16:31  SkylineTest\SkylineTest\bin\Debug\AxInterop.TerraExplorerX.dll
     文件      628224  2016-04-11 16:31  SkylineTest\SkylineTest\bin\Debug\Interop.TerraExplorerX.dll
     文件       44032  2016-04-11 16:31  SkylineTest\SkylineTest\bin\Debug\SkylineTest.exe
     文件       34304  2016-04-11 16:31  SkylineTest\SkylineTest\bin\Debug\SkylineTest.pdb
     文件       11600  2016-04-11 16:31  SkylineTest\SkylineTest\bin\Debug\SkylineTest.vshost.exe
     文件         490  2016-04-11 16:31  SkylineTest\SkylineTest\bin\Debug\SkylineTest.vshost.exe.manifest
     文件       60503  2016-04-11 16:31  SkylineTest\SkylineTest\bin\Debug\Triplane-Banner.x
     文件        3126  2016-04-11 16:31  SkylineTest\SkylineTest\bin\Debug\pipeTextureCyan.bmp
     文件        3126  2016-04-11 16:31  SkylineTest\SkylineTest\bin\Debug\pipeTextureCyan2.bmp
     文件        3126  2016-04-11 16:31  SkylineTest\SkylineTest\bin\Debug\pipeTextureGreen.bmp
     文件     3239936  2016-04-11 16:31  SkylineTest\SkylineTest\bin\Debug\test.mdb
     文件        1364  2016-04-11 16:31  SkylineTest\SkylineTest\bin\Debug\test2.FLY
     文件    13403571  2016-04-11 16:31  SkylineTest\SkylineTest\bin\Debug\test2.mpt
     目录           0  2016-04-11 16:02  SkylineTest\SkylineTest\img\
     文件        5430  2011-06-22 15:19  SkylineTest\SkylineTest\img\PipeLines.ico
............此处省略21个文件信息

评论

共有 条评论