The following sample shows the use of the _ITerraExplorerEvents5::OnLoadFinished() event notification as well as the FlyName property of the ITerraExplorer interface.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using TerraExplorerX;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
private TerraExplorer TE;
private ITerraExplorer51 TE51;
public Form1()
{
InitializeComponent();
this.TE = new TerraExplorerClass();
this.TE51 = (ITerraExplorer51)TE;
this.TE.OnLoadFinished += new _ITerraExplorerEvents5_OnLoadFinishedEventHandler(TE_OnLoadFinished);
}
void TE_OnLoadFinished()
{
MessageBox.Show("Finished loading FLY file: " + this.TE51.FlyName.ToString() );
}
}
}