chr
2024-08-12 e9d7a5ef4c17e4804fb988dd193ff7d1fa36d52b
PdmSwPlugin.Common/Setting/PluginSetting.cs
@@ -1,6 +1,7 @@
using PdmSwPlugin.Common.Util;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
@@ -35,12 +36,16 @@
        public string CheckInListenName { get; private set; } = "";
        public int ScanInterval { get; private set; } = 500;
        public string HistoryDate { get; private set; } = "";
        [XmlIgnore]
        public List<string> prefixes { get; private set; } = new List<string>();
        [XmlIgnore]
        public List<string> xcSuffixes { get; private set; } = new List<string>();
        [XmlIgnore]
        public List<string> mnSuffixes { get; private set; } = new List<string>();
        [XmlIgnore]
        public long HistoryDateFlag { get; private set; }
        [XmlIgnore]
        public string this[string field]
@@ -82,6 +87,22 @@
                string value = prop.GetValue(this).ToString();
                DataMap.Add(prop.Name, value);
            }
            if (!string.IsNullOrEmpty(HistoryDate))
            {
                try
                {
                    HistoryDateFlag = long.Parse(HistoryDate);
                }
                catch (Exception e)
                {
                    HistoryDateFlag = -1;
                }
            }
            else
            {
                HistoryDateFlag = -1;
            }
        }
        static PluginSetting()