From d07c4d03e1f78a1ea4ce92dd20121cd4a5d88dd3 Mon Sep 17 00:00:00 2001 From: zbx1425 Date: Thu, 15 Apr 2021 22:50:57 +0800 Subject: [PATCH] Add hotkey hint --- BlocklyAtsGui/BlocklyAtsGui.csproj | 1 + .../UserInterface/FormMain.Designer.cs | 1 + BlocklyAtsGui/UserInterface/FormMain.resx | 30 +++++++++---------- BlocklyAtsGui/WebView/ExternalBrowser.cs | 2 +- assets/lib/boilerplate.cs | 1 - www/index.html | 14 ++++++++- www/js/bats_code.js | 14 +++++++-- www/js/blocks_bve.js | 2 +- www/js/uai.js | 3 +- www/js/workspace_search.js | 18 +++++++++++ 10 files changed, 64 insertions(+), 22 deletions(-) create mode 100644 www/js/workspace_search.js diff --git a/BlocklyAtsGui/BlocklyAtsGui.csproj b/BlocklyAtsGui/BlocklyAtsGui.csproj index 374b0cc..957908d 100644 --- a/BlocklyAtsGui/BlocklyAtsGui.csproj +++ b/BlocklyAtsGui/BlocklyAtsGui.csproj @@ -208,6 +208,7 @@ COPY /Y "$(SolutionDir)BatsWinApi\Release\batswinapi_x64.dll" "$(TargetDir)\lib" ERASE "$(TargetDir)\WebView2Loader.dll" RMDIR /S /Q "${TargetDir)\BlocklyATS.exe.WebView2" DEL "$(TargetDir)\*.xml" +DEL "$(TargetDir)\*.zip" "C:\Program Files\7-zip\7z.exe" a BlocklyAts.zip . ) diff --git a/BlocklyAtsGui/UserInterface/FormMain.Designer.cs b/BlocklyAtsGui/UserInterface/FormMain.Designer.cs index d48991c..6e624d2 100644 --- a/BlocklyAtsGui/UserInterface/FormMain.Designer.cs +++ b/BlocklyAtsGui/UserInterface/FormMain.Designer.cs @@ -158,6 +158,7 @@ private void InitializeComponent() { this.tsbtnAbout.Name = "tsbtnAbout"; this.tsbtnAbout.Size = new System.Drawing.Size(23, 22); this.tsbtnAbout.Text = "About BlocklyAts"; + this.tsbtnAbout.Click += new System.EventHandler(this.tsbtnAbout_Click); // // tsbtnBugReport // diff --git a/BlocklyAtsGui/UserInterface/FormMain.resx b/BlocklyAtsGui/UserInterface/FormMain.resx index f515df2..93ec3bc 100644 --- a/BlocklyAtsGui/UserInterface/FormMain.resx +++ b/BlocklyAtsGui/UserInterface/FormMain.resx @@ -238,21 +238,21 @@ iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAMpSURBVEhLvZRdSFNhGMe904sYIoLIUBmzGUsF+9yGU1Fz - S1hQNwWVJBO6UJrdlAQSrSgoIaQiIxL6uIiki7qxiBHrc2tzzjGZn6nzzG266Vxukzb37zlnx7tY06gf - jHP2nuf/f573eT+y/gu1tbU7NJojT1paWnw6nS7W1qZb1WiOWZVKxXE+ZHuo1WppR8eF5NDQFEZGZmEy - jePt26/o7r6cqK+vf8CHZQ5VmkOmley7Wn34RW/vQzJ2w2h0wmKZxNjYAm7c6EVdXc0FTpAp7PTPnbuY - UKlUz9n/lOhRT8992GzfYTaPweWah8MxgzNnWpebmmR5nCgTTp7ULg4Pz+Du3X4olcp+dkyprOvX63uS - LheDiQkGXm8Iev2tpFx+4DQnyoT2dl3Map2G08ng5s17UCgUjyUS0f7WVm10fNwDjyeAUCiGp09fQi6X - X+Nlf+bEibPhjx9H8eGDE1brFPXzDo4e1cYGBgbBMEEsLYUQifzE7dsPUFEhPc/L/kxjY+PQ69dGfPs2 - Qb8xqnye6+v8fACLiytkGsPKSgQGw1fQ4nqKi4sLeWl6Kit3H9dq2zccjpTh1BQ7/c1KYwgGw5ieXsD6 - eoIS29HQcMgrFAp38vL0lJeXP+zqukqtmCDTEFUYw9paHIHAD0rEUOUhxONxsJhMdnaRmYKCAhEvT49Y - LL7U3KwJdnZe3+jre8bt3VevDFyCeDzBmW5iNttQXV3ty8vLE/Ly9JSWlgpEItGpkpKSK4WFBRdlMoWX - 7e3vsFhGIJPJFvLz8yW8PHNIVLh3736PwfCFt0uRSGx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TGpqaqxQKLyWkpKiSUpKbJFK5S62 + t3/CaByHVCpdTkhIEPPyyCFRUnZ2rlOr/cbbhQkG97inwWAh83x3TEzMSV4SObGxsSJaAzIPV86asj33 + eNYRCgEWywSysrLcFHr0yuPi4lLS0896Pn/WY3NzFwsLbu7gsAlYzGYbJJIsJjo6WsRLIoemS+YSpq/v + CxluweFYweKih3ptx85OgC6uCeTlyRx8+JERE26t1kBbcQfz8y709urhoMPk8XhBF9gGH3csTrLmAwNf + ucoZZg0zMwzdI+Vb9K0sHHJ8xLTvl3U6Ix0gN1vpNo39tek+grS0NEdOTsEavZeEh/4pUVG/AeEAILp0 + m/cKAAAAAElFTkSuQmCC diff --git a/BlocklyAtsGui/WebView/ExternalBrowser.cs b/BlocklyAtsGui/WebView/ExternalBrowser.cs index 9f2c1ba..1b97e93 100644 --- a/BlocklyAtsGui/WebView/ExternalBrowser.cs +++ b/BlocklyAtsGui/WebView/ExternalBrowser.cs @@ -97,7 +97,7 @@ private string InteropReceived(string endpoint, string requestBody) { do { browserID = random.Next(100000, 1000000); } while (heartbeat.ContainsKey(browserID)); return string.Format( "{0}{1}", - System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(), + PlatformFunction.VersionString, browserID ); } else if (endpoint == "heartbeat") { diff --git a/assets/lib/boilerplate.cs b/assets/lib/boilerplate.cs index e9cac1c..13b3781 100644 --- a/assets/lib/boilerplate.cs +++ b/assets/lib/boilerplate.cs @@ -1,7 +1,6 @@ using System; using System.IO; using System.Collections.Generic; -using System.Linq; using System.Windows.Forms; using OpenBveApi.Runtime; diff --git a/www/index.html b/www/index.html index f61f137..dde99b2 100644 --- a/www/index.html +++ b/www/index.html @@ -25,6 +25,9 @@ if (language == null) language = "en"; var script = document.createElement('script'); script.src = "js/msg/" + language + ".js"; document.head.appendChild(script); script = document.createElement('script'); script.src = "js/msg_bats/" + language + ".js"; document.head.appendChild(script); + if (!isIE) { + script = document.createElement('script'); script.src = "js/workspace_search.js"; document.head.appendChild(script); + }