From ff70fb8a21d73c388e75bf0781ce54707f04ccff Mon Sep 17 00:00:00 2001 From: DYH <1742647821@qq.com> Date: Tue, 28 Mar 2023 00:02:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88JigEx=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=9A=84=E2=80=9C=E7=A9=BA=E6=A0=BC=E9=80=80?= =?UTF-8?q?=E5=87=BA=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExpressionTrees/SqlExpressionVisitor.cs | 2 ++ .../IFox.CAD.Shared/ExtensionMethod/JigEx.cs | 19 +++++-------------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/Basal/IFox.Basal.Shared/ExpressionTrees/SqlExpressionVisitor.cs b/src/Basal/IFox.Basal.Shared/ExpressionTrees/SqlExpressionVisitor.cs index bfd6283..17ce385 100644 --- a/src/Basal/IFox.Basal.Shared/ExpressionTrees/SqlExpressionVisitor.cs +++ b/src/Basal/IFox.Basal.Shared/ExpressionTrees/SqlExpressionVisitor.cs @@ -1,4 +1,6 @@ #if NET45 +using Microsoft.CSharp.RuntimeBinder; + namespace IFoxCAD.Basal; /// diff --git a/src/CAD/IFox.CAD.Shared/ExtensionMethod/JigEx.cs b/src/CAD/IFox.CAD.Shared/ExtensionMethod/JigEx.cs index 15024ab..c6f1296 100644 --- a/src/CAD/IFox.CAD.Shared/ExtensionMethod/JigEx.cs +++ b/src/CAD/IFox.CAD.Shared/ExtensionMethod/JigEx.cs @@ -216,25 +216,16 @@ public JigPromptPointOptions SetOptions(string msg, _options = JigPointOptions(); _options.Message = Environment.NewLine + msg; - - // 加入关键字,加入时候将空格内容放到最后 - string spaceValue = string.Empty; - const string spaceKey = " "; + if (keywords != null) foreach (var item in keywords) - if (item.Key == spaceKey) - spaceValue = item.Value; - else _options.Keywords.Add(item.Key, item.Key, item.Value); - /// 因为默认配置函数导致此处空格触发是无效的, - /// 但是用户如果想触发,就需要在外部减去默认UserInputControls配置 - /// 要放最后,才能优先触发其他关键字 - if (spaceValue != string.Empty) - _options.Keywords.Add(spaceKey, spaceKey, spaceValue); - else - _options.Keywords.Add(spaceKey, spaceKey, "<空格退出>"); + // 因为默认配置函数导致此处空格触发是无效的, + // 但是用户如果想触发,就需要在外部减去默认UserInputControls配置 + // 要放最后,才能优先触发其他关键字 + // 外部设置减去配置 // _options.UserInputControls = -- Gitee