管道基础大数据平台系统开发-【CS】-ExportMap
13693261870
2024-01-02 25effacc7753e77dce674b924eb28f57ed5e7fd1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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("关闭程序.");
        }
    }
}