From 2e4bdfd1fb5701994ef62098082ac83959a726f7 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期三, 03 一月 2024 15:43:47 +0800 Subject: [PATCH] 汉化测量结果 --- /dev/null | 380 ----------- TEWin/Resources/DistanceMeasurement/Lang.js | 21 TEWin/TEWin.csproj | 117 +- TEWin/Resources/DistanceMeasurement/distanceMeasurement.html | 666 +++++++++++--------- TEWin/Resources/AreaMeasurement/AreaMeasurement.html | 670 +++++++++++--------- TEWin/Resources/AreaMeasurement/Lang.js | 43 6 files changed, 812 insertions(+), 1,085 deletions(-) diff --git a/TEWin/Resources/AreaMeasurement/AreaMeasurement.html b/TEWin/Resources/AreaMeasurement/AreaMeasurement.html index 9e9d2d3..1309911 100644 --- a/TEWin/Resources/AreaMeasurement/AreaMeasurement.html +++ b/TEWin/Resources/AreaMeasurement/AreaMeasurement.html @@ -5,196 +5,218 @@ <meta http-equiv="X-UA-Compatible" content="IE=9" /> <!--<meta http-equiv="Content-Type" content="text/html; charset=utf-8">--> <link rel="StyleSheet" href="../Style.css" type="text/css"> + <style> + </style> </head> -<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="border: 0px; overflow: hidden;" id="Body" class="hideUntillTranslated ToolButtonsArea" onload="Init()" onunload="OnUnload()"> - <!--oncontextmenu="return false;"> onclick="bHide=true;HideOptionsNow()" > --> - <table border="0" width="100%" class="s8w" cellspacing="0" cellpadding="0"> +<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="border: 0px; overflow: hidden;" id="Body" class="hideUntillTranslated ToolButtonsArea" onload="Init()" onunload="OnUnload()"> + <!--oncontextmenu="return false;"> onclick="bHide=true;HideOptionsNow()" > --> + + <table border="0" width="100%" class="s8w" cellspacing="0" cellpadding="0"> + <tr > + <td> + <table class="PropertiesSheet" cellspacing="0" cellpadding="0" ></table> + </td> <tr> - <td> - <table class="PropertiesSheet" cellspacing="0" cellpadding="0"></table> + <td colspan="2" align="left" class="ToolButtonsArea" style="border-bottom: 2px solid #ffffff;"> + <button id="deleteMeasure" class="MenuButton2" style="border:none;" onclick="OnDeleteMeasure();"><img src="./img/delete.png" /></button> + <button id="deleteLastPoint" class="MenuButton2" style="border:none;" onclick="OnDeleteLastPoint()"><img src="./img/delete_last_point.png" /></button> + <button id="snapping" class="MenuButton2" style="border-right: 2px solid #ffffff;" onclick="OnSnapping()"><img src="./img/snap.png" /><br /></button> + <button id="horizontalSurface" class="MenuButton2" style="border:none;" onclick="OnHorizontalSurface()"><img src="./img/horizontal.png" /><br /></button> + <button id="3dPlane" class="MenuButton2" style="border:none;" onclick="On3DPlane()"><img src="./img/3d_palne_area.png" /><br /></button> + <button id="terrainSurface" class="MenuButton2" style="border-left: 2px solid #ffffff;border-right: none;" onclick="OnTerrainSurface()"><img src="./img/surface.png" /><br /></button> + </td> - <tr> - <td colspan="2" align="left" class="ToolButtonsArea" style="border-bottom: 2px solid #ffffff;"> - <button id="deleteMeasure" class="MenuButton2" style="border: none;" onclick="OnDeleteMeasure();"> - <img src="./img/delete.png" /></button> - <button id="deleteLastPoint" class="MenuButton2" style="border: none;" onclick="OnDeleteLastPoint()"> - <img src="./img/delete_last_point.png" /></button> - <button id="snapping" class="MenuButton2" style="border-right: 2px solid #ffffff;" onclick="OnSnapping()"> - <img src="./img/snap.png" /><br /> - </button> - <button id="horizontalSurface" class="MenuButton2" style="border: none;" onclick="OnHorizontalSurface()"> - <img src="./img/horizontal.png" /><br /> - </button> - <button id="3dPlane" class="MenuButton2" style="border: none;" onclick="On3DPlane()"> - <img src="./img/3d_palne_area.png" /><br /> - </button> - <button id="terrainSurface" class="MenuButton2" style="border-left: 2px solid #ffffff; border-right: none;" onclick="OnTerrainSurface()"> - <img src="./img/surface.png" /><br /> - </button> - </td> - </tr> + + </tr> + </table> + + <table border="0" width="100%" class="s8w ToolButtonsArea" cellspacing="0" cellpadding="3pt"> + + <tr id="createTRId"> + <td > + <span class="i18n s8w" style="vertical-align:top;">Text6</span> + <input type="checkbox" align="bottom" id="createMeasurementObject" style="width:25px;" onclick="CreateMeasurementObject();"/> + </td> + </tr> + + <tr > + <td class="textarea-container" > + <div class="textarea-size s8w" ></div> + </td> + </tr> + + <tr id="sampleIntervalTR"> + <td align="left" > + <span class="i18n s8w">Text5</span> + <input type="text" id= "sampleInterval" style="width:25px; height:13px; background-color:#000000; color:#FFFFFF; padding:1px; margin-left: 2px;margin-right: 2px;" onkeypress="OnSampleInterval(event)"/> + <span class="i18n s8w">Text18</span> + </td> + </tr> + + <tr id="surfaceResultTR" > + <td class="textarea-container_surface" > + + <div class="textarea-size_surface s8w" ></div> + </td> + </tr> + + + <tr id="unitTRId"> + <td align="right" > + <u><a class="btn btn-primary" href="#" role="button" id= "changeMeasurementUnits" onclick="OnChangeMeasurementUnits()"><span class="i18n s8w" style="padding-right:5px;">Text17</span></a></u> + </td> + </tr> + </tr> + </table> - <table border="0" width="100%" class="s8w ToolButtonsArea" cellspacing="0" cellpadding="3pt"> - <tr id="createTRId" style="display: none;"> - <td> - <span class="i18n s8w" style="vertical-align: top;">Text6</span> - <input type="checkbox" align="bottom" id="createMeasurementObject" style="width: 25px;" onclick="CreateMeasurementObject();" /> - </td> - </tr> - <tr> - <td class="textarea-container"> - <div class="textarea-size s8w"></div> - </td> - </tr> - <!--<tr id="sampleIntervalTR"> - <td align="left"> - <span class="i18n s8w">Text5</span> - <input type="text" id="sampleInterval" style="width:25px; height:13px; background-color:#000000; color:#FFFFFF; padding:1px; margin-left: 2px;margin-right: 2px;" onkeypress="OnSampleInterval(event)" /> - <span class="i18n s8w">Text18</span> - </td> - </tr>--> - <tr id="sampleIntervalTR"> - <td align="left"> - <span class="i18n s8w">Text5</span> - <input type="text" id="sampleInterval" style="width: 25px; height: 13px; background-color: #000000; color: #FFFFFF; padding: 1px; margin-left: 2px; margin-right: 2px;" onkeypress="OnSampleInterval(event)" /> - <span class="i18n s8w">Text18</span> - </td> - </tr> - <tr id="surfaceResultTR"> - <td class="textarea-container_surface"> - <div class="textarea-size_surface s8w"></div> - </td> - </tr> - <tr id="unitTRId" style="display: none;"> - <!--<td align="right" >--> - <td> - <u><a class="btn btn-primary" href="#" role="button" id="changeMeasurementUnits" onclick="OnChangeMeasurementUnits()"><span class="i18n s8w" style="padding-right: 5px;">Text17</span></a></u> - </td> - </tr> - </table> - <object id="SGWorld" style="display: none" classid="CLSID:3a4f919d-65a8-11d5-85c1-0001023952c1"></object> - <script language="javascript" src="../jquery/jquery-3.1.1.min.js"></script> - <script language="javascript" src="../ToolsCommon71.js"></script> - <script language="JavaScript"> - var DISABLE = "gray"; - var gGeometry = null; - var g_bCalculateTerrainArea; - var _3D_PLANE_NAME = "plane"; - var _HORIZONTAL_NAME = "horizontal"; + + <object id="SGWorld" style="display:none" classid="CLSID:3a4f919d-65a8-11d5-85c1-0001023952c1"> </object> + - function Init() { - document.getElementById("changeMeasurementUnits").value = SGLang.i18n("Text17"); - document.getElementById("sampleInterval").value = 5; + +<script language="javascript" src="../jquery/jquery-3.1.1.min.js"></script> +<script language="javascript" src="../ToolsCommon71.js"></script> - var isPM = GetParamValue("pm", "0"); // when opening this tool in PM we want to hide several options - if (isPM == "1") { - $("#unitTRId").hide(); - $("#createTRId").hide(); - $("#terrainSurface").hide(); - $("#sampleIntervalTR").hide(); - $("#surfaceResultTR").hide(); - } - $("#deleteMeasure").attr('title', SGLang.i18n("Text19")); - $("#deleteLastPoint").attr('title', SGLang.i18n("Text20")); - $("#snapping").attr('title', SGLang.i18n("Text21")); - $("#horizontalSurface").attr('title', SGLang.i18n("Text22")); - $("#3dPlane").attr('title', SGLang.i18n("Text23")); - $("#terrainSurface").attr('title', SGLang.i18n("Text24")); - textContainer = document.querySelector('.textarea-container'); - textareaSize = textContainer.querySelector('.textarea-size'); - textareaSize.innerText = SGLang.i18n("Text25"); +<script language="JavaScript"> - textContainer = document.querySelector('.textarea-container_surface'); - textareaSize = textContainer.querySelector('.textarea-size_surface'); - textareaSize.innerText = SGLang.i18n("Text26"); - SGWorld.AttachEvent("OnMeasurementAreaResult", OnMeasurementResult); - SGWorld.AttachEvent("OnInputModeChanged", OnInputModeChanged); - SGWorld.AttachEvent("OnEndDrawMeasurement", OnEndDrawMeasurement); +var DISABLE = "gray"; +var gGeometry = null; +var g_bCalculateTerrainArea; +var _3D_PLANE_NAME = "plane"; +var _HORIZONTAL_NAME = "horizontal"; +//--------------------------------- +function Init() +{ + document.getElementById("changeMeasurementUnits").value=SGLang.i18n("Text17"); + document.getElementById("sampleInterval").value=5; + + var isPM = GetParamValue("pm", "0"); // when opening this tool in PM we want to hide several options + if (isPM=="1"){ + $("#unitTRId").hide(); + $("#createTRId").hide(); + $("#terrainSurface").hide(); + $("#sampleIntervalTR").hide(); + $("#surfaceResultTR").hide(); + } - var bCreateMeasurementObject = (isPM == "1") ? false : SGWorld.GetOptionParam("CreateMeasurementObjects"); - document.getElementById("createMeasurementObject").checked = bCreateMeasurementObject; - CreateMeasurementObject(); + $("#deleteMeasure").attr('title', SGLang.i18n("Text19")); + $("#deleteLastPoint").attr('title', SGLang.i18n("Text20")); + $("#snapping").attr('title', SGLang.i18n("Text21")); + $("#horizontalSurface").attr('title', SGLang.i18n("Text22")); + $("#3dPlane").attr('title', SGLang.i18n("Text23")); + $("#terrainSurface").attr('title', SGLang.i18n("Text24")); + - Reset(1, 0); - if (SGWorld.GetOptionParam("AreaMeasurementDefaultMode") == _3D_PLANE_NAME) - document.getElementById("3dPlane").click(); - else - document.getElementById("horizontalSurface").click(); - } + textContainer = document.querySelector('.textarea-container'); + textareaSize = textContainer.querySelector('.textarea-size'); + textareaSize.innerText = SGLang.i18n("Text25"); - //--------------------------------- - function Reset(FirstTime, FromMouseInputMode) { - ResetButtons(); - SGWorld.Window.SetInputMode(0); - gGeometry = null; - } + textContainer = document.querySelector('.textarea-container_surface'); + textareaSize = textContainer.querySelector('.textarea-size_surface'); + textareaSize.innerText = SGLang.i18n("Text26"); - //--------------------------------- - function OnSampleInterval(evt) { - var theEvent = evt || window.event; - // Handle paste - if (theEvent.type === 'paste') { - key = event.clipboardData.getData('text/plain'); - } - else { - // Handle key press - var key = theEvent.keyCode || theEvent.which; - key = String.fromCharCode(key); - } + SGWorld.AttachEvent("OnMeasurementAreaResult", OnMeasurementResult); + SGWorld.AttachEvent("OnInputModeChanged", OnInputModeChanged); + SGWorld.AttachEvent("OnEndDrawMeasurement", OnEndDrawMeasurement); + + var bCreateMeasurementObject = (isPM=="1")?false:SGWorld.GetOptionParam("CreateMeasurementObjects"); + document.getElementById("createMeasurementObject").checked = bCreateMeasurementObject; + CreateMeasurementObject(); + + Reset(1,0); + if(SGWorld.GetOptionParam("AreaMeasurementDefaultMode") == _3D_PLANE_NAME) + document.getElementById("3dPlane").click(); + else + document.getElementById("horizontalSurface").click(); + - var regex = /[0-9]|\./; - if (!regex.test(key) || document.getElementById("sampleInterval").style.color == DISABLE) { - theEvent.returnValue = false; - if (theEvent.preventDefault) - theEvent.preventDefault(); - } - } +} +//--------------------------------- +function Reset(FirstTime, FromMouseInputMode) +{ - //--------------------------------- - function OnDeleteMeasure() { - var is3dPlane = $("#3dPlane").hasClass("MenuButtonHighlight"); - var isHorizontalSurface = $("#horizontalSurface").hasClass("MenuButtonHighlight"); + ResetButtons(); + SGWorld.Window.SetInputMode(0); + gGeometry = null; +} +//--------------------------------- +function OnSampleInterval(evt) +{ - Reset(0, 0); - if (is3dPlane) { - document.getElementById("3dPlane").click(); - } - else - if (isHorizontalSurface) { - document.getElementById("horizontalSurface").click(); - } + var theEvent = evt || window.event; - EnableDisableButtons(); - } + // Handle paste + if (theEvent.type === 'paste') + { + key = event.clipboardData.getData('text/plain'); + } + else + { + // Handle key press + var key = theEvent.keyCode || theEvent.which; + key = String.fromCharCode(key); + } - //--------------------------------- - function OnUnload() { - var measurementMode = SGWorld.GetParam(9916); - if (measurementMode == 33351/*ID_MEASURE_TERRAIN_AREA*/ || measurementMode == 33350/*ID_MEASURE_AREA*/) - SGWorld.Window.SetInputMode(0); - } + var regex = /[0-9]|\./; + + if(!regex.test(key) || document.getElementById("sampleInterval").style.color == DISABLE) + { + theEvent.returnValue = false; + if(theEvent.preventDefault) + theEvent.preventDefault(); + } - //--------------------------------- - function OnEndDrawMeasurement(geometry) { - gGeometry = geometry; - EnableDisableButtons(); - } - - //--------------------------------- - function OnInputModeChanged(mode) { - if (mode == 0) { - ResetButtons(); - } - } - - //--------------------------------- - function OnMeasurementResult(rs, SounrceID) { - rs = rs.replace("N/A", "涓嶉�傜敤") +} +//--------------------------------- +function OnDeleteMeasure() +{ + var is3dPlane = $("#3dPlane").hasClass("MenuButtonHighlight"); + var isHorizontalSurface = $("#horizontalSurface").hasClass("MenuButtonHighlight"); + + Reset(0,0); + + if(is3dPlane) + { + document.getElementById("3dPlane").click(); + } + else + if(isHorizontalSurface) + { + document.getElementById("horizontalSurface").click(); + } + + EnableDisableButtons(); +} +//--------------------------------- +function OnUnload() +{ + var measurementMode = SGWorld.GetParam(9916); + if(measurementMode == 33351/*ID_MEASURE_TERRAIN_AREA*/ || measurementMode == 33350/*ID_MEASURE_AREA*/) + SGWorld.Window.SetInputMode(0); +} +//--------------------------------- +function OnEndDrawMeasurement(geometry) +{ + gGeometry = geometry; + EnableDisableButtons(); +} +//--------------------------------- +function OnInputModeChanged(mode) +{ + if(mode==0) + { + ResetButtons(); + } +} +//--------------------------------- +function OnMeasurementResult(measurementResult,SounrceID) +{ + measurementResult = measurementResult.replace("N/A", "涓嶉�傜敤") .replace("Surface Area:", "琛ㄩ潰绉細") .replace("Area:", "闈㈢Н锛�") .replace("Square Meter", "骞虫柟绫�") @@ -203,163 +225,187 @@ .replace(/Km/g, " 鍗冪背") .replace(/m/g, " 绫�"); - if (!g_bCalculateTerrainArea) { - textContainer = document.querySelector('.textarea-container'); - textareaSize = textContainer.querySelector('.textarea-size'); - textareaSize.innerText = rs; + if(!g_bCalculateTerrainArea) + { + textContainer = document.querySelector('.textarea-container'); + textareaSize = textContainer.querySelector('.textarea-size'); + textareaSize.innerText = measurementResult; + + textContainer = document.querySelector('.textarea-container_surface'); + textareaSize = textContainer.querySelector('.textarea-size_surface'); + textareaSize.innerText = SGLang.i18n("Text26"); + } + else + { + textContainer = document.querySelector('.textarea-container_surface'); + textareaSize = textContainer.querySelector('.textarea-size_surface'); + textareaSize.innerText = measurementResult; + } + + EnableDisableButtons(); + + return true; + } +//--------------------------------- +function OnChangeMeasurementUnits() +{ + SGWorld.Command.Execute(1011,3); +} +//--------------------------------- +function CreateMeasurementObject() +{ + var bCreateMeasurementObject = document.getElementById("createMeasurementObject").checked==true; + SGWorld.SetOptionParam("CreateMeasurementObjects",bCreateMeasurementObject); +} +//--------------------------------- +function EnableDisableButtons() +{ + var bEnableTerrainSurface = $("#horizontalSurface").hasClass("MenuButtonHighlight") && gGeometry!=null; + if(!bEnableTerrainSurface) + document.getElementById("sampleInterval").style.color = DISABLE; + else + document.getElementById("sampleInterval").style.color = "#FFFFFF"; + + document.getElementById("terrainSurface").disabled = !bEnableTerrainSurface; + + if(bEnableTerrainSurface) + document.getElementById("terrainSurface").style.opacity = 1; + else + document.getElementById("terrainSurface").style.opacity = 0.3; + + var numPoints = SGWorld.GetParam(9915); + if(numPoints<3 ) + { + gGeometry = null; + } + + if(numPoints>0) + { + document.getElementById("deleteMeasure").style.opacity = 1; + } + else + { + document.getElementById("deleteMeasure").style.opacity = 0.3; + } + + if(numPoints>2 && gGeometry==null) + { + document.getElementById("deleteLastPoint").style.opacity = 1; + } + else + { + document.getElementById("deleteLastPoint").style.opacity = 0.3; + } +} +//--------------------------------- +function ResetButtons() +{ + $("#horizontalSurface").removeClass("MenuButtonHighlight"); + $("#terrainSurface").removeClass("MenuButtonHighlight"); + $("#3dPlane").removeClass("MenuButtonHighlight"); + EnableDisableButtons(); - textContainer = document.querySelector('.textarea-container_surface'); - textareaSize = textContainer.querySelector('.textarea-size_surface'); - textareaSize.innerText = SGLang.i18n("Text26"); - } - else { - textContainer = document.querySelector('.textarea-container_surface'); - textareaSize = textContainer.querySelector('.textarea-size_surface'); - textareaSize.innerText = rs; - } + +} - EnableDisableButtons(); +//--------------------------------- +function SetSnapping() +{ + if( $("#snapping").hasClass("MenuButtonHighlight")) + SGWorld.SetParam(9912,1); + else + SGWorld.SetParam(9912,0); +} +//--------------------------------- +function OnSnapping() +{ + //$("#snapping").removeClass("MenuButtonHighlight"); + + if( $(event.srcElement).hasClass("MenuButtonHighlight")) + { + $("#snapping").removeClass("MenuButtonHighlight"); + SGWorld.SetParam(9912,0); + } + else + { + SGWorld.SetParam(9912,1); + $(event.srcElement).addClass("MenuButtonHighlight"); + } + +} +//--------------------------------- +function On3DPlane() +{ - return true; - } + if( $(event.srcElement).hasClass("MenuButtonHighlight")) + { + Reset(0,0); + return; + } + - //--------------------------------- - function OnChangeMeasurementUnits() { - SGWorld.Command.Execute(1011, 3); - } + Reset(0,0); + $(event.srcElement).addClass("MenuButtonHighlight"); + SGWorld.Command.Execute(2358,0);//__TEC_MEASURE_AREA - //--------------------------------- - function CreateMeasurementObject() { - var bCreateMeasurementObject = document.getElementById("createMeasurementObject").checked == true; - SGWorld.SetOptionParam("CreateMeasurementObjects", bCreateMeasurementObject); - } + textContainer = document.querySelector('.textarea-container'); + textareaSize = textContainer.querySelector('.textarea-size'); + textareaSize.innerText = SGLang.i18n("Text25"); - //--------------------------------- - function EnableDisableButtons() { - var bEnableTerrainSurface = $("#horizontalSurface").hasClass("MenuButtonHighlight") && gGeometry != null; - if (!bEnableTerrainSurface) - document.getElementById("sampleInterval").style.color = DISABLE; - else - document.getElementById("sampleInterval").style.color = "#FFFFFF"; + SetSnapping(); + + SGWorld.SetOptionParam("AreaMeasurementDefaultMode",_3D_PLANE_NAME); + + EnableDisableButtons(); +} +//--------------------------------- +function OnTerrainSurface() +{ - document.getElementById("terrainSurface").disabled = !bEnableTerrainSurface; + //Reset(0,0); + g_bCalculateTerrainArea = true; + if(document.getElementById("sampleInterval").value>0.0) + SGWorld.Command.Execute(2359/*__TEC_MEASURE_TERRAIN_AREA*/,document.getElementById("sampleInterval").value); + g_bCalculateTerrainArea = false; + + SetSnapping(); +} +//--------------------------------- +function OnHorizontalSurface() +{ + if( $(event.srcElement).hasClass("MenuButtonHighlight")) + { + Reset(0,0); + return; + } + + + Reset(0,0); + $(event.srcElement).addClass("MenuButtonHighlight"); + SGWorld.Command.Execute(2359/*__TEC_MEASURE_TERRAIN_AREA*/,0); + + textContainer = document.querySelector('.textarea-container'); + textareaSize = textContainer.querySelector('.textarea-size'); + textareaSize.innerText = SGLang.i18n("Text25"); + + SetSnapping(); - if (bEnableTerrainSurface) - document.getElementById("terrainSurface").style.opacity = 1; - else - document.getElementById("terrainSurface").style.opacity = 0.3; + SGWorld.SetOptionParam("AreaMeasurementDefaultMode",_HORIZONTAL_NAME); + EnableDisableButtons(); +} +//--------------------------------- +function OnDeleteLastPoint() +{ + SGWorld.SetParam(9914,0); + EnableDisableButtons(); +} - var numPoints = SGWorld.GetParam(9915); - if (numPoints < 3) { - gGeometry = null; - } - if (numPoints > 0) { - document.getElementById("deleteMeasure").style.opacity = 1; - } - else { - document.getElementById("deleteMeasure").style.opacity = 0.3; - } - if (numPoints > 2 && gGeometry == null) { - document.getElementById("deleteLastPoint").style.opacity = 1; - } - else { - document.getElementById("deleteLastPoint").style.opacity = 0.3; - } - } +</script> - //--------------------------------- - function ResetButtons() { - $("#horizontalSurface").removeClass("MenuButtonHighlight"); - $("#terrainSurface").removeClass("MenuButtonHighlight"); - $("#3dPlane").removeClass("MenuButtonHighlight"); - EnableDisableButtons(); - } - - //--------------------------------- - function SetSnapping() { - if ($("#snapping").hasClass("MenuButtonHighlight")) - SGWorld.SetParam(9912, 1); - else - SGWorld.SetParam(9912, 0); - } - - //--------------------------------- - function OnSnapping() { - //$("#snapping").removeClass("MenuButtonHighlight"); - - if ($(event.srcElement).hasClass("MenuButtonHighlight")) { - $("#snapping").removeClass("MenuButtonHighlight"); - SGWorld.SetParam(9912, 0); - } - else { - SGWorld.SetParam(9912, 1); - $(event.srcElement).addClass("MenuButtonHighlight"); - } - } - - //--------------------------------- - function On3DPlane() { - if ($(event.srcElement).hasClass("MenuButtonHighlight")) { - Reset(0, 0); - return; - } - - Reset(0, 0); - $(event.srcElement).addClass("MenuButtonHighlight"); - //SGWorld.Command.Execute(2358, 0);//__TEC_MEASURE_AREA - SGWorld.Command.Execute(1037, 0); - - textContainer = document.querySelector('.textarea-container'); - textareaSize = textContainer.querySelector('.textarea-size'); - textareaSize.innerText = SGLang.i18n("Text25"); - - SetSnapping(); - - SGWorld.SetOptionParam("AreaMeasurementDefaultMode", _3D_PLANE_NAME); - - EnableDisableButtons(); - } - - //--------------------------------- - function OnTerrainSurface() { - //Reset(0,0); - g_bCalculateTerrainArea = true; - if (document.getElementById("sampleInterval").value > 0.0) - SGWorld.Command.Execute(1165/*__TEC_MEASURE_TERRAIN_AREA*/, document.getElementById("sampleInterval").value); // 2359 - g_bCalculateTerrainArea = false; - - SetSnapping(); - } - - //--------------------------------- - function OnHorizontalSurface() { - if ($(event.srcElement).hasClass("MenuButtonHighlight")) { - Reset(0, 0); - return; - } - - Reset(0, 0); - $(event.srcElement).addClass("MenuButtonHighlight"); - SGWorld.Command.Execute(1165/*__TEC_MEASURE_TERRAIN_AREA*/, 0); // 2359 - - textContainer = document.querySelector('.textarea-container'); - textareaSize = textContainer.querySelector('.textarea-size'); - textareaSize.innerText = SGLang.i18n("Text25"); - - SetSnapping(); - - SGWorld.SetOptionParam("AreaMeasurementDefaultMode", _HORIZONTAL_NAME); - EnableDisableButtons(); - } - - function OnDeleteLastPoint() { - SGWorld.SetParam(9914, 0); - EnableDisableButtons(); - } - </script> </body> </html> + <!--Sig:00000040au6WjiNW.uqyaxQdPdCltSVnmGMYOWXEgBB9yrqQ.Kyq91MhWbUupggV5yi1GRel4nJZMYQa3tOFAX56jNS8XmJJ--> diff --git a/TEWin/Resources/AreaMeasurement/Lang.js b/TEWin/Resources/AreaMeasurement/Lang.js index 021dfe2..67615a3 100644 --- a/TEWin/Resources/AreaMeasurement/Lang.js +++ b/TEWin/Resources/AreaMeasurement/Lang.js @@ -1,25 +1,28 @@ -锘縎GLang.lang = $.extend(SGLang.lang, { - ToolTitle: "娴嬮噺宸ュ叿", - ToolName: "鍦板舰鍓栭潰", - help: "甯姪", - Text0: "鍙栨秷", - Text1: "鍒犻櫎鏈�鍚庤妭鐐�", - Text2: "姘村钩闈�", - Text3: "鍦拌〃", - Text4: "鍦板舰鍦拌〃", - Text5: "閲囨牱闂撮殧锛�", - Text6: "鍒涘缓娴嬮噺瀵硅薄", - Text7: "鎹曟崏", +锘縎GLang.lang = $.extend(SGLang.lang,{ + ToolTitle: "SmartEarth - 娉扮憺鏁板垱绉戞妧锛堝寳浜級鏈夐檺鍏徃", + ToolName: "鍦板舰鍓栭潰", + help: "甯姪", + Text0: "鍙栨秷", + Text1: "鍒犻櫎鏈�鍚庤妭鐐�", + Text2: "姘村钩闈�", + Text3: "鍦拌〃", + Text4: "鍦板舰鍦拌〃", + Text5: "閲囨牱闂撮殧 ", + Text6: "鍒涘缓娴嬮噺瀵硅薄", + Text7: "鎹曟崏", Text19: "", Text17: "鍗曚綅", Text18: " 绫�", - Text19: "鍒犻櫎娴嬮噺鍊笺��", - Text20: "鍒犻櫎鏈�鍚庝竴涓祴閲忕偣銆�", - Text21: "灏嗘祴閲忕偣鎹曟崏鍒拌竟銆佸璞″拰椤剁偣銆�", - Text22: "璁$畻鍦ㄥ湴褰笂鐨勬按骞虫姇褰遍潰绉��", - Text23: "璁$畻浠绘剰骞抽潰涓婄殑闈㈢Н銆傝澶氳竟褰㈢殑鏂瑰悜鐢遍�夊畾鐨勫墠涓変釜鐐瑰喅瀹氥��", + Text19: "鍒犻櫎娴嬮噺鍊�", + Text20: "鍒犻櫎鏈�鍚庝竴涓祴閲忕偣", + Text21: "灏嗘祴閲忕偣鎹曟崏鍒拌竟銆佸璞″拰椤剁偣", + Text22: "璁$畻鍦ㄥ湴褰笂鐨勬按骞虫姇褰遍潰绉�", + Text23: "璁$畻浠绘剰骞抽潰涓婄殑闈㈢Н锛岃澶氳竟褰㈢殑鏂瑰悜鐢遍�夊畾鐨勫墠涓変釜鐐瑰喅瀹氥��", Text24: "鑰冭檻鍦板舰璧蜂紡锛岃绠楅�夊畾鍖哄煙鐨勮〃闈㈢Н銆�", - Text25: "闈㈢Н锛歕n鍛ㄩ暱锛�", - Text26: "琛ㄩ潰绉細", - Text999: "" + Text25: "闈㈢Н:\鍛ㄩ暱:", + Text26: "琛ㄩ潰绉�:", + + + + Text999: "" }); \ No newline at end of file diff --git a/TEWin/Resources/AreaMeasurement/area.html b/TEWin/Resources/AreaMeasurement/area.html deleted file mode 100644 index 7142e7e..0000000 --- a/TEWin/Resources/AreaMeasurement/area.html +++ /dev/null @@ -1,380 +0,0 @@ -锘�<!DOCTYPE html> -<html xmlns="http://www.w3.org/1999/xhtml"> -<head> - <title>ToolTitle</title> - <meta http-equiv="X-UA-Compatible" content="IE=9" /> - <!--<meta http-equiv="Content-Type" content="text/html; charset=utf-8">--> - <link rel="StyleSheet" href="../Style.css" type="text/css"> -</head> -<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="border: 0px; overflow: hidden;" id="Body" class="hideUntillTranslated ToolButtonsArea" onload="Init()" onunload="OnUnload()"> - <!--oncontextmenu="return false;"> onclick="bHide=true;HideOptionsNow()" > --> - <table border="0" width="100%" class="s8w" cellspacing="0" cellpadding="0"> - <tr> - <td> - <table class="PropertiesSheet" cellspacing="0" cellpadding="0"></table> - </td> - <tr> - <td colspan="2" align="left" class="ToolButtonsArea" style="border-bottom: 2px solid #ffffff;"> - <button id="deleteMeasure" class="MenuButton2" style="border: none;" onclick="OnDeleteMeasure();"> - <img src="./img/delete.png" /></button> - <button id="deleteLastPoint" class="MenuButton2" style="border: none;" onclick="OnDeleteLastPoint()"> - <img src="./img/delete_last_point.png" /></button> - <button id="snapping" class="MenuButton2" style="border-right: 2px solid #ffffff;" onclick="OnSnapping()"> - <img src="./img/snap.png" /><br /> - </button> - <button id="horizontalSurface" class="MenuButton2" style="border: none;" onclick="OnHorizontalSurface()"> - <img src="./img/horizontal.png" /><br /> - </button> - <button id="3dPlane" class="MenuButton2" style="border: none;" onclick="On3DPlane()"> - <img src="./img/3d_palne_area.png" /><br /> - </button> - <button id="terrainSurface" class="MenuButton2" style="border-left: 2px solid #ffffff; border-right: none;" onclick="OnTerrainSurface()"> - <img src="./img/surface.png" /><br /> - </button> - </td> - </tr> - </table> - <table border="0" width="100%" class="s8w ToolButtonsArea" cellspacing="0" cellpadding="3pt"> - <tr id="createTRId" style="display: none;"> - <td> - <span class="i18n s8w" style="vertical-align: top;">Text6</span> - <input type="checkbox" align="bottom" id="createMeasurementObject" style="width: 25px;" onclick="CreateMeasurementObject();" /> - </td> - </tr> - <tr> - <td class="textarea-container"> - <div class="textarea-size s8w"></div> - </td> - </tr> - <!--<tr id="sampleIntervalTR"> - <td align="left"> - <span class="i18n s8w">Text5</span> - <input type="text" id="sampleInterval" style="width:25px; height:13px; background-color:#000000; color:#FFFFFF; padding:1px; margin-left: 2px;margin-right: 2px;" onkeypress="OnSampleInterval(event)" /> - <span class="i18n s8w">Text18</span> - </td> - </tr>--> - <tr id="sampleIntervalTR"> - <td align="left"> - <span class="i18n s8w">Text5</span> - <input type="text" id="sampleInterval" style="width: 25px; height: 13px; background-color: #000000; color: #FFFFFF; padding: 1px; margin-left: 2px; margin-right: 2px;" onkeypress="OnSampleInterval(event)" /> - <span class="i18n s8w">Text18</span> - </td> - </tr> - <tr id="surfaceResultTR"> - <td class="textarea-container_surface"> - <div class="textarea-size_surface s8w"></div> - </td> - </tr> - <tr id="unitTRId" style="display: none;"> - <!--<td align="right" >--> - <td> - <u><a class="btn btn-primary" href="#" role="button" id="changeMeasurementUnits" onclick="OnChangeMeasurementUnits()"><span class="i18n s8w" style="padding-right: 5px;">Text17</span></a></u> - </td> - </tr> - </table> - <object id="SGWorld" style="display: none" classid="CLSID:3a4f919d-65a8-11d5-85c1-0001023952c1"></object> - <script language="javascript" src="../jquery/jquery-3.1.1.min.js"></script> - <script language="javascript" src="../ToolsCommon71.js"></script> - <script language="JavaScript"> - var DISABLE = "gray"; - var gGeometry = null; - var g_bCalculateTerrainArea; - var _3D_PLANE_NAME = "plane"; - var _HORIZONTAL_NAME = "horizontal"; - - function Init() { - document.getElementById("changeMeasurementUnits").value = SGLang.i18n("Text17"); - document.getElementById("sampleInterval").value = 5; - - var isPM = GetParamValue("pm", "0"); // when opening this tool in PM we want to hide several options - if (isPM == "1") { - $("#unitTRId").hide(); - $("#createTRId").hide(); - $("#terrainSurface").hide(); - $("#sampleIntervalTR").hide(); - $("#surfaceResultTR").hide(); - } - - $("#deleteMeasure").attr('title', SGLang.i18n("Text19")); - $("#deleteLastPoint").attr('title', SGLang.i18n("Text20")); - $("#snapping").attr('title', SGLang.i18n("Text21")); - $("#horizontalSurface").attr('title', SGLang.i18n("Text22")); - $("#3dPlane").attr('title', SGLang.i18n("Text23")); - $("#terrainSurface").attr('title', SGLang.i18n("Text24")); - - textContainer = document.querySelector('.textarea-container'); - textareaSize = textContainer.querySelector('.textarea-size'); - textareaSize.innerText = SGLang.i18n("Text25"); - - textContainer = document.querySelector('.textarea-container_surface'); - textareaSize = textContainer.querySelector('.textarea-size_surface'); - textareaSize.innerText = SGLang.i18n("Text26"); - - SGWorld.AttachEvent("OnMeasurementAreaResult", OnMeasurementResult); - SGWorld.AttachEvent("OnInputModeChanged", OnInputModeChanged); - SGWorld.AttachEvent("OnEndDrawMeasurement", OnEndDrawMeasurement); - - //var bCreateMeasurementObject = (isPM == "1") ? false : SGWorld.GetOptionParam("CreateMeasurementObjects"); - //document.getElementById("createMeasurementObject").checked = bCreateMeasurementObject; - document.getElementById("createMeasurementObject").checked = true; - CreateMeasurementObject(); - - Reset(1, 0); - if (SGWorld.GetOptionParam("AreaMeasurementDefaultMode") == _3D_PLANE_NAME) - document.getElementById("3dPlane").click(); - else - document.getElementById("horizontalSurface").click(); - } - - function setText(idx, val) { - var txtId = SGWorld.ProjectTree.FindItem("瀹氫綅鐐筡\Text"); - if (txtId) { - var obj = SGWorld.ProjectTree.GetObject(txtId); - var strs = obj.Text.split(","); // 0,0,0,0,0,0,0 - strs[idx] = val; - obj.Text = strs.join(","); - } - } - - //--------------------------------- - function Reset(FirstTime, FromMouseInputMode) { - ResetButtons(); - SGWorld.Window.SetInputMode(0); - gGeometry = null; - } - - //--------------------------------- - function OnSampleInterval(evt) { - var theEvent = evt || window.event; - - // Handle paste - if (theEvent.type === 'paste') { - key = event.clipboardData.getData('text/plain'); - } - else { - // Handle key press - var key = theEvent.keyCode || theEvent.which; - key = String.fromCharCode(key); - } - - var regex = /[0-9]|\./; - if (!regex.test(key) || document.getElementById("sampleInterval").style.color == DISABLE) { - theEvent.returnValue = false; - if (theEvent.preventDefault) - theEvent.preventDefault(); - } - } - - //--------------------------------- - function OnDeleteMeasure() { - var is3dPlane = $("#3dPlane").hasClass("MenuButtonHighlight"); - var isHorizontalSurface = $("#horizontalSurface").hasClass("MenuButtonHighlight"); - - Reset(0, 0); - - if (is3dPlane) { - document.getElementById("3dPlane").click(); - } - else - if (isHorizontalSurface) { - document.getElementById("horizontalSurface").click(); - } - - EnableDisableButtons(); - } - - //--------------------------------- - function OnUnload() { - var measurementMode = SGWorld.GetParam(9916); - if (measurementMode == 33351/*ID_MEASURE_TERRAIN_AREA*/ || measurementMode == 33350/*ID_MEASURE_AREA*/) - SGWorld.Window.SetInputMode(0); - } - - //--------------------------------- - function OnEndDrawMeasurement(geometry) { - gGeometry = geometry; - EnableDisableButtons(); - } - - //--------------------------------- - function OnInputModeChanged(mode) { - if (mode == 0) { - ResetButtons(); - } - } - - //--------------------------------- - function OnMeasurementResult(rs, SounrceID) { - rs = rs.replace("N/A", "涓嶉�傜敤") - .replace("Surface Area:", "琛ㄩ潰绉細") - .replace("Area:", "闈㈢Н锛�") - .replace("Square Meter", "骞虫柟绫�") - .replace("Square km", "骞虫柟鍗冪背") - .replace("Perimeter: ", "鍛ㄩ暱锛�") - .replace(/Km/g, " 鍗冪背") - .replace(/m/g, " 绫�"); - - window.strs = rs.replace(/\t/g, "").replace(/s+/g, "").split("\n"); - var area = strs[0].split("锛�")[1].replace("\r", "").trim().replace(" 骞虫柟绫�", ""); - setText(6, area); - - if (!g_bCalculateTerrainArea) { - textContainer = document.querySelector('.textarea-container'); - textareaSize = textContainer.querySelector('.textarea-size'); - textareaSize.innerText = rs; - - textContainer = document.querySelector('.textarea-container_surface'); - textareaSize = textContainer.querySelector('.textarea-size_surface'); - textareaSize.innerText = SGLang.i18n("Text26"); - } - else { - textContainer = document.querySelector('.textarea-container_surface'); - textareaSize = textContainer.querySelector('.textarea-size_surface'); - textareaSize.innerText = rs; - } - - EnableDisableButtons(); - - return true; - } - - //--------------------------------- - function OnChangeMeasurementUnits() { - SGWorld.Command.Execute(1011, 3); - } - - //--------------------------------- - function CreateMeasurementObject() { - var bCreateMeasurementObject = document.getElementById("createMeasurementObject").checked == true; - SGWorld.SetOptionParam("CreateMeasurementObjects", bCreateMeasurementObject); - } - - //--------------------------------- - function EnableDisableButtons() { - var bEnableTerrainSurface = $("#horizontalSurface").hasClass("MenuButtonHighlight") && gGeometry != null; - if (!bEnableTerrainSurface) - document.getElementById("sampleInterval").style.color = DISABLE; - else - document.getElementById("sampleInterval").style.color = "#FFFFFF"; - - document.getElementById("terrainSurface").disabled = !bEnableTerrainSurface; - - if (bEnableTerrainSurface) - document.getElementById("terrainSurface").style.opacity = 1; - else - document.getElementById("terrainSurface").style.opacity = 0.3; - - var numPoints = SGWorld.GetParam(9915); - if (numPoints < 3) { - gGeometry = null; - } - - if (numPoints > 0) { - document.getElementById("deleteMeasure").style.opacity = 1; - } - else { - document.getElementById("deleteMeasure").style.opacity = 0.3; - } - - if (numPoints > 2 && gGeometry == null) { - document.getElementById("deleteLastPoint").style.opacity = 1; - } - else { - document.getElementById("deleteLastPoint").style.opacity = 0.3; - } - } - - //--------------------------------- - function ResetButtons() { - $("#horizontalSurface").removeClass("MenuButtonHighlight"); - $("#terrainSurface").removeClass("MenuButtonHighlight"); - $("#3dPlane").removeClass("MenuButtonHighlight"); - EnableDisableButtons(); - } - - //--------------------------------- - function SetSnapping() { - if ($("#snapping").hasClass("MenuButtonHighlight")) - SGWorld.SetParam(9912, 1); - else - SGWorld.SetParam(9912, 0); - } - - //--------------------------------- - function OnSnapping() { - //$("#snapping").removeClass("MenuButtonHighlight"); - - if ($(event.srcElement).hasClass("MenuButtonHighlight")) { - $("#snapping").removeClass("MenuButtonHighlight"); - SGWorld.SetParam(9912, 0); - } - else { - SGWorld.SetParam(9912, 1); - $(event.srcElement).addClass("MenuButtonHighlight"); - } - } - - //--------------------------------- - function On3DPlane() { - if ($(event.srcElement).hasClass("MenuButtonHighlight")) { - Reset(0, 0); - return; - } - - Reset(0, 0); - $(event.srcElement).addClass("MenuButtonHighlight"); - //SGWorld.Command.Execute(2358, 0);//__TEC_MEASURE_AREA - SGWorld.Command.Execute(1037, 0); - - textContainer = document.querySelector('.textarea-container'); - textareaSize = textContainer.querySelector('.textarea-size'); - textareaSize.innerText = SGLang.i18n("Text25"); - - SetSnapping(); - - SGWorld.SetOptionParam("AreaMeasurementDefaultMode", _3D_PLANE_NAME); - - EnableDisableButtons(); - } - - //--------------------------------- - function OnTerrainSurface() { - //Reset(0,0); - g_bCalculateTerrainArea = true; - if (document.getElementById("sampleInterval").value > 0.0) - SGWorld.Command.Execute(1165/*__TEC_MEASURE_TERRAIN_AREA*/, document.getElementById("sampleInterval").value); // 2359 - g_bCalculateTerrainArea = false; - - SetSnapping(); - } - - //--------------------------------- - function OnHorizontalSurface() { - if ($(event.srcElement).hasClass("MenuButtonHighlight")) { - Reset(0, 0); - return; - } - - Reset(0, 0); - $(event.srcElement).addClass("MenuButtonHighlight"); - SGWorld.Command.Execute(1165/*__TEC_MEASURE_TERRAIN_AREA*/, 0); // 2359 - - textContainer = document.querySelector('.textarea-container'); - textareaSize = textContainer.querySelector('.textarea-size'); - textareaSize.innerText = SGLang.i18n("Text25"); - - SetSnapping(); - - //SGWorld.SetOptionParam("AreaMeasurementDefaultMode", _HORIZONTAL_NAME); - EnableDisableButtons(); - } - - function OnDeleteLastPoint() { - SGWorld.SetParam(9914, 0); - EnableDisableButtons(); - } - </script> -</body> -</html> - -<!--Sig:00000040au6WjiNW.uqyaxQdPdCltSVnmGMYOWXEgBB9yrqQ.Kyq91MhWbUupggV5yi1GRel4nJZMYQa3tOFAX56jNS8XmJJ--> diff --git a/TEWin/Resources/DistanceMeasurement/Lang.js b/TEWin/Resources/DistanceMeasurement/Lang.js index dcc837d..d76f417 100644 --- a/TEWin/Resources/DistanceMeasurement/Lang.js +++ b/TEWin/Resources/DistanceMeasurement/Lang.js @@ -1,5 +1,5 @@ 锘縎GLang.lang = $.extend(SGLang.lang,{ - ToolTitle: "娴嬮噺宸ュ叿", + ToolTitle: "SmartEarth - 娉扮憺鏁板垱绉戞妧锛堝寳浜級鏈夐檺鍏徃", ToolName: "鍦板舰鍓栭潰", help: "甯姪", //Text0: "Cancel", @@ -13,13 +13,14 @@ //Text19: "Calculating query points", //Text16: "Left click on the terrain to draw a polygon/Polyline. Right click to finish operation.", Text17: "鍗曚綅", - Text18: "鍒犻櫎娴嬮噺鍊笺��", - Text19: "鍒犻櫎鏈�鍚庝竴涓祴閲忕偣銆�", - Text20: "灏嗘祴閲忕偣鎹曟崏鍒拌竟銆佸璞″拰椤剁偣銆�", - //Text21: "Calculate aerial distance, i.e., the actual distance between points in the 3D Window.", - //Text22: "Calculate horizontal distance between points in the 3D Window.", - Text23: "鍦ㄧ┖涓樉绀哄湴褰㈤珮绋嬨��", - Text24: "鏄剧ず绌轰腑璺濈", - Text25: "鏄剧ず姘村钩璺濈", - Text26: "鏄剧ず鍨傜洿璺濈", + Text18: "鍒犻櫎娴嬮噺鍊�", + Text19: "鍒犻櫎鏈�鍚庝竴涓祴閲忕偣", + Text20: "灏嗘祴閲忕偣鎹曟崏鍒拌竟銆佸璞″拰椤剁偣", +// Text21: "Calculate aerial distance, i.e., the actual distance between points in the 3D Window.", +// Text22: "Calculate horizontal distance between points in the 3D Window.", + Text23: "鍦ㄧ┖涓樉绀哄湴褰㈤珮绋�", + Text24: "鏄剧ず绌轰腑璺濈", + Text25: "鏄剧ず姘村钩璺濈", + Text26: "鏄剧ず鍨傜洿璺濈", + }); \ No newline at end of file diff --git a/TEWin/Resources/DistanceMeasurement/distanceMeasurement.html b/TEWin/Resources/DistanceMeasurement/distanceMeasurement.html index 9eace7b..46b0465 100644 --- a/TEWin/Resources/DistanceMeasurement/distanceMeasurement.html +++ b/TEWin/Resources/DistanceMeasurement/distanceMeasurement.html @@ -1,257 +1,291 @@ 锘�<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> - <title>ToolTitle</title> - <meta http-equiv="X-UA-Compatible" content="IE=9" /> - <!--<meta http-equiv="Content-Type" content="text/html; charset=utf-8">--> - <link rel="StyleSheet" href="../Style.css" type="text/css"> - <style> - </style> + <title>ToolTitle</title> + <meta http-equiv="X-UA-Compatible" content="IE=9" /> + <!--<meta http-equiv="Content-Type" content="text/html; charset=utf-8">--> + <link rel="StyleSheet" href="../Style.css" type="text/css"> + <style> + </style> </head> -<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="border: 0px; overflow: hidden;" id="Body" class="hideUntillTranslated ToolButtonsArea" onload="Init()" onunload="OnUnload()"> - <!--oncontextmenu="return false;"> onclick="bHide=true;HideOptionsNow()" > --> - <table border="0" width="100%" class="s8w" cellspacing="0" cellpadding="0"> - <tr class="s8"> - <td colspan="2" align="left" class="ToolButtonsArea" style="border-bottom: 2px solid #ffffff;"> - <button id="deleteMeasure" class="MenuButton2" style="border: none;" onclick="OnDeleteMeasure();"> - <img src="./img/delete.png" /><br /> - <!-- <span class="i18n">Text0</span> --> - </button> - <button id="deleteLastPoint" class="MenuButton2" style="border: none;" onclick="OnDeleteLastPoint()"> - <img src="./img/delete_last_point.png" /><br /> - <!-- <span class="i18n">Text1</span> --> - </button> - <button id="snapping" class="MenuButton2" style="border: none;" onclick="OnSnapping()"> - <img src="./img/snap.png" /><br /> - <!-- <span class="i18n" style="font:#2A4EA5">Text7</span>--> - </button> - <button id="onGroundDistance" class="MenuButton2" style="border-left: 2px solid #ffffff; border-right: none; display: none;" onclick="OnGroundDistance()"> - <img src="./img/TerrainProfile.png" /><!--<br /><span class="i18n" style="font:#2A4EA5">Text5</span>--> - </button> - </td> - </tr> - </table> +<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="border: 0px; overflow: hidden;" id="Body" class="hideUntillTranslated ToolButtonsArea" onload="Init()" onunload="OnUnload()"> + <!--oncontextmenu="return false;"> onclick="bHide=true;HideOptionsNow()" > --> + <table border="0" width="100%" class="s8w" cellspacing="0" cellpadding="0"> + <tr class="s8"> + <td colspan="2" align="left" class="ToolButtonsArea" style="border-bottom: 2px solid #ffffff;"> + <button id="deleteMeasure" class="MenuButton2" style="border:none;" onclick="OnDeleteMeasure();"><img src="./img/delete.png" /><br /> <!-- <span class="i18n">Text0</span> --></button> + <button id="deleteLastPoint" class="MenuButton2" style="border:none;" onclick="OnDeleteLastPoint()"><img src="./img/delete_last_point.png" /><br /><!-- <span class="i18n">Text1</span> --></button> + <button id="snapping" class="MenuButton2" style="border:none;" onclick="OnSnapping()"><img src="./img/snap.png" /><br /><!-- <span class="i18n" style="font:#2A4EA5">Text7</span>--> </button> + <button id="onGroundDistance" class="MenuButton2" style="border-left: 2px solid #ffffff;border-right: none;" onclick="OnGroundDistance()"><img src="./img/TerrainProfile.png" /><br /><!-- <span class="i18n" style="font:#2A4EA5">Text5</span>--></button> + + </td> + </tr> + </table> - <table border="0" width="100%" class="s8w ToolButtonsArea" cellspacing="0" cellpadding="3pt"> - <tr id="createTRId" style="display: none;"> - <td> - <span class="i18n s8w" style="vertical-align: top;">Text6</span> - <input type="checkbox" align="bottom" id="createMeasurementObject" style="width: 25px;" onclick="CreateMeasurementObject();" /> - </td> - </tr> - <tr> - <td> - <span class="i18n s8w" style="vertical-align: top; color: yellow;">Text24</span> - <input type="checkbox" id="showAerialDistance" checked align="bottom" style="width: 25px;" onclick="OnShowAerial();" /> - </td> - </tr> - <tr> - <td> - <span class="i18n s8w" style="vertical-align: top; color: white;">Text25</span> - <input type="checkbox" id="showHorizontalDistance" align="bottom" style="width: 25px;" onclick="OnShowHorizontal();" /> - </td> - </tr> - <tr> - <td> - <span class="i18n s8w" style="vertical-align: top; color: #FF49E6;">Text26</span> - <input type="checkbox" id="showVerticalDistance" align="bottom" style="width: 25px;" onclick="OnShowVertical();" /> - </td> - </tr> - <tr> - <td class="textarea-container"> - <style> - div.textarea-size { - font-size: 12px; - } - </style> - <div class="textarea-size s8w"></div> - </td> - </tr> - <tr id="unitTRId" style="display: none;"> - <td> - <span id="changeMeasurementUnits" onclick="OnChangeMeasurementUnits()" class="i18n s9w link">Text17</span> - </td> - </tr> - </table> + <table border="0" width="100%" class="s8w ToolButtonsArea" cellspacing="0" cellpadding="3pt"> + + + <tr id="createTRId"> + <td > + <span class="i18n s8w" style="vertical-align:top;">Text6</span> + <input type="checkbox" align="bottom" id="createMeasurementObject" style="width:25px;" onclick="CreateMeasurementObject();"/> + </td> + </tr> + <tr > + <td > + <span class="i18n s8w" style="vertical-align:top;color:yellow;">Text24</span> + <input type="checkbox" id="showAerialDistance" checked align="bottom" style="width:75px;" onclick="OnShowAerial();"/> + </td> + + </tr> + <tr > + <td > + <span class="i18n s8w" style="vertical-align:top;color:white;">Text25</span> + <input type="checkbox" id="showHorizontalDistance" align="bottom" style="width:25px;" onclick="OnShowHorizontal();"/> + </td> + </tr> + <tr > + <td > + <span class="i18n s8w" style="vertical-align:top;color:#FF49E6;">Text26</span> + <input type="checkbox" id="showVerticalDistance" align="bottom" style="width:55px;" onclick="OnShowVertical();"/> + </td> + </tr> + <tr > + <td class="textarea-container"> + <style> + div.textarea-size{font-size: 12px;} + </style> + <div class="textarea-size s8w" ></div> + </td> + </tr> + <tr id="unitTRId"> + <td align="right" > + <span id= "changeMeasurementUnits" onclick="OnChangeMeasurementUnits()" class="i18n s9w link">Text17</span> + </td> + </tr> - <object id="SGWorld" style="display: none" classid="CLSID:3a4f919d-65a8-11d5-85c1-0001023952c1"></object> - <script language="javascript" src="../jquery/jquery-3.1.1.min.js"></script> - <script language="javascript" src="../ToolsCommon70.js"></script> - <script language="JavaScript"> - //** this is a global variables for the polyline/polygon drawings - //var gPolygonText = SGLang.i18n("Text35"); - //var gPolylineText = SGLang.i18n("Text36"); - var gDrawPolyClick = null; - var gEndDrawPoly = DrawPoly; - var gPopupCaption = ""; + + </table> + + <object id="SGWorld" style="display:none" classid="CLSID:3a4f919d-65a8-11d5-85c1-0001023952c1"> </object> + - var _AERIAL_REG_NAME = "DistanceMeasurementShowAerial"; - var _HORIZONTAL_REG_NAME = "DistanceMeasurementShowHorizontal"; - var _VERTICAL_REG_NAME = "DistanceMeasurementShowVertical"; + +<script language="javascript" src="../jquery/jquery-3.1.1.min.js"></script> +<script language="javascript" src="../ToolsCommon70.js"></script> - var bInEdit; - var gGeometry = null; - //---------------- - function Init() { - SGWorld.AttachEvent("OnMeasurementDistanceResult", OnMeasurementResult); - SGWorld.AttachEvent("OnInputModeChanged", OnInputModeChanged); - SGWorld.AttachEvent("OnEndDrawMeasurement", OnEndDrawMeasurement); - SGWorld.AttachEvent("OnLButtonUp", OnLButtonUp); - var isPM = GetParamValue("pm", "0"); - if (isPM == "1") { - $("#unitTRId").hide(); - $("#createTRId").hide(); - $("#onGroundDistance").hide(); - } - document.getElementById("changeMeasurementUnits").value = SGLang.i18n(""); - document.getElementById("deleteMeasure").title = SGLang.i18n("Text18"); - document.getElementById("deleteLastPoint").title = SGLang.i18n("Text19"); - document.getElementById("snapping").title = SGLang.i18n("Text20"); - document.getElementById("onGroundDistance").title = SGLang.i18n("Text23"); - ////Turn off CreateMeasurementObject - //SGWorld.Command.Execute(2225,0); +<script language="JavaScript"> - var bCreateMeasurementObject = (isPM == "1") ? false : SGWorld.GetOptionParam("CreateMeasurementObjects"); - document.getElementById("createMeasurementObject").checked = bCreateMeasurementObject; - CreateMeasurementObject(); +//** this is a global variables for the polyline/polygon drawings +var gPolygonText = SGLang.i18n("Text35"); +var gPolylineText = SGLang.i18n("Text36"); +var gDrawPolyClick = null; +var gEndDrawPoly = DrawPoly; +var gPopupCaption = ""; +//** - Reset(1, 0); +var _AERIAL_REG_NAME = "DistanceMeasurementShowAerial"; +var _HORIZONTAL_REG_NAME = "DistanceMeasurementShowHorizontal"; +var _VERTICAL_REG_NAME = "DistanceMeasurementShowVertical"; - //SGWorld.Command.Execute(2356, 0);//__TEC_MEASURE_AERIAL_DIST - SGWorld.Command.Execute(1035, 0); +var bInEdit; - SetSnapping(); - //document.getElementById("showAerialDistance").checked = SGWorld.GetOptionParam(_AERIAL_REG_NAME); - //document.getElementById("showHorizontalDistance").checked = SGWorld.GetOptionParam(_HORIZONTAL_REG_NAME); - //document.getElementById("showVerticalDistance").checked = SGWorld.GetOptionParam(_VERTICAL_REG_NAME); - document.getElementById("showHorizontalDistance").checked = true; - document.getElementById("showVerticalDistance").checked = true; - document.getElementById("showAerialDistance").checked = true; +var gGeometry = null; +//---------------- +function Init() +{ + SGWorld.AttachEvent("OnMeasurementDistanceResult", OnMeasurementResult); + SGWorld.AttachEvent("OnInputModeChanged", OnInputModeChanged); + SGWorld.AttachEvent("OnEndDrawMeasurement", OnEndDrawMeasurement); + SGWorld.AttachEvent("OnLButtonUp", OnLButtonUp); + + var isPM = GetParamValue("pm", "0"); + if (isPM=="1"){ + $("#unitTRId").hide(); + $("#createTRId").hide(); + $("#onGroundDistance").hide(); + } + document.getElementById("changeMeasurementUnits").value=SGLang.i18n(""); + document.getElementById("deleteMeasure").title=SGLang.i18n("Text18"); + document.getElementById("deleteLastPoint").title=SGLang.i18n("Text19"); + document.getElementById("snapping").title=SGLang.i18n("Text20"); + document.getElementById("onGroundDistance").title=SGLang.i18n("Text23"); + + ////Turn off CreateMeasurementObject + //SGWorld.Command.Execute(2225,0); + + var bCreateMeasurementObject = (isPM=="1")?false:SGWorld.GetOptionParam("CreateMeasurementObjects"); + document.getElementById("createMeasurementObject").checked = bCreateMeasurementObject; + CreateMeasurementObject(); + + Reset(1,0); + + SGWorld.Command.Execute(2356,0);//__TEC_MEASURE_AERIAL_DIST + + SetSnapping(); - //////////////OnShow(); - EnableDisableButtons(); - //showVerticalDistance - } + document.getElementById("showAerialDistance").checked = SGWorld.GetOptionParam(_AERIAL_REG_NAME); + document.getElementById("showHorizontalDistance").checked = SGWorld.GetOptionParam(_HORIZONTAL_REG_NAME); + document.getElementById("showVerticalDistance").checked = SGWorld.GetOptionParam(_VERTICAL_REG_NAME); - //---------------- - function ShowPopup(ProfileType, ObjID) { - var CompareStr = ""; - var CompareMode = 0; - var Density = 2; + //////////////OnShow(); - // Remove previos popup - SGWorld.Window.RemovePopupByCaption(gPopupCaption); + EnableDisableButtons(); + + + //showVerticalDistance +} +//---------------- +function ShowPopup(ProfileType, ObjID) +{ + var CompareStr = ""; + var CompareMode =0; + var Density = 2; - gPopupCaption = SGLang.i18n("Text14") + " " + Date().toString(); - var url = abspath() + "/../TerrainProfile/TerrainProfilePopup.html?Type=" + ProfileType + "&ObjID=" + ObjID + "&DisableChangeInputMode=1" + "&Density=" + Density + "&Compare=" + CompareMode + CompareStr + "&Caption=" + gPopupCaption + "&lang=" + SGLang.getCode(); + // Remove previos popup + SGWorld.Window.RemovePopupByCaption(gPopupCaption); - //var path = location.href.substring(0, location.href.lastIndexOf("/") + 1); - //var url = path + "../TerrainProfile/TerrainProfilePopup.html?Type=" + ProfileType + "&ObjID=" + ObjID + "&DisableChangeInputMode=1" + "&Density=" + Density + "&Compare=" + CompareMode + CompareStr + "&Caption=" + gPopupCaption + "&lang=" + SGLang.getCode(); + gPopupCaption = SGLang.i18n("Text14") + " " + Date().toString(); + var url = abspath() + "/../TerrainProfile/TerrainProfilePopup.html?Type=" + ProfileType + "&ObjID=" + ObjID + "&DisableChangeInputMode=1" +"&Density=" + Density + "&Compare=" + CompareMode + CompareStr + "&Caption=" + gPopupCaption + "&lang=" + SGLang.getCode(); + + // var popupMsg = SGWorld.Creator.CreatePopupMessage(gPopupCaption, url, 1, SGWorld.Window.Rect.Height * 2 / 3, SGWorld.Window.Rect.Width - 2, SGWorld.Window.Rect.Height / 3 - 55, -1); + var popupMsg = SGWorld.Creator.CreatePopupMessage(gPopupCaption, url, 1, -1000, 100, 100, -1); - // var popupMsg = SGWorld.Creator.CreatePopupMessage(gPopupCaption, url, 1, SGWorld.Window.Rect.Height * 2 / 3, SGWorld.Window.Rect.Width - 2, SGWorld.Window.Rect.Height / 3 - 55, -1); - var popupMsg = SGWorld.Creator.CreatePopupMessage(gPopupCaption, url, 1, -1000, 100, 100, -1); + popupMsg.Flags = 2 + 32; + SGWorld.Window.ShowPopup(popupMsg); - popupMsg.Flags = 2 + 32; - SGWorld.Window.ShowPopup(popupMsg); - } + +} +function OnShowAerial() +{ + SGWorld.SetOptionParam(_AERIAL_REG_NAME,document.getElementById("showAerialDistance").checked); +} + +function OnShowHorizontal() +{ - function OnShowAerial() { - SGWorld.SetOptionParam(_AERIAL_REG_NAME, document.getElementById("showAerialDistance").checked); - } + SGWorld.SetOptionParam(_HORIZONTAL_REG_NAME,document.getElementById("showHorizontalDistance").checked); +} +function OnShowVertical() +{ + SGWorld.SetOptionParam(_VERTICAL_REG_NAME,document.getElementById("showVerticalDistance").checked); +} + + - function OnShowHorizontal() { - SGWorld.SetOptionParam(_HORIZONTAL_REG_NAME, document.getElementById("showHorizontalDistance").checked); - } - function OnShowVertical() { - SGWorld.SetOptionParam(_VERTICAL_REG_NAME, document.getElementById("showVerticalDistance").checked); - } +function OnUnload() +{ + var measurementMode = SGWorld.GetParam(9916); + if(measurementMode == 33326/*ID_MEASURE_HDIST*/ || measurementMode == 33327/*ID_MEASURE_ADIST*/) + SGWorld.Window.SetInputMode(0); + +} - function OnUnload() { - var measurementMode = SGWorld.GetParam(9916); - if (measurementMode == 33326/*ID_MEASURE_HDIST*/ || measurementMode == 33327/*ID_MEASURE_ADIST*/) - SGWorld.Window.SetInputMode(0); - } +//------------- +// DrawPoly +function DrawPoly(geometry, type, altitudeType) { - //------------- - // DrawPoly - function DrawPoly(geometry, type, altitudeType) { - // create a polyline, under the hidden group, using this geometry and send the objID to the popup - var lineGroup = SGWorld.ProjectTree.CreateGroup(SGLang.i18n("Text28"), SGWorld.ProjectTree.HiddenGroupID); // SGWorld.ProjectTree.RootID - var line = SGWorld.Creator.CreatePolyline(geometry, "#FC8220", 3, lineGroup, "ProfileLine"); + // create a polyline, under the hidden group, using this geometry and send the objID to the popup + var lineGroup = SGWorld.ProjectTree.CreateGroup(SGLang.i18n("Text28"), SGWorld.ProjectTree.HiddenGroupID); // SGWorld.ProjectTree.RootID + var line = SGWorld.Creator.CreatePolyline(geometry, "#FC8220", 3, lineGroup, "ProfileLine"); + + //line.LineStyle.Width = -4; + //line.SetParam(5440, 1); + line.Visibility.Show = false; - //line.LineStyle.Width = -4; - //line.SetParam(5440, 1); - line.Visibility.Show = false; + ShowPopup(0, lineGroup); + return true; - ShowPopup(0, lineGroup); - return true; - } +} - function OnDeleteMeasure() { - //alert("aa"); - Reset(0, 0); +function OnDeleteMeasure() +{ - //SGWorld.Command.Execute(2356, 0);//__TEC_MEASURE_AERIAL_DIST - SGWorld.Command.Execute(1035, 0); + //alert("aa"); + Reset(0,0); + - EnableDisableButtons(); - //alert("bb"); - } + SGWorld.Command.Execute(2356, 0);//__TEC_MEASURE_AERIAL_DIST - function OnInputModeChanged(mode) { - if (mode == 0) { - Reset(0, 0); - //SGWorld.Window.RemovePopupByCaption("Distance Measurement"); - } - } + EnableDisableButtons(); + //alert("bb"); +} - function OnLButtonUp(Flags, X, Y) { - if ((Flags & 0x0400) == 0) { - gGeometry = null; - } - return false; - } +function OnInputModeChanged(mode) +{ + if(mode==0) + { + Reset(0,0); + //SGWorld.Window.RemovePopupByCaption("Distance Measurement"); + } + + +} - function OnEndDrawMeasurement(geometry) { - gGeometry = geometry; - EnableDisableButtons(); - } - function EnableDisableButtons() { - var numPoints = SGWorld.GetParam(9915); +function OnLButtonUp(Flags, X, Y) +{ + + if((Flags & 0x0400)==0) + { + gGeometry = null; + } + return false; +} - if (numPoints > 0) { - document.getElementById("deleteMeasure").style.opacity = 1; - } - else { - document.getElementById("deleteMeasure").style.opacity = 0.3; - } +function OnEndDrawMeasurement(geometry) +{ + gGeometry = geometry; + EnableDisableButtons(); +} - if (gGeometry == null) { - document.getElementById("deleteLastPoint").style.opacity = 1; - } - else { - document.getElementById("deleteLastPoint").style.opacity = 0.3; - } +function EnableDisableButtons() +{ + var numPoints = SGWorld.GetParam(9915); + + if(numPoints>0) + { + document.getElementById("deleteMeasure").style.opacity = 1; + } + else + { + document.getElementById("deleteMeasure").style.opacity = 0.3; + } + + + - var bEnableTerrainProfile = gGeometry != null; + if(gGeometry==null) + { + document.getElementById("deleteLastPoint").style.opacity = 1; + } + else + { + document.getElementById("deleteLastPoint").style.opacity = 0.3; + } + + var bEnableTerrainProfile = gGeometry!=null; + + if(bEnableTerrainProfile) + { + document.getElementById("onGroundDistance").style.opacity = 1; + } + else + { + document.getElementById("onGroundDistance").style.opacity = 0.3; + } + +} - if (bEnableTerrainProfile) { - document.getElementById("onGroundDistance").style.opacity = 1; - } - else { - document.getElementById("onGroundDistance").style.opacity = 0.3; - } - } - - function OnMeasurementResult(rs, SounrceID) { - rs = rs.replace("Total Aerial Distance:", "鎬荤┖涓窛绂伙細") +function OnMeasurementResult(measurementResult,SounrceID) +{ + measurementResult = measurementResult.replace("Total Aerial Distance:", "鎬荤┖涓窛绂伙細") .replace("Total Horizontal Distance:", "鎬绘按骞宠窛绂伙細") .replace("Total Vertical Distance:", "鎬诲瀭鐩磋窛绂伙細") .replace("Total Vertical Distance (First point to last point):", "鎬诲瀭鐩磋窛绂伙紙浠庣涓�鐐瑰埌鏈�鍚庝竴鐐癸級锛�") @@ -260,125 +294,151 @@ .replace(/km/g, " 鍗冪背") .replace(/cm/g, " 鍘樼背") .replace(/mm/g, " 姣背") - .replace(/m/g, " 绫�") + .replace(/m/g, " 绫�"); - textContainer = document.querySelector('.textarea-container'); - textareaSize = textContainer.querySelector('.textarea-size'); - //input = textContainer.querySelector('textarea'); - //input.value = measurementResult; - textareaSize.innerText = rs; + textContainer = document.querySelector('.textarea-container'); + textareaSize = textContainer.querySelector('.textarea-size'); + //input = textContainer.querySelector('textarea'); + //input.value = measurementResult; + textareaSize.innerText = measurementResult; + + EnableDisableButtons(); + return true; + - EnableDisableButtons(); - return true; - } +} - function OnChangeMeasurementUnits() { - SGWorld.Command.Execute(1011, 3); - } +function OnChangeMeasurementUnits() +{ + SGWorld.Command.Execute(1011,3); +} - function CreateMeasurementObject() { - var bCreateMeasurementObject = document.getElementById("createMeasurementObject").checked == true; - SGWorld.SetOptionParam("CreateMeasurementObjects", bCreateMeasurementObject); - } +function CreateMeasurementObject() +{ + var bCreateMeasurementObject = document.getElementById("createMeasurementObject").checked==true; + SGWorld.SetOptionParam("CreateMeasurementObjects",bCreateMeasurementObject); +} - function ResetButtons() { - //$("#verticalDistance").removeClass("MenuButtonHighlight"); - $("#onGroundDistance").removeClass("MenuButtonHighlight"); - } +function ResetButtons() +{ + //$("#verticalDistance").removeClass("MenuButtonHighlight"); + $("#onGroundDistance").removeClass("MenuButtonHighlight"); +} - //------------------ - // Reset - //------------------ - function Reset(FirstTime, FromMouseInputMode) { - ResetButtons(); - gGeometry = null; - try { +//------------------ +// Reset +//------------------ +function Reset(FirstTime, FromMouseInputMode) +{ + ResetButtons(); + gGeometry = null; + try { if (gPolyObj != null) - SGWorld.Creator.DeleteObject(gPolyObj.ID); - } catch (e) { } + SGWorld.Creator.DeleteObject(gPolyObj.ID); + } catch (e) { } - gPolyObj = null; - GroupID = null; + gPolyObj = null; + GroupID = null; - bDontAskme = false; + bDontAskme = false; - $("#lineButton").removeClass("MenuButtonHighlight"); - $("#areaButton").removeClass("MenuButtonHighlight"); - $("#groupButton").removeClass("MenuButtonHighlight"); - $("#clipboardButton").removeClass("MenuButtonHighlight"); + $("#lineButton").removeClass("MenuButtonHighlight"); + $("#areaButton").removeClass("MenuButtonHighlight"); + $("#groupButton").removeClass("MenuButtonHighlight"); + $("#clipboardButton").removeClass("MenuButtonHighlight"); - SGWorld.ProjectTree.EnableRedraw(1); - SGWorld.Window.HideMessageBarText(); + SGWorld.ProjectTree.EnableRedraw(1); + SGWorld.Window.HideMessageBarText(); - if (bInEdit) { + if (bInEdit) { SGWorld.DetachEvent("OnLButtonClicked", DrawPolyLButtonClicked); SGWorld.DetachEvent("OnRButtonUp", DrawPolyRButtonUp); SGWorld.DetachEvent("OnFrame", DrawPolyOnFrame); SGWorld.DetachEvent("OnInputModeChanged", DrawPolyInputModeChanged); - } - bInEdit = false; - - //if (FirstTime != 1 && FromMouseInputMode == 0) - // SGWorld.Window.SetInputMode(0); } + bInEdit = false; - function OnEndDrawMeasurement(geometry) { - gGeometry = geometry; - EnableDisableButtons(); - } + //if (FirstTime != 1 && FromMouseInputMode == 0) + // SGWorld.Window.SetInputMode(0); +} - //-------------- - // CreateObjects - //-------------- - function OnGroundDistance() { - DrawPoly(gGeometry, 0, 0); - return; - } - function SetSnapping() { - if ($("#snapping").hasClass("MenuButtonHighlight")) - SGWorld.SetParam(9912, 1); - else - SGWorld.SetParam(9912, 0); - } +function OnEndDrawMeasurement(geometry) +{ + gGeometry = geometry; + EnableDisableButtons(); +} - function OnSnapping() { - //$("#snapping").removeClass("MenuButtonHighlight"); +//-------------- +// CreateObjects +//-------------- +function OnGroundDistance() +{ - if ($(event.srcElement).hasClass("MenuButtonHighlight")) { - $("#snapping").removeClass("MenuButtonHighlight"); - SGWorld.SetParam(9912, 0); - } - else { - SGWorld.SetParam(9912, 1); - $(event.srcElement).addClass("MenuButtonHighlight"); - } - } + DrawPoly(gGeometry,0,0); + return; +} - /* - function OnVerticalDistance() - { - if( $(event.srcElement).hasClass("MenuButtonHighlight")) - { - Reset(0,0); - return; - } +function SetSnapping() +{ + if( $("#snapping").hasClass("MenuButtonHighlight")) + SGWorld.SetParam(9912,1); + else + SGWorld.SetParam(9912,0); +} - Reset(0,0); - $(event.srcElement).addClass("MenuButtonHighlight"); - SGWorld.Command.Execute(1036,0); - SetSnapping(); - } - */ - function OnDeleteLastPoint() { - SGWorld.SetParam(8335, 0); - EnableDisableButtons(); - } - </script> +function OnSnapping() +{ + //$("#snapping").removeClass("MenuButtonHighlight"); + + if( $(event.srcElement).hasClass("MenuButtonHighlight")) + { + $("#snapping").removeClass("MenuButtonHighlight"); + SGWorld.SetParam(9912,0); + } + else + { + SGWorld.SetParam(9912,1); + $(event.srcElement).addClass("MenuButtonHighlight"); + } + +} +/* +function OnVerticalDistance() +{ + if( $(event.srcElement).hasClass("MenuButtonHighlight")) + { + Reset(0,0); + return; + } + + + Reset(0,0); + $(event.srcElement).addClass("MenuButtonHighlight"); + SGWorld.Command.Execute(1036,0); + + SetSnapping(); +} +*/ + + + + +function OnDeleteLastPoint() +{ + SGWorld.SetParam(8335,0); + EnableDisableButtons(); +} + + + +</script> + </body> </html> + <!--Sig:000000408JYdtBwnEhYwKwSHBToL4ROTBsQ92IumwfiHRg2dcUb.aSdjqmR2hWrrJjiq7xBbYr6MVX764LIe8a6004zvXaJJ--> diff --git a/TEWin/TEWin.csproj b/TEWin/TEWin.csproj index d619630..b69b979 100644 --- a/TEWin/TEWin.csproj +++ b/TEWin/TEWin.csproj @@ -226,66 +226,6 @@ <EmbeddedResource Include="Resources\SlopeCursor\ToolIcon.png"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> - <EmbeddedResource Include="Resources\AreaMeasurement\area.html"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> - <EmbeddedResource Include="Resources\AreaMeasurement\AreaMeasurement.html"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> - <EmbeddedResource Include="Resources\AreaMeasurement\img\3d_palne_area.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> - <EmbeddedResource Include="Resources\AreaMeasurement\img\delete.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> - <EmbeddedResource Include="Resources\AreaMeasurement\img\delete_last_point.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> - <EmbeddedResource Include="Resources\AreaMeasurement\img\horizontal.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> - <EmbeddedResource Include="Resources\AreaMeasurement\img\snap.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> - <EmbeddedResource Include="Resources\AreaMeasurement\img\surface.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> - <EmbeddedResource Include="Resources\AreaMeasurement\Lang.js"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> - <EmbeddedResource Include="Resources\DistanceMeasurement\cursor_m.cur"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> - <EmbeddedResource Include="Resources\DistanceMeasurement\distanceMeasurement.html"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> - <EmbeddedResource Include="Resources\DistanceMeasurement\Hourglass.cur"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> - <EmbeddedResource Include="Resources\DistanceMeasurement\img\aerial.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> - <EmbeddedResource Include="Resources\DistanceMeasurement\img\delete.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> - <EmbeddedResource Include="Resources\DistanceMeasurement\img\delete_last_point.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> - <EmbeddedResource Include="Resources\DistanceMeasurement\img\horizontal.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> - <EmbeddedResource Include="Resources\DistanceMeasurement\img\snap.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> - <EmbeddedResource Include="Resources\DistanceMeasurement\img\TerrainProfile.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> - <EmbeddedResource Include="Resources\DistanceMeasurement\img\verticle.png"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> - <EmbeddedResource Include="Resources\DistanceMeasurement\Lang.js"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </EmbeddedResource> <EmbeddedResource Include="Resources\SlopeMapQuery\2052\Lang.js"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> @@ -748,6 +688,63 @@ <EmbeddedResource Include="Resources\CommonImg\Separator.gif"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </EmbeddedResource> + <EmbeddedResource Include="Resources\AreaMeasurement\AreaMeasurement.html"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </EmbeddedResource> + <EmbeddedResource Include="Resources\AreaMeasurement\img\3d_palne_area.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </EmbeddedResource> + <EmbeddedResource Include="Resources\AreaMeasurement\img\delete.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </EmbeddedResource> + <EmbeddedResource Include="Resources\AreaMeasurement\img\delete_last_point.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </EmbeddedResource> + <EmbeddedResource Include="Resources\AreaMeasurement\img\horizontal.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </EmbeddedResource> + <EmbeddedResource Include="Resources\AreaMeasurement\img\snap.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </EmbeddedResource> + <EmbeddedResource Include="Resources\AreaMeasurement\img\surface.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </EmbeddedResource> + <EmbeddedResource Include="Resources\AreaMeasurement\Lang.js"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </EmbeddedResource> + <EmbeddedResource Include="Resources\DistanceMeasurement\cursor_m.cur"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </EmbeddedResource> + <EmbeddedResource Include="Resources\DistanceMeasurement\distanceMeasurement.html"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </EmbeddedResource> + <EmbeddedResource Include="Resources\DistanceMeasurement\Hourglass.cur"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </EmbeddedResource> + <EmbeddedResource Include="Resources\DistanceMeasurement\img\aerial.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </EmbeddedResource> + <EmbeddedResource Include="Resources\DistanceMeasurement\img\delete.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </EmbeddedResource> + <EmbeddedResource Include="Resources\DistanceMeasurement\img\delete_last_point.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </EmbeddedResource> + <EmbeddedResource Include="Resources\DistanceMeasurement\img\horizontal.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </EmbeddedResource> + <EmbeddedResource Include="Resources\DistanceMeasurement\img\snap.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </EmbeddedResource> + <EmbeddedResource Include="Resources\DistanceMeasurement\img\TerrainProfile.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </EmbeddedResource> + <EmbeddedResource Include="Resources\DistanceMeasurement\img\verticle.png"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </EmbeddedResource> + <EmbeddedResource Include="Resources\DistanceMeasurement\Lang.js"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </EmbeddedResource> <Content Include="Resources\log4net4.dll" /> <Content Include="Resources\Newtonsoft.Json.dll" /> </ItemGroup> -- Gitblit v1.9.3