diff --git a/src/IFoxCAD.Cad/Runtime/Env.cs b/src/IFoxCAD.Cad/Runtime/Env.cs
index 8e8cecf030c749f8cea8b23812483dabd9f7573c..e6cf84ec1df12ad1e39b3c7e6bda4f442cdf86fa 100644
--- a/src/IFoxCAD.Cad/Runtime/Env.cs
+++ b/src/IFoxCAD.Cad/Runtime/Env.cs
@@ -1,4 +1,4 @@
-using Autodesk.AutoCAD.ApplicationServices;
+using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.GraphicsSystem;
@@ -108,7 +108,7 @@ public static IConfigurationSection GetGlobalSection(string propertyName)
#region Enum
///
- /// 命令行回显系统变量, 为显示, 为不显示
+ /// 控制在AutoLISP的command函数运行时AutoCAD是否回显提示和输入, 为显示, 为不显示
///
public static bool CmdEcho
{
@@ -376,19 +376,16 @@ public static OSModeType OSMode
Application.SetSystemVariable("osmode", (int)value);
}
}
-
-
///
- /// 检查系统变量的模式是否相同
+ /// 捕捉模式osm1是否包含osm2
///
/// 原模式
/// 要比较的模式
- /// 等于要比较的模式返回 ,反之返回
- public static bool Check(this OSModeType osm1, OSModeType osm2)
+ /// 包含时返回 ,不包含时返回
+ public static bool Include(this OSModeType osm1, OSModeType osm2)
{
return (osm1 & osm2) == osm2;
}
-
#endregion OsMode
private static T ToEnum(this string value)
@@ -430,6 +427,7 @@ public static void SetVar(string varName, object value)
/// 指定的环境变量的值;或者如果找不到环境变量,则返回 null
public static string? GetEnv(string var)
{
+ //从当前进程或者从当前用户或本地计算机的 Windows 操作系统注册表项检索环境变量的值
return Environment.GetEnvironmentVariable(var);
}
///
@@ -439,6 +437,7 @@ public static void SetVar(string varName, object value)
/// 变量值
public static void SetEnv(string var, string? value)
{
+ //创建、修改或删除当前进程中或者为当前用户或本地计算机保留的 Windows 操作系统注册表项中存储的环境变量
Environment.SetEnvironmentVariable(var, value);
}
#nullable disable
diff --git a/tests/DBTrans.test/testenv.cs b/tests/DBTrans.test/testenv.cs
index 96c5df4c061bc181ec4dd5cddc5b6da3f55e656e..e2513b5591d104e5b5f576dd59b4904b46f50248 100644
--- a/tests/DBTrans.test/testenv.cs
+++ b/tests/DBTrans.test/testenv.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@@ -52,7 +52,7 @@ public void testosmode()
// 追加模式
Env.OSMode |= Env.OSModeType.Center;
//检查是否有某个模式
- var os = Env.OSMode.Check(Env.OSModeType.Center);
+ var os = Env.OSMode.Include(Env.OSModeType.Center);
// 取消某个模式
Env.OSMode ^= Env.OSModeType.Center;
Env.Editor.WriteMessage(Env.OSMode.ToString());