From e9d7a5ef4c17e4804fb988dd193ff7d1fa36d52b Mon Sep 17 00:00:00 2001 From: chr <chr@chr.com> Date: 星期一, 12 八月 2024 09:08:43 +0800 Subject: [PATCH] 优化; --- PdmSwPlugin.Common/Setting/PluginSetting.cs | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/PdmSwPlugin.Common/Setting/PluginSetting.cs b/PdmSwPlugin.Common/Setting/PluginSetting.cs index fdb74f5..55f1740 100644 --- a/PdmSwPlugin.Common/Setting/PluginSetting.cs +++ b/PdmSwPlugin.Common/Setting/PluginSetting.cs @@ -1,6 +1,7 @@ 锘縰sing 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() -- Gitblit v1.9.1