示例#1
0
        public void CreateGlobe()
        {
            try
            {
                _globeControl      = new GlobeControl();
                _globeControl.Dock = DockStyle.Fill;
                this.ShowPLG.Controls.Clear();
                this.ShowPLG.Controls.Add(_globeControl);
                _globeView = _globeControl.Globe;
                _globeView.GlobeViewSetting.ShowLogo = false;//临时添加
            }
            catch (System.Exception e)
            {
                MessageBox.Show(
                    "三维视图初始化失败.\n" + e.Message,
                    "iTelluro GlobeEngine",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Error
                    );

                Close();
                Environment.Exit(0);
            }
            _globeLayerUI.Connect(_globeView);
            _labelEditUI.Connect(_globeView);
            _globeRouteUI.Connect(_globeView);
            _globeRoutePlusUI.Connect(_globeView);
        }
示例#2
0
        /// <summary>
        /// 加载组件
        /// </summary>
        /// <param name="Globe"></param>
        /// <param name="Parent"></param>
        public void LoadPlugin(iTelluro.GlobeEngine.MapControl3D.GlobeView Globe, PnlLeftControl Parent)
        {
            _globeView = Globe;
            _parent    = Parent;
            this.Dock  = DockStyle.Fill;
            //绑定控制台输出
            //textBox4.BindConsole();
            try
            {
                //绑定数据源
                NodeModel[] nodes = Parent.ProjectModel.Nodes.Where(t => t.PNode == Guids.PMHL).ToArray();
                fileChooseControl1.BindSource(Parent, (nodes != null && nodes.Count() > 0) ? nodes[0].NodeName : string.Empty);
                fileChooseControl2.BindSource(Parent, (nodes != null && nodes.Count() > 1) ? nodes[1].NodeName : string.Empty);
                fileChooseControl3.BindSource(Parent, (nodes != null && nodes.Count() > 2) ? nodes[2].NodeName : string.Empty);

                //显示之前的结果
                _xmlPath = Path.Combine(Path.GetDirectoryName(Parent.ProjectModel.ProjectPath), ConfigNames.SlopeConfluence);
                if (File.Exists(_xmlPath))
                {
                    PMHLResult result = XmlHelper.Deserialize <PMHLResult>(_xmlPath);
                    if (result != null)
                    {
                        textBox1.Text = result.L2 == 0 ? "" : result.L2.ToString();
                        textBox2.Text = result.l2 == 0 ? "" : result.l2.ToString();
                        textBox3.Text = result.A2 == 0 ? "" : result.A2.ToString();
                    }
                }
            }
            catch
            {
            }
            Parent.UIParent.Controls.Add(this);
        }
示例#3
0
        /// <summary>
        /// 加载tif到三维视图
        /// </summary>
        /// <param name="name">图层名称</param>
        /// <param name="Categorytype">出图类型</param>
        /// <param name="tifFilePath">tif文件路径</param>
        /// <param name="globe">三维球实例</param>
        /// <returns>返回生成的图层</returns>
        public static void LoadTifToMap(DomLayerInfo layerInfo, GlobeView globe)
        {
            LonLatDataLayer lyr = (LonLatDataLayer)globe.GlobeLayers.DataLayers.FindLayer(layerInfo.LyrName);

            if (lyr == null)
            {
                LonLatDataLayer.LonLatDataLayerDescriptor des =
                    new LonLatDataLayer.LonLatDataLayerDescriptor();

                des.Category                 = layerInfo.Category;
                des.DataName                 = layerInfo.LyrName;
                des.FileExtension            = "png";
                des.LayerName                = layerInfo.LyrName;
                des.LevelZeroTileSizeDegrees = 2.25;
                des.LocalPath                = layerInfo.TileDirPath;
                des.NumLevels                = layerInfo.LevelNum;
                des.Opacity = 200;
                des.Url     = "http://localhost";
                des.Visible = true;
                des.East    = layerInfo.East;
                des.West    = layerInfo.West;
                des.North   = layerInfo.North;
                des.South   = layerInfo.South;
                lyr         = LonLatDataLayer.LoadDataLayer(des);
                globe.GlobeLayers.DataLayers.Add(lyr);
            }
            lyr.ResetCache();
            lyr.Visible = false;
        }
 /// <summary>
 /// 加载组件
 /// </summary>
 /// <param name="Globe"></param>
 /// <param name="Parent"></param>
 public void LoadPlugin(iTelluro.GlobeEngine.MapControl3D.GlobeView Globe, PnlLeftControl Parent)
 {
     _globeView = Globe;
     _parent    = Parent;
     this.Dock  = DockStyle.Fill;
     //绑定控制台输出
     //textBox4.BindConsole();
     Parent.UIParent.Controls.Add(this);
 }
