From c275a1d926bd15ea41fac36b8d31b66d6d71ca31 Mon Sep 17 00:00:00 2001 From: Allen <898586122@qq.com> Date: Mon, 2 Dec 2024 17:50:05 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=9C=A8.NET6.0=E4=B9=8B=E5=90=8E=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=BA=86CallerArgumentExpression=E7=89=B9=E6=80=A7?= =?UTF-8?q?=EF=BC=8C=E5=9B=A0=E6=AD=A4=E5=9C=A8NET6.0=E4=BB=A5=E5=90=8E?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E4=BD=BF=E7=94=A8=EF=BC=8C=E5=8F=AF=E4=B8=8D?= =?UTF-8?q?=E7=94=A8=E4=BD=BF=E7=94=A8=E6=AD=A4=E5=91=BD=E5=90=8D=E7=A9=BA?= =?UTF-8?q?=E9=97=B4=EF=BC=8C=E8=8B=A5=E5=9C=A8=E5=A4=9A=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E4=B8=AD=EF=BC=8C=E5=A6=82=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E7=BC=96=E8=AF=91.NET4.8=E5=92=8C.NET8.0=E4=B8=A4=E4=B8=AA?= =?UTF-8?q?=E7=89=88=E6=9C=AC=EF=BC=8C=E4=BD=BF=E7=94=A8System.Runtime.Com?= =?UTF-8?q?pilerServices=E8=BF=99=E4=B8=AA=E5=91=BD=E5=90=8D=E7=A9=BA?= =?UTF-8?q?=E9=97=B4=E6=97=B6=EF=BC=8C.NET8.0=E4=BC=9A=E6=8A=A5=E8=AD=A6?= =?UTF-8?q?=E5=91=8A=EF=BC=8C=E5=A6=82=E4=B8=8B=EF=BC=9A=E2=80=9CF:\******?= =?UTF-8?q?**\IFoxCAD\src\CADShared\BasalNullable\CallerArgumentExpression?= =?UTF-8?q?Attribute.cs"=E4=B8=AD=E7=9A=84=E7=B1=BB=20=E5=9E=8BCallerArgum?= =?UTF-8?q?entExpressionAttribute"=E4=B8=8E"System.Runtime,=20Version=3D8.?= =?UTF-8?q?0.0.0,=20Culture=3Dneutral,PublicKeyToken=3Db03f5f7f11d50a3a"?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E5=AF=BC=E5=85=A5=E7=B1=BB=E5=9E=8BCallerArg?= =?UTF-8?q?umentExpressionAttribute")=E5=86=B2=E7=AA=81=E3=80=82=E8=AF=B7?= =?UTF-8?q?=E4=BD=BF=E7=94=A8"F:\********\IFoxCAD\src\CADSharedBasal\Nulla?= =?UTF-8?q?ble\CallerArgumentExpressionAttribute.cs"=E4=B8=AD=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E7=9A=84=E7=B1=BB=E5=9E=8B=E3=80=82=E7=94=A8=E6=AD=A4?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E7=BC=96=E8=AF=91=E5=8F=AF=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E6=AD=A4=E6=83=85=E5=86=B5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Nullable/CallerArgumentExpressionAttribute.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/CADShared/Basal/Nullable/CallerArgumentExpressionAttribute.cs b/src/CADShared/Basal/Nullable/CallerArgumentExpressionAttribute.cs index e6f5660..b8fa9f8 100644 --- a/src/CADShared/Basal/Nullable/CallerArgumentExpressionAttribute.cs +++ b/src/CADShared/Basal/Nullable/CallerArgumentExpressionAttribute.cs @@ -1,6 +1,8 @@  #if a2024 || zcad +#if NET48 namespace System.Runtime.CompilerServices; +#endif /// /// 指示参数将为另一个参数传递的表达式捕获为字符串。 /// @@ -11,10 +13,7 @@ internal sealed class CallerArgumentExpressionAttribute : Attribute /// 初始化 CallerArgumentExpressionAttribute 类的新实例。 /// /// 参数名 - public CallerArgumentExpressionAttribute(string parameterName) - { - ParameterName = parameterName; - } + public CallerArgumentExpressionAttribute(string parameterName) => ParameterName = parameterName; /// /// 获取其表达式应捕获为字符串的参数的名称。 @@ -22,4 +21,7 @@ public CallerArgumentExpressionAttribute(string parameterName) // ReSharper disable once UnusedAutoPropertyAccessor.Global public string ParameterName { get; } } -#endif \ No newline at end of file +#endif + + + -- Gitee From e54d0dac1212c3170b556a5819f8b793cdd0e242 Mon Sep 17 00:00:00 2001 From: Allen <898586122@qq.com> Date: Wed, 4 Dec 2024 00:46:57 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8E=9F=E6=9D=A5JigEx?= =?UTF-8?q?=E7=B1=BB=E4=B8=AD=E7=9A=84Drag=E6=96=B9=E6=B3=95=EF=BC=8C?= =?UTF-8?q?=E4=BD=BF=E7=94=A8Env=E7=B1=BB=E9=87=8C=E9=9D=A2=E7=9A=84?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=AD=97=E6=AE=B5=E5=AE=8C=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=9B=E5=BB=BA=E8=AE=AE=E5=90=8E=E7=BB=AD=E6=8A=8A?= =?UTF-8?q?=E6=B6=89=E5=8F=8ADocument=E3=80=81Editor=E7=AD=89=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E7=9A=84=E7=9B=B8=E5=85=B3=E6=96=B9=E6=B3=95=E5=86=99?= =?UTF-8?q?=E5=9C=A8Env=E7=B1=BB=E9=87=8C=E9=9D=A2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/CADShared/ExtensionMethod/Jig/JigEx.cs | 10 ++-------- src/CADShared/Runtime/Env.cs | 10 ++++++++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/CADShared/ExtensionMethod/Jig/JigEx.cs b/src/CADShared/ExtensionMethod/Jig/JigEx.cs index c985110..60afabd 100644 --- a/src/CADShared/ExtensionMethod/Jig/JigEx.cs +++ b/src/CADShared/ExtensionMethod/Jig/JigEx.cs @@ -259,15 +259,9 @@ public void SetOptions(Action action) /// 执行 /// /// 交互结果 - [Obsolete("将在下个版本中删除,请使用Editor.Drag(JigEx)")] - public PromptResult Drag() + public PromptResult Drag()// { - // jig功能必然是当前前台文档,所以封装内部更好调用 - var dm = Acaop.DocumentManager; - var doc = dm.MdiActiveDocument; - var ed = doc.Editor; - var dr = ed.Drag(this); - return dr; + return Env.Jig(this); } diff --git a/src/CADShared/Runtime/Env.cs b/src/CADShared/Runtime/Env.cs index 3f88e36..2f6156d 100644 --- a/src/CADShared/Runtime/Env.cs +++ b/src/CADShared/Runtime/Env.cs @@ -704,6 +704,16 @@ public static bool IsUcs() } + /// + /// 执行Jig + /// + /// + /// + public static PromptResult Jig(JigEx jig) + { + return Editor.Drag(jig); + } + #region dwg版本号/cad版本号/年份 /// -- Gitee From bf3495432facf5d372c3118b5b2c338200e66115 Mon Sep 17 00:00:00 2001 From: Allen <898586122@qq.com> Date: Wed, 11 Dec 2024 17:46:07 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E9=87=8D=E6=96=B0=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E7=BC=96=E8=AF=91=E7=9A=84=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=8C=E5=8F=AF=E4=BB=A5=E5=81=9A=E5=88=B0.NET8.0=E4=BB=A5?= =?UTF-8?q?=E4=B8=8B=E7=9A=84=E9=80=9A=E7=94=A8=E4=BA=86=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E7=94=A8=E6=AF=8F=E6=AC=A1=E9=83=BD=E5=9B=A0=E4=B8=BA=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E4=B8=8D=E5=90=8C=E8=80=8C=E4=BF=AE=E6=94=B9=E4=BA=86?= =?UTF-8?q?=E3=80=82=E6=B6=88=E9=99=A4NET8.0=E4=B8=8B=E7=9A=84=E8=AD=A6?= =?UTF-8?q?=E5=91=8A=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Basal/Nullable/CallerArgumentExpressionAttribute.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/CADShared/Basal/Nullable/CallerArgumentExpressionAttribute.cs b/src/CADShared/Basal/Nullable/CallerArgumentExpressionAttribute.cs index b8fa9f8..109d5ca 100644 --- a/src/CADShared/Basal/Nullable/CallerArgumentExpressionAttribute.cs +++ b/src/CADShared/Basal/Nullable/CallerArgumentExpressionAttribute.cs @@ -1,6 +1,5 @@  -#if a2024 || zcad -#if NET48 +#if !NET8_0_OR_GREATER namespace System.Runtime.CompilerServices; #endif /// @@ -21,7 +20,7 @@ internal sealed class CallerArgumentExpressionAttribute : Attribute // ReSharper disable once UnusedAutoPropertyAccessor.Global public string ParameterName { get; } } -#endif + -- Gitee