public partial class Form1 : Form
{
private TerraExplorerClass _TE;
public Form1()
{
InitializeComponent();
_TE = new TerraExplorerX.TerraExplorerClass();
_TE.OnLoadFinished += new _ITerraExplorerEvents5_OnLoadFinishedEventHandler(_TE_OnLoadFinished);
}
void _TE_OnLoadFinished()
{
// Fly to the Washington DC when fly is loaded
IPlane5 IPlane = _TE as IPlane5;
IPlane.FlyTo(-77.036667, 38.895111, 1500, 1000, 0, -45.0, "FlyToLocation");
}
private void Form1_Load(object sender, EventArgs e)
{
// Get ITerraExplorer5 interface from _TE object
ITerraExplorer5 ITerraExplorer = _TE as ITerraExplorer5;
// Load default developer fly file from www.skylineglobe.com web site.
string fly = @"http://www.skylinesoft.com/SkylineGlobe/WebClient/PresentationLayer/WebClient/SkyglobeLB.fly";
ITerraExplorer.Load(fly);
}
}
Imports TerraExplorerX
Public Class Form1
Private _TE As TerraExplorer
Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
_TE = New TerraExplorerX.TerraExplorerClass()
AddHandler _TE.OnLoadFinished, AddressOf _TE_OnLoadFinished
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Get ITerraExplorer5 interface from _TE object
Dim ITerraExplorer As ITerraExplorer5 = _TE
' Load default developer fly file from www.skylineglobe.com web site.
Dim fly As String = "http://www.skylinesoft.com/SkylineGlobe/WebClient/PresentationLayer/WebClient/SkyglobeLB.fly"
ITerraExplorer.Load(fly)
End Sub
Private Sub _TE_OnLoadFinished()
' Fly to the Washington DC when fly is loaded
Dim IPlane As IPlane5 = TryCast(_TE, IPlane5)
IPlane.FlyTo(-77.036667, 38.895111, 1500, 1000, 0, -45.0, "FlyToLocation")
End Sub
End Class