示例#5
0
        public static LonLatDataLayer CreateDomLyr(DomLayerInfo lyrInfo, GlobeView globe)
        {
            if (lyrInfo == null)
            {
                return(null);
            }

            if (!File.Exists(lyrInfo.SrcTifFilePath) &&
                !File.Exists(lyrInfo.TileDirPath) &&//mbt
                !Directory.Exists(lyrInfo.TileDirPath))   //切片目录
            {
                return(null);
            }

            DataLayer tmp = globe.GlobeLayers.DataLayers.FindLayer(lyrInfo.LyrName);

            if (tmp != null)
            {
                MsgBox.ShowError("同名图层已存在,请尝试点击刷新按钮或修改图层名!");
                return(null);
            }

            LonLatDataLayer.LonLatDataLayerDescriptor des = new LonLatDataLayer.LonLatDataLayerDescriptor();
            if (lyrInfo.Category.Trim() == string.Empty)
            {
                des.Category = "本地影像数据";
            }
            else
            {
                des.Category = "本地影像数据\\" + lyrInfo.Category;
            }
            des.DataName                 = lyrInfo.LyrName;
            des.FileExtension            = "png";
            des.LayerName                = lyrInfo.LyrName;
            des.LevelZeroTileSizeDegrees = lyrInfo.BeginLevelSize;
            des.LocalPath                = lyrInfo.TileDirPath;
            des.NumLevels                = lyrInfo.LevelNum;
            des.Opacity = 255;
            //des.Url = "http://localhost";
            des.Visible = true;
            des.East    = lyrInfo.East;
            des.West    = lyrInfo.West;
            des.North   = lyrInfo.North;
            des.South   = lyrInfo.South;

            LonLatDataLayer dataLyr = LonLatDataLayer.LoadDataLayer(des);

            globe.GlobeLayers.DataLayers.Add(dataLyr);
            //dataLyr.ResetCache();
            return(dataLyr);
        }
示例#6
0
 /// <summary>
 /// 初始化Globe
 /// </summary>
 private void CreateGlobe()
 {
     try
     {
         _globeView      = new GlobeView();
         _globeView.Dock = DockStyle.Fill;
         _globeView.GlobeViewSetting.ShowLogo = false;
         // 三维窗口事件
         _globeView.GlobeKeyPress += new EventHandler <KeyEventArgs>(OnGlobeKeyPress);
     }
     catch (System.Exception e)
     {
         MessageBox.Show("三维视图初始化失败.\n" + e.Message, "iTelluro GlobeEngine", MessageBoxButtons.OK, MessageBoxIcon.Error);
         Environment.Exit(0);
     }
     this.panelGlobe.Controls.Add(_globeView);
 }
示例#7
0
        /// <summary>
        /// 加载组件
        /// </summary>
        /// <param name="Globe"></param>
        /// <param name="Parent"></param>
        public void LoadPlugin(iTelluro.GlobeEngine.MapControl3D.GlobeView Globe, PnlLeftControl Parent)
        {
            _globeView = Globe;
            _parent    = Parent;
            this.Dock  = DockStyle.Fill;
            //绑定控制台输出
            //textBox4.BindConsole();
            //初始化基础参数
            DefaultArgModel model = XmlHelper.Deserialize <DefaultArgModel>(Path.Combine(Path.GetDirectoryName(Parent.ProjectModel.ProjectPath),
                                                                                         ConfigNames.DefaultArgModel));

            if (model != null)
            {
                txteps1.Text = model.esp1;
                txteps2.Text = model.esp2;
                txtp1.Text   = model.p1;
                txtQm.Text   = model.Qm;
                txttc.Text   = model.tc;
            }
            Parent.UIParent.Controls.Add(this);
        }
示例#8
0
 public PnlLeftControl(GlobeView globeView, DevComponents.DotNetBar.TabControl tabControl)
     : this(globeView)
 {
     this._tabControl = tabControl;
 }
示例#9
0
 /// <summary>
 /// 初始化三维球构造函数
 /// </summary>
 /// <param name="app">三维球</param>
 public PnlLeftControl(GlobeView app)
     : this()
 {
     _globeView = app;
     _domLoader = new DomLoader(app);
 }