1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using Bro.Common.Helper;
using Bro.Common.Interface;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing.Design;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace Bro.Common.Base
{
    public class DeviceConfigBase : IDeviceConfig
    {
    }
 
    public class InitialConfigBase : IInitialConfig
    {
        [Category("通用配置")]
        [Description("设备索引")]
        [ReadOnly(true)]
        public string ID { get; set; } = Guid.NewGuid().ToString().ToUpper();
 
        [Category("通用配置")]
        [Description("设备名称")]
        public string Name { get; set; } = "UnNamed";
 
        /// <summary>
        /// 设备是否启用
        /// </summary>
        [Category("通用配置")]
        [Description("设备是否启用")]
        public bool IsEnabled { get; set; } = false;
 
        [Browsable(false)]
        public virtual string DriverType { get; set; } = "";
 
        [Category("日志配置")]
        [Description("日志记录目录")]
        [Editor(typeof(FoldDialogEditor), typeof(UITypeEditor))]
        public string LogPath { get; set; }
 
        [Category("日志配置")]
        [Description("true:启用日志记录  false:不启用日志记录")]
        public bool IsEnableLog { get; set; } = false;
    }
}