From 0d10528b430721512e0e93e0d455fcec44207ec9 Mon Sep 17 00:00:00 2001 From: xcd <834800634@qq.com> Date: 星期二, 14 七月 2020 18:27:10 +0800 Subject: [PATCH] 1. 板卡驱动实现运动暂停/继续功能,板卡动作衔接实现暂停/继续 2. 修复部分调试bug 3. 安全光幕/安全门功能调整 --- src/Bro.Common.Model/Helper/StaticHelper.cs | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/src/Bro.Common.Model/Helper/StaticHelper.cs b/src/Bro.Common.Model/Helper/StaticHelper.cs index 47bb257..0c5de62 100644 --- a/src/Bro.Common.Model/Helper/StaticHelper.cs +++ b/src/Bro.Common.Model/Helper/StaticHelper.cs @@ -250,5 +250,23 @@ collection.Move(collection.IndexOf(sortedList[i]), i); } } + + // 甯冨皵绫诲瀷杞崲涓烘暣鍨� + public static int ToInt(this object obj) + { + if (Convert.ToBoolean(obj) == true) + return 1; + else + return 0; + } + + // 鏁村瀷杞崲涓哄竷灏旂被鍨� + public static bool ToBool(this object obj) + { + if (Convert.ToInt32(obj) == 1) + return true; + else + return false; + } } } -- Gitblit v1.8.0