领胜LDS 键盘AOI检测项目
wells.liu
2020-07-01 428f24065159010fa1dfa3c7165c21d2f88391d7
命名优化
4个文件已修改
32 ■■■■ 已修改文件
src/Bro.Common.Device/DeviceBase/PLCBase.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/Bro.Common.Model/Model/MonitorSet.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/Bro.Common.Model/Model/WarningSet.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/Bro.Process/ProcessConfig.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/Bro.Common.Device/DeviceBase/PLCBase.cs
@@ -122,7 +122,7 @@
            //PLCIConfig.MonitorSetCollection.ForEach(set =>
            Parallel.ForEach(PLCIConfig.MonitorSetCollection, set =>
             {
                 MonitorSet monitorSet = set as MonitorSet;
                 PLCMonitorSet monitorSet = set as PLCMonitorSet;
                 if (monitorSet.TriggerIndex < 0 || monitorSet.TriggerIndex >= tempNew.Count)
                 {
                     return;
@@ -153,7 +153,7 @@
        private void OnMethodInvoked(IAsyncResult ar)
        {
            MonitorSet monitorSet = ar.AsyncState as MonitorSet;
            PLCMonitorSet monitorSet = ar.AsyncState as PLCMonitorSet;
            ProcessResponse resValues = monitorSet.Response;
@@ -211,7 +211,7 @@
        }
        object _alarmLock = new object();
        private async void SaveAlarmCSVAsync(DateTime now, string plcName, WarningSet ws)
        private async void SaveAlarmCSVAsync(DateTime now, string plcName, PLCWarningSet ws)
        {
            await Task.Run(() =>
            {
@@ -309,14 +309,14 @@
        [DisplayName("警报配置")]
        [TypeConverter(typeof(CollectionCountConvert))]
        [Editor(typeof(WarningSetsEditor), typeof(UITypeEditor))]
        public List<WarningSet> WarningSetCollection { get; set; } = new List<WarningSet>();
        public List<PLCWarningSet> WarningSetCollection { get; set; } = new List<PLCWarningSet>();
        #region IMonitorConfig
        [Category("监听设置")]
        [Description("监听操作配置集合")]
        [DisplayName("监听配置")]
        [TypeConverter(typeof(CollectionCountConvert))]
        [Editor(typeof(ComplexCollectionEditor<MonitorSet>), typeof(UITypeEditor))]
        [Editor(typeof(ComplexCollectionEditor<PLCMonitorSet>), typeof(UITypeEditor))]
        public List<IMonitorSet> MonitorSetCollection { get; set; } = new List<IMonitorSet>();
        [Category("监听设置")]
@@ -481,9 +481,9 @@
            }
        }
        private List<WarningSet> GetWarningSets()
        private List<PLCWarningSet> GetWarningSets()
        {
            List<WarningSet> wsList = new List<WarningSet>();
            List<PLCWarningSet> wsList = new List<PLCWarningSet>();
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Multiselect = false;
@@ -500,7 +500,7 @@
                        if (!string.IsNullOrWhiteSpace(list[1]))
                        {
                            WarningSet ws = new WarningSet();
                            PLCWarningSet ws = new PLCWarningSet();
                            ws.WarningCode = list[0];
                            ws.WarningDescription = list[1];
@@ -536,7 +536,7 @@
        /// <returns></returns> 
        protected override Type CreateCollectionItemType()
        {
            return typeof(WarningSet);
            return typeof(PLCWarningSet);
        }
        protected override string GetDisplayText(object value)
src/Bro.Common.Model/Model/MonitorSet.cs
@@ -15,7 +15,7 @@
namespace Bro.Common.Model
{
    public class SimpleMonitorSet : IMonitorSet, IComplexDisplay
    public class MonitorSetBase : IMonitorSet, IComplexDisplay
    {
        [Browsable(false)]
        public string Id { get; set; } = Guid.NewGuid().ToString();
@@ -76,7 +76,7 @@
            }
        }
        public SimpleMonitorSet() { }
        public MonitorSetBase() { }
        public virtual string GetDisplayText()
        {
@@ -122,7 +122,7 @@
    /// <summary>
    /// PLC监听设置
    /// </summary>
    public class MonitorSet : SimpleMonitorSet
    public class PLCMonitorSet : MonitorSetBase
    {
        /// <summary>
        /// 监听地址索引 按照监听地址从0开始的索引
@@ -165,7 +165,7 @@
        [DisplayName("通知地址")]
        public int NoticeAddress { get; set; } = -1;
        public MonitorSet() { }
        public PLCMonitorSet() { }
        public override string GetDisplayText()
        {
@@ -180,7 +180,7 @@
    /// <summary>
    /// 运动板卡监听配置对象
    /// </summary>
    public class MotionCardMonitorSet : SimpleMonitorSet
    public class MotionCardMonitorSet : MonitorSetBase
    {
        /// <summary>
        /// 监听类型
src/Bro.Common.Model/Model/WarningSet.cs
@@ -10,7 +10,7 @@
    /// <summary>
    /// PLC警报配置
    /// </summary>
    public class WarningSet : IComplexDisplay, IWarningSet
    public class PLCWarningSet : IComplexDisplay, IWarningSet
    {
        [Category("索引设置")]
        [Description("PLC警报索引——字索引")]
src/Bro.Process/ProcessConfig.cs
@@ -66,7 +66,7 @@
        [Description("默认操作配置集合")]
        [DisplayName("默认操作配置")]
        [TypeConverter(typeof(CollectionCountConvert))]
        [Editor(typeof(ComplexCollectionEditor<SimpleMonitorSet>), typeof(UITypeEditor))]
        [Editor(typeof(ComplexCollectionEditor<MonitorSetBase>), typeof(UITypeEditor))]
        public List<IMonitorSet> MonitorSetCollection { get; set; } = new List<IMonitorSet>();
        public virtual List<IInitialConfig> GetAllDeviceInitialConfigs()