如何利用Skyline6.1实现多球对比功能

直接看代码:

 1 using System;
 2 using System.Collections.Generic;
 3 using System.ComponentModel;
 4 using System.Data;
 5 using System.Drawing;
 6 using System.Linq;
 7 using System.Text;
 8 using System.Windows.Forms;
 9 using TerraExplorerX;
10 
11 namespace Multi3DDemo
12 {
13     public partial class Form1 : Form
14     {
15         private SGWorld61 mainSGWorld;
16         private SGWorld61 MainSGWorld
17         {
18             get
19             {
20                 if (mainSGWorld == null)
21                     mainSGWorld = new SGWorld61Class();
22                 return mainSGWorld;
23             }
24         }
25 
26         private SGWorld61 sgworldEx;
27         private SGWorld61 SGWorldEx
28         {
29             get
30             {
31                 if (sgworldEx == null)
32                 {
33                     sgworldEx = (SGWorld61)axTE3DWindowEx1.CreateInstance("TerraExplorerX.SGWorld61");
34                 }
35                 return sgworldEx;
36             }
37         }
38 
39         public Form1()
40         {
41             InitializeComponent();
42         }
43 
44         private void toolStripButton1_Click(object sender, EventArgs e)
45         {
46             OpenFileDialog dialog = new OpenFileDialog();
47             dialog.Filter = "Fly文件(*.fly)|*.fly|Mpt文件(*.mpt)|*.mpt";
48             if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.Cancel)
49                 return;
50 
51             MainSGWorld.Project.Open(dialog.FileName, true);
52         }
53 
54         private void toolStripButton2_Click(object sender, EventArgs e)
55         {
56             OpenFileDialog dialog = new OpenFileDialog();
57             dialog.Filter = "Fly文件(*.fly)|*.fly|Mpt文件(*.mpt)|*.mpt";
58             if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.Cancel)
59                 return;
60 
61             SGWorldEx.Project.Open(dialog.FileName, true);
62         }
63 
64         private void toolStripButton3_Click(object sender, EventArgs e)
65         {
66             MainSGWorld.Application.Multiple3DWindows.SetAsLeader();
67 
68             MainSGWorld.Application.Multiple3DWindows.LinkPosition(SGWorldEx);
69         }
70 
71         private void Form1_Load(object sender, EventArgs e)
72         {
73 
74         }
75     }
76 }

 

转载于:https://www.cnblogs.com/yitianhe/archive/2012/12/28/2837311.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值