From 31fd525edda7e78dfa1badd04e6f9f23f20af664 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期五, 12 一月 2024 10:55:12 +0800
Subject: [PATCH] 修改编辑功能

---
 TEWin/FrmWin.cs                                      |    2 +-
 TEWin/Resources/SpaceStatistics/SpaceStatistics.html |   21 +++++++++++++++------
 TEWin/FrmTool.cs                                     |    2 +-
 3 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/TEWin/FrmTool.cs b/TEWin/FrmTool.cs
index 28f8850..8357666 100644
--- a/TEWin/FrmTool.cs
+++ b/TEWin/FrmTool.cs
@@ -13,7 +13,7 @@
     {
         FrmWin win;
 
-        List<string> codes = new List<string> { "閲嶇疆榧犳爣", "鎵撳紑鏂规", "淇濆瓨鏂规", "鐭㈤噺鏁版嵁", "褰卞儚鏁版嵁", "鍦板舰鏁版嵁", "妯″瀷鏁版嵁(osgb)", "妯″瀷鏁版嵁(obj)", "缂栬緫瀵硅薄", "鐐归噺绠�", "鍧″悜鍒嗘瀽", "绾块噺绠�", "闈㈤噺绠�", "浣撻噺绠�", "瑙掗噺绠�", "绌洪棿缁熻", "绌洪棿鍒嗘瀽", "鍓栭潰鍒嗘瀽", "鍧″害鍒嗘瀽", "绛夊�肩嚎", "鍓栧垏鍒嗘瀽", "鍦扮悊鍦烘櫙浜у搧缁勮", "浼犵粺4D浜у搧娲剧敓", "鎵撳紑fly" };
+        List<string> codes = new List<string> { "閲嶇疆榧犳爣", "鎵撳紑鏂规", "淇濆瓨鏂规", "鐭㈤噺鏁版嵁", "褰卞儚鏁版嵁", "鍦板舰鏁版嵁", "妯″瀷鏁版嵁(osgb)", "妯″瀷鏁版嵁(obj)", "缂栬緫鏁版嵁", "鐐归噺绠�", "鍧″悜鍒嗘瀽", "绾块噺绠�", "闈㈤噺绠�", "浣撻噺绠�", "瑙掗噺绠�", "绌洪棿缁熻", "绌洪棿鍒嗘瀽", "鍓栭潰鍒嗘瀽", "鍧″害鍒嗘瀽", "绛夊�肩嚎", "鍓栧垏鍒嗘瀽", "鍦扮悊鍦烘櫙浜у搧缁勮", "浼犵粺4D浜у搧娲剧敓", "鎵撳紑fly" };
 
         public FrmTool(FrmWin win)
         {
diff --git a/TEWin/FrmWin.cs b/TEWin/FrmWin.cs
index 131cb29..eaff5f6 100644
--- a/TEWin/FrmWin.cs
+++ b/TEWin/FrmWin.cs
@@ -147,7 +147,7 @@
                     break;
                 case 0xc7: // 妯″瀷鏁版嵁(*.obj)
                     SG.Command.Execute(1012, 13); break;
-                case 0xc8: // 鍩虹缂栬緫(閫夋嫨瀵硅薄锛屽紑鍚紪杈�)
+                case 0xc8: // 缂栬緫鏁版嵁(閫夋嫨瀵硅薄锛屽紑鍚紪杈�)
                     SG.Command.Execute(1021, null); break;
                 case 0xc9: // 鐐归噺绠�(鍧愭爣+楂樼▼)
                     SG.Command.Execute(1023, null); break;
diff --git a/TEWin/Resources/SpaceStatistics/SpaceStatistics.html b/TEWin/Resources/SpaceStatistics/SpaceStatistics.html
index 77bdd0d..8f5ca6f 100644
--- a/TEWin/Resources/SpaceStatistics/SpaceStatistics.html
+++ b/TEWin/Resources/SpaceStatistics/SpaceStatistics.html
@@ -40,6 +40,15 @@
       maxHeight: 0, // 涓夌淮浣撴渶楂橀珮搴�
 
       reset: function () {
+        var layers = getFeatureLayers();
+        for (var i in layers) {
+          try{
+            SGWorld.ProjectTree.GetObject(layers[i]).Refresh();
+          } catch (e) {
+            console.log(e);
+          }
+        }
+
         this.count = 0;
         this.lineLen = 0;
         this.polyArea = 0;
@@ -49,7 +58,7 @@
 
         return this;
       },
-      
+
       format: function () {
         this.lineLen = parseFloat(this.lineLen.toFixed(2));
         this.polyArea = parseFloat(this.polyArea.toFixed(2));
@@ -90,9 +99,7 @@
         var gid = SGWorld.ProjectTree.FindItem(groupName);
         if (gid) SGWorld.ProjectTree.DeleteItem(gid);
       }
-      catch (e) {
-        console.log(e);
-      }
+      catch (e) { }
     }
 
     function getFeatureLayers() {
@@ -139,13 +146,11 @@
           if (fs.Count == 0) continue;
 
           rs.count += fs.Count;
-
           if (layer.GeometryType == 1) { // LGT_POLYLINE
             for (var j = 0; j < fs.Count; j++) {
               var f = fs.Item(j);
               rs.lineLen += f.Geometry.Length;
             }
-            continue;
           }
           if (layer.GeometryType == 2) { // LGT_POLYGON
             var flag = layerName == layer.TreeItem.Name;
@@ -164,7 +169,11 @@
               }
             }
           }
+          for (var i = 0; i < fs.Count; i++) {
+            fs.Item(i).Tint.abgrColor = 0xff800080;
+          }
         } catch (e) {
+          console.log(e);
           layers.splice(i, 1);
         }
       }

--
Gitblit v1.9.3