From edc37f77fa57f8923ba28c5c84c29985ea555de8 Mon Sep 17 00:00:00 2001
From: wells.liu <wells.liu@broconcentric.com>
Date: 星期六, 11 七月 2020 17:05:01 +0800
Subject: [PATCH] 界面修改

---
 src/Bro.Common.Model/Model/MonitorSet.cs |   80 ++++++++++++++++++++++++++++++++-------
 1 files changed, 65 insertions(+), 15 deletions(-)

diff --git a/src/Bro.Common.Model/Model/MonitorSet.cs b/src/Bro.Common.Model/Model/MonitorSet.cs
index 74d5a8f..985da90 100644
--- a/src/Bro.Common.Model/Model/MonitorSet.cs
+++ b/src/Bro.Common.Model/Model/MonitorSet.cs
@@ -11,10 +11,11 @@
 using System.Linq;
 using System.Windows.Forms;
 using System.Windows.Forms.Design;
+using static Bro.Common.Helper.EnumHelper;
 
 namespace Bro.Common.Model
 {
-    public class SimpleMonitorSet : IMonitorSet, IComplexDisplay
+    public class MonitorSetBase : IMonitorSet, IComplexDisplay
     {
         [Browsable(false)]
         public string Id { get; set; } = Guid.NewGuid().ToString();
@@ -63,6 +64,10 @@
         public string Name { get; set; } = "";
 
         [Browsable(false)]
+        [JsonIgnore]
+        public ProcessResponse Response { get; set; } = new ProcessResponse();
+
+        [Browsable(false)]
         public string DisplayText
         {
             get
@@ -71,7 +76,7 @@
             }
         }
 
-        public SimpleMonitorSet() { }
+        public MonitorSetBase() { }
 
         public virtual string GetDisplayText()
         {
@@ -117,13 +122,13 @@
     /// <summary>
     /// PLC鐩戝惉璁剧疆
     /// </summary>
-    public class MonitorSet : SimpleMonitorSet
+    public class PLCMonitorSet : MonitorSetBase
     {
         /// <summary>
-        /// 鐩戝惉鍦板潃绱㈠紩 鎸夌収PLC鐩戝惉鍦板潃浠�0寮�濮嬬殑绱㈠紩
+        /// 鐩戝惉鍦板潃绱㈠紩 鎸夌収鐩戝惉鍦板潃浠�0寮�濮嬬殑绱㈠紩
         /// </summary>
         [Category("鐩戝惉璁剧疆")]
-        [Description("鐩戝惉鍦板潃绱㈠紩 鎸夌収PLC鐩戝惉鍦板潃浠�0寮�濮嬬殑绱㈠紩")]
+        [Description("鐩戝惉鍦板潃绱㈠紩 鎸夌収鐩戝惉鍦板潃浠�0寮�濮嬬殑绱㈠紩")]
         [DisplayName("瑙﹀彂绱㈠紩")]
         public int TriggerIndex { get; set; } = -1;
 
@@ -136,16 +141,16 @@
         public int TriggerValue { get; set; } = -1;
 
         /// <summary>
-        /// 浼犲叆鏁版嵁鍦板潃鐨勭储寮� 鎸夌収PLC鐩戝惉鍦板潃浠�0寮�濮嬬殑绱㈠紩闆嗗悎
+        /// 浼犲叆鏁版嵁鍦板潃鐨勭储寮� 鎸夌収鐩戝惉鍦板潃浠�0寮�濮嬬殑绱㈠紩闆嗗悎
         /// </summary>
         [Category("鐩戝惉璁剧疆")]
-        [Description("浼犲叆鏁版嵁鍦板潃鐨勭储寮� 鎸夌収PLC鐩戝惉鍦板潃浠�0寮�濮嬬殑绱㈠紩")]
+        [Description("浼犲叆鏁版嵁鍦板潃鐨勭储寮� 鎸夌収鐩戝惉鍦板潃浠�0寮�濮嬬殑绱㈠紩")]
         [DisplayName("浼犲叆鏁版嵁绱㈠紩")]
         [TypeConverter(typeof(SimpleCollectionConvert<int>))]
         public List<int> InputDataIndex { get; set; } = new List<int>();
 
         /// <summary>
-        /// 鏁版嵁鍦板潃 瀹為檯PLC瀵勫瓨鍣ㄧ殑鍦板潃锛屼緥濡� 40012
+        /// 鏁版嵁鍦板潃 瀹為檯瀵勫瓨鍣ㄧ殑鍦板潃锛屼緥濡� 40012
         /// </summary>
         [Category("鍥炰紶璁剧疆")]
         [Description("鍥炰紶鏁版嵁鍦板潃 瀹為檯PLC瀵勫瓨鍣ㄧ殑鍦板潃,10杩涘埗锛屼緥濡� 40012")]
@@ -153,18 +158,14 @@
         public int ReplyDataAddress { get; set; } = -1;
 
         /// <summary>
-        /// 閫氱煡鍦板潃 瀹為檯PLC瀵勫瓨鍣ㄧ殑鍦板潃锛屼緥濡� 40012
+        /// 閫氱煡鍦板潃 瀹為檯瀵勫瓨鍣ㄧ殑鍦板潃锛屼緥濡� 40012
         /// </summary>
         [Category("鍥炰紶璁剧疆")]
-        [Description("閫氱煡鍦板潃 瀹為檯PLC瀵勫瓨鍣ㄧ殑鍦板潃,10杩涘埗锛屼緥濡� 40012")]
+        [Description("閫氱煡鍦板潃 瀹為檯瀵勫瓨鍣ㄧ殑鍦板潃,10杩涘埗锛屼緥濡� 40012")]
         [DisplayName("閫氱煡鍦板潃")]
         public int NoticeAddress { get; set; } = -1;
 
-        [Browsable(false)]
-        [JsonIgnore]
-        public ProcessResponse Response { get; set; } = new ProcessResponse();
-
-        public MonitorSet() { }
+        public PLCMonitorSet() { }
 
         public override string GetDisplayText()
         {
@@ -176,6 +177,55 @@
         }
     }
 
+    /// <summary>
+    /// 杩愬姩鏉垮崱IO鐩戝惉閰嶇疆瀵硅薄
+    /// </summary>
+    public class MotionCardMonitorSet : MonitorSetBase
+    {
+        /// <summary>
+        /// 鐩戝惉绫诲瀷
+        /// </summary>
+        [Category("鐩戝惉璁剧疆")]
+        [DisplayName("鐩戝惉绫诲瀷")]
+        [Description("鐩戝惉杩愬姩鏉垮崱 IO 绫诲瀷锛圛N OUT锛�")]
+        public IOType MonitorIOModel { get; set; }
+
+        /// <summary>
+        /// 鐩戝惉鍦板潃绱㈠紩
+        /// </summary>
+        [Category("鐩戝惉璁剧疆")]
+        [Description("鐩戝惉鍦板潃绱㈠紩")]
+        [DisplayName("瑙﹀彂绱㈠紩")]
+        public int TriggerIndex { get; set; } = -1;
+
+        /// <summary>
+        /// 瑙﹀彂鍊�
+        /// </summary>
+        [Category("鐩戝惉璁剧疆")]
+        [Description("瑙﹀彂鍊硷紝璁剧疆涓�-999鏃跺彉鍖栧嵆瑙﹀彂")]
+        [DisplayName("瑙﹀彂鍊�")]
+        public int TriggerValue { get; set; } = -1;
+
+        /// <summary>
+        /// 浼犲叆鏁版嵁鍦板潃鐨勭储寮� 鎸夌収鐩戝惉鍦板潃浠�0寮�濮嬬殑绱㈠紩闆嗗悎
+        /// </summary>
+        [Category("鐩戝惉璁剧疆")]
+        [Description("浼犲叆鏁版嵁鍦板潃鐨勭储寮� 鎸夌収鐩戝惉鍦板潃浠�0寮�濮嬬殑绱㈠紩")]
+        [DisplayName("浼犲叆鏁版嵁绱㈠紩")]
+        [TypeConverter(typeof(SimpleCollectionConvert<int>))]
+        public List<int> InputDataIndex { get; set; } = new List<int>();
+
+        /// <summary>
+        /// 鐩戝惉鍥炰紶
+        /// </summary>
+        //[Category("鍥炰紶璁剧疆")]
+        //[DisplayName("鐩戝惉鍥炰紶")]
+        //[Description("鐩戝惉杩愬姩鏉垮崱锛屽苟寰�鎸囧畾鐨処O鍐欏叆鏁版嵁")]
+        //[TypeConverter(typeof(CollectionCountConvert))]
+        //[Editor(typeof(ComplexCollectionEditor<IOItem>), typeof(UITypeEditor))]
+        //public List<IOItem> ReplyIODatas { get; set; } = new List<IOItem>();
+    }
+
     public class IOperationConfigEditor : UITypeEditor
     {
         public override UITypeEditorEditStyle GetEditStyle(System.ComponentModel.ITypeDescriptorContext context)

--
Gitblit v1.8.0