using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.IO; using System.Linq; using System.Text; using System.Windows.Forms; using TerraExplorerX; using TETree; using TEWin.CS; namespace TEWin { public partial class FrmWin : Form { public SGWorld74 SG = null; public static string StartupPath { get { return System.Windows.Forms.Application.StartupPath; } } public FrmWin() { InitializeComponent(); this.Load += FrmWeb_Load; this.FormClosed += FrmWin_FormClosed; } void FrmWeb_Load(object sender, EventArgs e) { try { LogOut.Info("开始运行.."); string fly = Path.Combine(StartupPath, "Resources\\sample.fly"); if (!File.Exists(fly)) { LogOut.Error("Fly文件不存在:" + fly); return; } SG = new SGWorld74(); SG.OnLoadFinished += SG_OnLoadFinished; SG.Open(fly); FrmTree tree = new FrmTree(); tree.Show(this); } catch (Exception ex) { LogOut.Error(ex.Message + "\r\n" + ex.StackTrace); } } void SG_OnLoadFinished(bool bSuccess) { // } void FrmWin_FormClosed(object sender, FormClosedEventArgs e) { LogOut.Info("关闭程序."); } } }