From e9bbc0ac348917e459432e61a40d407544aaa057 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期四, 04 一月 2024 16:21:13 +0800
Subject: [PATCH] 添加空间统计页面

---
 TEWin/TEWin.csproj                                   |   12 ++++
 TEWin/Resources/SpaceStatistics/SpaceStatistics.html |  164 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 TEWin/Resources/SpaceStatistics/img/delete.png       |    0 
 TEWin/Resources/SpaceStatistics/img/ToolIcon.png     |    0 
 4 files changed, 176 insertions(+), 0 deletions(-)

diff --git a/TEWin/Resources/SpaceStatistics/SpaceStatistics.html b/TEWin/Resources/SpaceStatistics/SpaceStatistics.html
new file mode 100644
index 0000000..e563a77
--- /dev/null
+++ b/TEWin/Resources/SpaceStatistics/SpaceStatistics.html
@@ -0,0 +1,164 @@
+锘�<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+  <title>绌洪棿缁熻</title>
+  <meta http-equiv="Expires" content="0" />
+  <meta http-equiv="Cache" content="no-cache" />
+  <meta http-equiv="Pragma" content="no-cache" />
+  <meta http-equiv="Cache-control" content="no-cache" />
+  <!--<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />-->
+  <meta http-equiv="X-UA-Compatible" content="IE=9" />
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <script src="../Jquery/jquery.min.js"></script>
+  <script src="../ToolsCommon71.js"></script>
+  <link href="../Style.css" rel="StyleSheet" type="text/css" />
+  <style>
+    html, body {
+      margin: 0;
+      padding: 0;
+      height: 100%;
+      width: 100%;
+    }
+  </style>
+  <script>
+    $(function () {
+      init();
+    });
+
+    function init() {
+      window.ondragstart = function () { return false; }
+
+      refreshList();
+    }
+
+    function refreshList() {
+      try {
+        $("#LayerId").html("");
+
+        var layers = [], index = 0;
+        BuildObjectsList(SGWorld.ProjectTree.RootID, layers, 36);
+
+        layers.forEach(function (val) {
+          var name = SGWorld.ProjectTree.GetItemName(val);
+          $("#LayerId").append("<option value=" + val + (0 == index ? " selected='selected' " : "") + ">" + name + "</option>");
+          index++;
+        });
+
+        if (layers.length) SGWorld.ProjectTree.SelectItem(layers[0]);
+      } catch (e) {
+        console.log(e);
+      }
+    }
+
+    function changeLayer(e) {
+      var id = $(e).val();
+      if (id) SGWorld.ProjectTree.SelectItem(id);
+    }
+
+    var buffer = 0;
+
+    function changeBuffer(e) {
+      var val = $(e).val();
+      if (val == buffer || isNaN(val)) return;
+
+      buffer = parseFloat(val);
+      SGWorld.Command.Execute(1096, buffer);
+    }
+
+    function changeSR(e) {
+      var val = parseInt($(e).val());
+      SGWorld.Command.Execute(1097, val);
+    }
+
+    function openPropTab(e) {
+      SGWorld.Command.Execute(1086, null);
+    }
+
+    function startQuery(e) {
+      var id = parseInt($("#SelectType").val());
+      SGWorld.Command.Execute(id, null);
+    }
+  </script>
+</head>
+<body>
+  <table style="border: 0; padding: 0; border-spacing: 0; border-spacing: 2px; width: 100%;">
+    <tr>
+      <td class="ToolTopArea" width="100%" valign="middle">
+        <table border="0" width="100%" cellspacing="0" cellpadding="0">
+          <tr>
+            <td width="55px">
+              <img style="margin-left: 5px;" src="img/ToolIcon.png" alt="" /></td>
+            <td id="TitleTD" align="center" class="s12w i18n">绌洪棿缁熻</td>
+            <td align="right" id="CloseHelpTd">
+              <img style="margin-right: 5px;" alt="" src="../CommonImg/help.png" border="0" class="i18n" alt="help" title="甯姪" onclick="DisplayHelpPopup6(SGLang.i18nFile('help.html'),SGLang.i18n('help'))" style="cursor: pointer;"/></td>
+          </tr>
+        </table>
+      </td>
+    </tr>
+    <tr>
+      <td class="ToolTopSeperator"></td>
+    </tr>
+    <tr>
+      <td>
+        <table class="PropertiesSheet" style="border: 0; padding: 0; border-spacing: 0; border-spacing: 2px;">
+          <tr class='TableOtherLine'>
+            <td class="s8b">
+              <label for="Mode" class="i18n">閫夋嫨鍥惧眰</label>
+            </td>
+            <td>&nbsp;<select id="LayerId" onchange="changeLayer(this);" style="width: 200pt;"></select>
+              &nbsp;&nbsp;<span id="refresh" onclick="refreshList();" style="text-decoration: underline; cursor: pointer;" class="i18n">鍒锋柊</span>
+            </td>
+          </tr>
+          <tr>
+            <td class="s8b">
+              <label for="Mode" class="i18n">缂撳啿璺濈</label>
+            </td>
+            <td>&nbsp;<input id="Buffer" type="text" style="width: 95pt;" value="0" size="7" onchange="CheckNumberEx(Buffer, 0, 0, 9999999); changeBuffer(this);" />
+              &nbsp;&nbsp;绫�
+            </td>
+          </tr>
+          <tr>
+            <td class="s8b">
+              <label for="Mode" class="i18n">绌洪棿鍏崇郴</label>
+            </td>
+            <td>&nbsp;<select id="SpatialRelationship" onchange="changeSR(this);" style="width: 100pt;">
+              <option class="i18n" value="1" selected="selected">鐩镐氦</option>
+              <option class="i18n" value="2">鍖呭惈</option>
+            </select>
+            </td>
+          </tr>
+          <tr>
+            <td class="s8b">
+              <label for="Mode" class="i18n">鏌ヨ绫诲瀷</label>
+            </td>
+            <td>&nbsp;<select id="SelectType" style="width: 100pt;">
+              <option value="1074">鐐规煡</option>
+              <option value="1072">绾挎煡</option>
+              <option value="1071" selected="selected">闈㈡煡</option>
+              <option value="1156">閫夋嫨瀵硅薄</option>
+            </select>
+            </td>
+          </tr>
+        </table>
+      </td>
+    </tr>
+    <tr>
+      <td align="center" class="ToolButtonsArea">
+        <div id="SurfaceDiv">
+          <button id="clipboardButton" class="MenuButton" onclick="openPropTab(this);" style="cursor: pointer;">
+            <img src="img/delete.png" /><br />
+            <span class="i18n">娓� 闄�</span></button>
+          <button id="DrawPlaneBtn" class="MenuButton MenuButtonLast" onclick="startQuery(this);" style="cursor: pointer;">
+            <img src="../commonImg/polygon.png" /><br />
+            <span class="i18n">寮�濮嬬粺璁�</span></button>
+        </div>
+      </td>
+    </tr>
+    <tr>
+      <td>
+        <object id="SGWorld" classid="CLSID:3a4f9199-65a8-11d5-85c1-0001023952c1"></object>
+      </td>
+    </tr>
+  </table>
+</body>
+</html>
diff --git a/TEWin/Resources/SpaceStatistics/img/ToolIcon.png b/TEWin/Resources/SpaceStatistics/img/ToolIcon.png
new file mode 100644
index 0000000..059c96d
--- /dev/null
+++ b/TEWin/Resources/SpaceStatistics/img/ToolIcon.png
Binary files differ
diff --git a/TEWin/Resources/SpaceStatistics/img/delete.png b/TEWin/Resources/SpaceStatistics/img/delete.png
new file mode 100644
index 0000000..816806b
--- /dev/null
+++ b/TEWin/Resources/SpaceStatistics/img/delete.png
Binary files differ
diff --git a/TEWin/TEWin.csproj b/TEWin/TEWin.csproj
index 3f7e7ed..b18a2c0 100644
--- a/TEWin/TEWin.csproj
+++ b/TEWin/TEWin.csproj
@@ -178,6 +178,18 @@
     </COMReference>
   </ItemGroup>
   <ItemGroup>
+    <EmbeddedResource Include="Resources\SpaceStatistics\img\delete.png">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Resources\SpaceStatistics\img\clean.png">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Resources\SpaceStatistics\img\ToolIcon.png">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Resources\SpaceStatistics\SpaceStatistics.html">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </EmbeddedResource>
     <EmbeddedResource Include="Resources\CommonImg\prop.png">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </EmbeddedResource>

--
Gitblit v1.9.3