From dbed0354a00fde9db87862b9f03db0fbf0d3aabc Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期三, 04 九月 2024 16:38:50 +0800
Subject: [PATCH] 1

---
 TEWin/FrmWin.cs |   25 ++++++++++++++++++++-----
 1 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/TEWin/FrmWin.cs b/TEWin/FrmWin.cs
index 88d7491..704a0c8 100644
--- a/TEWin/FrmWin.cs
+++ b/TEWin/FrmWin.cs
@@ -166,7 +166,7 @@
 
         public void InvokeByCode(int code)
         {
-            LogOut.Info("InvokeByCode > " + code);
+            LogOut.Info("InvokeByCode > 0x" + code.ToString("x"));
             switch (code)
             {
                 case 0xc0: // 閲嶇疆榧犳爣妯″紡
@@ -790,15 +790,22 @@
         #region 鏂规绠$悊
         private void Save()
         {
-            //SG.Command.Execute(1003, null);
             SaveLocation();
-            this.SG.Project.Save();
+            this.SG.Command.Execute(1019, 0); // Capture Tree State
+            SG.Command.Execute(1003, null); // this.SG.Project.Save();
+        }
+
+        private void SaveAs(string flyPath)
+        {
+            SaveLocation();
+            this.SG.Command.Execute(1019, 0); // Capture Tree State
+            this.SG.Project.SaveAs(flyPath);
         }
 
         private void OpenPrj()
         {
             string flyPath = ReadPrjPath();
-            if (String.IsNullOrEmpty(flyPath)) flyPath = Path.Combine(mainUrl, "see.fly");
+            if (String.IsNullOrEmpty(flyPath)) flyPath = this.fly; // flyPath = Path.Combine(mainUrl, "see.fly");
 
             if (!File.Exists(flyPath))
             {
@@ -814,7 +821,7 @@
             try
             {
                 string flyPath = ReadPrjPath();
-                if (String.IsNullOrEmpty(flyPath)) flyPath = Path.Combine(mainUrl, "see.fly");
+                if (String.IsNullOrEmpty(flyPath)) flyPath = this.fly; // flyPath = Path.Combine(mainUrl, "see.fly");
 
                 this.Save();
                 //this.SG.Project.SaveAs(flyPath);
@@ -864,6 +871,14 @@
                 return null;
             }
         }
+
+        private String GetSavePath()
+        {
+            string appData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
+            string tePathName = ConfigurationManager.AppSettings["tePath"].Contains("SmartEarth") ? "SmartEarth" : "Skyline";
+
+            return Path.Combine(appData, tePathName, "TerraExplorer");
+        }
         #endregion
     }
 }

--
Gitblit v1.9.3