Bläddra i källkod

Merge branch 'master' of http://imaodou.com.cn:30030/c_jack/EICP3.0_69

mengshunguo 2 månader sedan
förälder
incheckning
6368bb6948
39 ändrade filer med 1388 tillägg och 456 borttagningar
  1. BIN
      Lib/LiteDB.dll
  2. BIN
      Lib/Microsoft.AspNetCore.Http.Abstractions.dll
  3. BIN
      Lib/Microsoft.AspNetCore.Http.Features.dll
  4. BIN
      Lib/Microsoft.AspNetCore.Http.dll
  5. BIN
      Lib/Microsoft.AspNetCore.Owin.dll
  6. BIN
      Lib/Microsoft.AspNetCore.WebUtilities.dll
  7. BIN
      Lib/Microsoft.Extensions.ObjectPool.dll
  8. BIN
      Lib/Microsoft.Extensions.Options.dll
  9. BIN
      Lib/Microsoft.Extensions.Primitives.dll
  10. BIN
      Lib/Microsoft.Net.Http.Headers.dll
  11. BIN
      Lib/SCADA.CNC.FANUC.dll
  12. BIN
      Lib/SCADA.CommonCtrl.dll
  13. 403 71
      Lib/SCADA.CommonCtrl.xml
  14. BIN
      Lib/SCADA.CommonLib.dll
  15. 593 110
      Lib/SCADA.CommonLib.xml
  16. BIN
      Lib/SCADA.NetCamera.dll
  17. BIN
      Lib/SCADA.dll
  18. 174 11
      Lib/SCADA.xml
  19. BIN
      Lib/SCADA_DAQ.Plugin.Core.dll
  20. BIN
      Lib/SCADA_DAQ.Plugin.CoreUI.dll
  21. BIN
      Lib/SCADA_DAQ.Plugin.Machine.dll
  22. BIN
      Lib/SCADA_DAQ.Plugin.MachineUI.dll
  23. BIN
      Lib/SCADA_DAQ.Plugin.RESTful.dll
  24. 0 9
      Lib/SCADA_DAQ.Plugin.RESTful.xml
  25. BIN
      Lib/System.CodeDom.dll
  26. BIN
      Lib/System.Data.OleDb.dll
  27. BIN
      Lib/System.Data.SqlClient.dll
  28. BIN
      Lib/Xceed.Wpf.Toolkit.dll
  29. 39 52
      SCADA_DAQ/App.xaml.cs
  30. 1 1
      SCADA_DAQ/Customer/Controllers/EicpWebHooks.cs
  31. 2 1
      SCADA_DAQ/Customer/Service/LoginSevice.cs
  32. BIN
      SCADA_DAQ/Data/LocalApp.zip
  33. BIN
      SCADA_DAQ/Data/Platform.zip
  34. BIN
      SCADA_DAQ/Data/QwPlatform.zip
  35. 67 140
      SCADA_DAQ/Env.cs
  36. 2 2
      SCADA_DAQ/LocalResource.Designer.cs
  37. 2 2
      SCADA_DAQ/LocalResource.resx
  38. 64 21
      SCADA_DAQ/ServiceHost.cs
  39. 41 36
      SCADA_DAQ/SystemControl.cs

BIN
Lib/LiteDB.dll


BIN
Lib/Microsoft.AspNetCore.Http.Abstractions.dll


BIN
Lib/Microsoft.AspNetCore.Http.Features.dll


BIN
Lib/Microsoft.AspNetCore.Http.dll


BIN
Lib/Microsoft.AspNetCore.Owin.dll


BIN
Lib/Microsoft.AspNetCore.WebUtilities.dll


BIN
Lib/Microsoft.Extensions.ObjectPool.dll


BIN
Lib/Microsoft.Extensions.Options.dll


BIN
Lib/Microsoft.Extensions.Primitives.dll


BIN
Lib/Microsoft.Net.Http.Headers.dll


BIN
Lib/SCADA.CNC.FANUC.dll


BIN
Lib/SCADA.CommonCtrl.dll


+ 403 - 71
Lib/SCADA.CommonCtrl.xml

@@ -4,6 +4,197 @@
         <name>SCADA.CommonCtrl</name>
     </assembly>
     <members>
+        <member name="T:SCADA.CommonCtrl.AnimationHelper.AnimationTrack">
+            <summary>
+            轨迹动画
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.AnimationHelper.AnimationTrack.Target">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.AnimationHelper.AnimationTrack.TrackType">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.AnimationHelper.AnimationTrack.AnimationIndex">
+            <summary>
+            动画序号
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.AnimationHelper.AnimationTrack.AnimationName">
+            <summary>
+            动画名称
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.AnimationHelper.AnimationTrack.NextFragment">
+            <summary>
+            前个动画ID
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.AnimationHelper.AnimationTrack.PerFragment">
+            <summary>
+            后一个动画ID
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.AnimationHelper.AnimationTrack.StartPoint">
+            <summary> 移动动画的开始位置</summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.AnimationHelper.AnimationTrack.EndPoint">
+            <summary> 移动动画的停止位置</summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.AnimationHelper.AnimationTrack.From">
+            <summary> 旋转动画的起点</summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.AnimationHelper.AnimationTrack.To">
+            <summary> 旋转动画的终点</summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.AnimationHelper.AnimationTrack.IsSimulated">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.AnimationHelper.AnimationTrack.TriggerReg">
+            <summary>
+            
+            </summary>
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.AnimationHelper.AnimationTrack.StopReg">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.AnimationHelper.AnimationTrack.EnableTigger">
+            <summary>
+            动画已启用
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.AnimationHelper.AnimationTrack.IsRuning">
+            <summary>
+            动画进行中
+            </summary>
+        </member>
+        <member name="E:SCADA.CommonCtrl.AnimationHelper.AnimationTrack.Stoped">
+            <summary>
+            动画完成
+            </summary>
+        </member>
+        <member name="M:SCADA.CommonCtrl.AnimationHelper.AnimationTrack.#ctor(SCADA.CommonCtrl.AnimationHelper.TrackType,System.Int32)">
+            <summary>
+            
+            </summary>
+            <param name="trackType"></param>
+            <param name="timeSpan">时间ms</param>
+        </member>
+        <member name="M:SCADA.CommonCtrl.AnimationHelper.AnimationTrack.Start">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="M:SCADA.CommonCtrl.AnimationHelper.AnimationTrack.Stop">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="M:SCADA.CommonCtrl.AnimationHelper.AnimationTrack.Dispose">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="T:SCADA.CommonCtrl.AnimationHelper.TrackType">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonCtrl.AnimationHelper.TrackType.Move">
+            <summary>
+            移动
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonCtrl.AnimationHelper.TrackType.Rotate">
+            <summary>
+            旋转
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonCtrl.AnimationHelper.TrackType.Opacity">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="T:SCADA.CommonCtrl.AnimationHelper.AnimationTrackGroup">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.AnimationHelper.AnimationTrackGroup.Target">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.AnimationHelper.AnimationTrackGroup.CurrentFragmentIndex">
+            <summary> 当前片段编号</summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.AnimationHelper.AnimationTrackGroup.CurrentFragment">
+            <summary>
+            当前片段
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.AnimationHelper.AnimationTrackGroup.IsSimulated">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="M:SCADA.CommonCtrl.AnimationHelper.AnimationTrackGroup.AddChild(SCADA.CommonCtrl.AnimationHelper.AnimationTrack)">
+            <summary>
+            
+            </summary>
+            <param name="child"></param>
+        </member>
+        <member name="M:SCADA.CommonCtrl.AnimationHelper.AnimationTrackGroup.AddRange(System.Collections.Generic.IEnumerable{SCADA.CommonCtrl.AnimationHelper.AnimationTrack})">
+            <summary>
+            
+            </summary>
+            <param name="collection"></param>
+        </member>
+        <member name="M:SCADA.CommonCtrl.AnimationHelper.AnimationTrackGroup.GetChild(System.Int32)">
+            <summary>
+            
+            </summary>
+            <param name="index"></param>
+            <returns></returns>
+        </member>
+        <member name="M:SCADA.CommonCtrl.AnimationHelper.AnimationTrackGroup.Start">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="M:SCADA.CommonCtrl.AnimationHelper.AnimationTrackGroup.Start(System.Int32)">
+            <summary>
+            
+            </summary>
+            <param name="fragmentIndex"></param>
+        </member>
+        <member name="M:SCADA.CommonCtrl.AnimationHelper.AnimationTrackGroup.Start(System.String)">
+            <summary>
+            
+            </summary>
+            <param name="fragementName"></param>
+        </member>
+        <member name="M:SCADA.CommonCtrl.AnimationHelper.AnimationTrackGroup.Stop">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="M:SCADA.CommonCtrl.AnimationHelper.AnimationTrackGroup.Dispose">
+            <summary>
+            
+            </summary>
+        </member>
         <member name="T:SCADA.CommonCtrl.AnimationHelper.FlickerHelper">
             <summary>
             闪烁行为
@@ -667,11 +858,6 @@
             <param name="culture"></param>
             <returns></returns>
         </member>
-        <member name="P:SCADA.CommonCtrl.CtrlEnv.WindowSize">
-            <summary>
-            
-            </summary>
-        </member>
         <member name="T:SCADA.CommonCtrl.Dashboard.DashboardBalloon">
             <summary>
             看板气球
@@ -3581,7 +3767,7 @@
             
             </summary>
             <param name="display">显示名称</param>
-            <param name="type">数据类型</param>
+            <param name="type">属性数据类型</param>
             <param name="elementType">元素类型</param>
             <param name="binding">绑定</param>
             <param name="range">区间</param>
@@ -3875,11 +4061,26 @@
             MDI 父窗口的子窗体都要继承于此类
             </summary>
         </member>
+        <member name="P:SCADA.CommonCtrl.WpfControl.BaseUctFrm.IsFirstLoad">
+            <summary>
+            第一次加载
+            </summary>
+        </member>
+        <member name="E:SCADA.CommonCtrl.WpfControl.BaseUctFrm.FirstLoaded">
+            <summary>
+            第一次加载时引发事件
+            </summary>
+        </member>
         <member name="F:SCADA.CommonCtrl.WpfControl.BaseUctFrm.IconProperty">
             <summary>
             
             </summary>
         </member>
+        <member name="F:SCADA.CommonCtrl.WpfControl.BaseUctFrm.LayoutParameter">
+            <summary>
+            布局参数
+            </summary>
+        </member>
         <member name="P:SCADA.CommonCtrl.WpfControl.BaseUctFrm.UnCloseWhenLogoff">
             <summary>
             登出时不关闭
@@ -3991,6 +4192,11 @@
             
             </summary>
         </member>
+        <member name="M:SCADA.CommonCtrl.WpfControl.BaseUctFrm.OnFistLoad">
+            <summary>
+            
+            </summary>
+        </member>
         <member name="P:SCADA.CommonCtrl.WpfControl.BaseUctFrm.ResidenceTime">
             <summary>
             停留时间
@@ -4021,6 +4227,16 @@
             
             </summary>
         </member>
+        <member name="P:SCADA.CommonCtrl.WpfControl.BaseUctFrm.IsEditable">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonCtrl.WpfControl.BaseUctFrm.IsEditableProperty">
+            <summary>
+            
+            </summary>
+        </member>
         <member name="P:SCADA.CommonCtrl.WpfControl.BaseUctFrm.IsReadOnly">
             <summary>
             界面是否只读
@@ -4037,8 +4253,7 @@
             </summary>
         </member>
         <member name="F:SCADA.CommonCtrl.WpfControl.BaseUctFrm.IsAdminProperty">
-            <summary>
-            
+            <summary> 界面是否拥有管理员权限
             </summary>
         </member>
         <member name="P:SCADA.CommonCtrl.WpfControl.BaseUctFrm.AnimationConfig">
@@ -4105,13 +4320,11 @@
             </summary>
         </member>
         <member name="E:SCADA.CommonCtrl.WpfControl.BaseUctFrm`2.AddSucceed">
-            <summary>
-            添加成功,通过NewItem获取插入的对象<see cref="P:SCADA.CommonCtrl.WpfControl.BaseUctFrm`2.NewItem"/>
+            <summary> 添加成功,通过NewItem获取插入的对象<see cref="P:SCADA.CommonCtrl.WpfControl.BaseUctFrm`2.NewItem"/>
             </summary>
         </member>
         <member name="E:SCADA.CommonCtrl.WpfControl.BaseUctFrm`2.AddFailed">
-            <summary>
-            添加失败,通过NewItem获取插入的对象<see cref="P:SCADA.CommonCtrl.WpfControl.BaseUctFrm`2.NewItem"/>
+            <summary> 添加失败,通过NewItem获取插入的对象<see cref="P:SCADA.CommonCtrl.WpfControl.BaseUctFrm`2.NewItem"/>
             </summary>
         </member>
         <member name="P:SCADA.CommonCtrl.WpfControl.BaseUctFrm`2.OnAdd">
@@ -5082,6 +5295,16 @@
             CPKChart
             </summary>
         </member>
+        <member name="P:SCADA.CommonCtrl.WpfControl.Charts.CPKChart.CpkConfig">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.WpfControl.Charts.CPKChart.Source">
+            <summary>
+            
+            </summary>
+        </member>
         <member name="P:SCADA.CommonCtrl.WpfControl.Charts.CPKChart.Title">
             <summary>
             
@@ -5983,12 +6206,10 @@
         </member>
         <member name="P:SCADA.CommonCtrl.WpfControl.CommonQueryFrm`2.MainDataGrid">
             <summary>
-            
             </summary>
         </member>
         <member name="P:SCADA.CommonCtrl.WpfControl.CommonQueryFrm`2.ChildDataGrids">
-            <summary>
-            字表集合,key是属性名称
+            <summary>字表集合,key是属性名称
             </summary>
         </member>
         <member name="M:SCADA.CommonCtrl.WpfControl.CommonQueryFrm`2.#ctor">
@@ -6055,6 +6276,11 @@
             
             </summary>
         </member>
+        <member name="M:SCADA.CommonCtrl.WpfControl.CommonQueryFrm`2.CloseThis">
+            <summary>
+            
+            </summary>
+        </member>
         <member name="T:SCADA.CommonCtrl.WpfControl.DateSelecter">
             <summary>
             
@@ -7042,6 +7268,21 @@
             
             </summary>
         </member>
+        <member name="T:SCADA.CommonCtrl.WpfControl.MenuLayoutParameter">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.WpfControl.MenuLayoutParameter.ChildHeights">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.WpfControl.MenuLayoutParameter.AccordionState">
+            <summary>
+            
+            </summary>
+        </member>
         <member name="T:SCADA.CommonCtrl.WpfControl.MulSelectComboBox">
             <summary>
             
@@ -7749,6 +7990,11 @@
             
             </summary>
         </member>
+        <member name="M:SCADA.CommonCtrl.WpfControl.DataGridMultiLineTextBox.#ctor">
+            <summary>
+            
+            </summary>
+        </member>
         <member name="M:SCADA.CommonCtrl.WpfControl.DataGridMultiLineTextBox.GenerateEditingElement(System.Windows.Controls.DataGridCell,System.Object)">
             <summary>
             
@@ -8937,6 +9183,115 @@
             外部编辑
             </summary>
         </member>
+        <member name="T:SCADA.CommonCtrl.WpfControl.AdvStepBar">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.WpfControl.AdvStepBar.Progress">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonCtrl.WpfControl.AdvStepBar.ProgressProperty">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.WpfControl.AdvStepBar.Orientation">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonCtrl.WpfControl.AdvStepBar.OrientationProperty">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.WpfControl.AdvStepBar.ItemDisplayMemberPath">
+            <summary>
+            显示属性路径
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonCtrl.WpfControl.AdvStepBar.ItemDisplayMemberPathProperty">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.WpfControl.AdvStepBar.ItemContentDisplayMemberPath">
+            <summary>
+            控件内容显示
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonCtrl.WpfControl.AdvStepBar.ItemContentDisplayMemberPathProperty">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="M:SCADA.CommonCtrl.WpfControl.AdvStepBar.GetContainerForItemOverride">
+            <summary>
+            
+            </summary>
+            <returns></returns>
+        </member>
+        <member name="M:SCADA.CommonCtrl.WpfControl.AdvStepBar.PrepareContainerForItemOverride(System.Windows.DependencyObject,System.Object)">
+            <summary>
+            
+            </summary>
+            <param name="element"></param>
+            <param name="item"></param>
+        </member>
+        <member name="M:SCADA.CommonCtrl.WpfControl.AdvStepBar.OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs)">
+            <summary>
+            
+            </summary>
+            <param name="e"></param>
+        </member>
+        <member name="T:SCADA.CommonCtrl.WpfControl.AdvStepBarItem">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.WpfControl.AdvStepBarItem.Number">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonCtrl.WpfControl.AdvStepBarItem.NumberProperty">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.WpfControl.AdvStepBarItem.ControlStyle">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonCtrl.WpfControl.AdvStepBarItem.ControlStyleProperty">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.WpfControl.AdvStepBarItem.UnActiveBrushes">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonCtrl.WpfControl.AdvStepBarItem.UnActiveBrushesProperty">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.WpfControl.AdvStepBarItem.ActiveBrushes">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonCtrl.WpfControl.AdvStepBarItem.ActiveBrushesProperty">
+            <summary>
+            
+            </summary>
+        </member>
         <member name="T:SCADA.CommonCtrl.WpfControl.StepBar">
             <summary>
             
@@ -8993,7 +9348,30 @@
         </member>
         <member name="F:SCADA.CommonCtrl.WpfControl.StepBarItem.NumberProperty">
             <summary>
-            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.WpfControl.StepBarItem.ControlStyle">
+            <summary>
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonCtrl.WpfControl.StepBarItem.ControlStyleProperty">
+            <summary>
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.WpfControl.StepBarItem.UnActiveBrushes">
+            <summary>
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonCtrl.WpfControl.StepBarItem.UnActiveBrushesProperty">
+            <summary>
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonCtrl.WpfControl.StepBarItem.ActiveBrushes">
+            <summary>
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonCtrl.WpfControl.StepBarItem.ActiveBrushesProperty">
+            <summary> 
             </summary>
         </member>
         <member name="T:SCADA.CommonCtrl.WpfControl.ChildCloseModel">
@@ -9945,6 +10323,15 @@
             <param name="controlStyle"></param>
             <returns></returns>
         </member>
+        <member name="M:SCADA.CommonCtrl.WpfHelper.NormalIcon.CreateIcon(System.String,System.String,SCADA.CommonLib.ControlStyle)">
+            <summary>
+            
+            </summary>
+            <param name="propertyName"></param>
+            <param name="iconType"></param>
+            <param name="controlStyle"></param>
+            <returns></returns>
+        </member>
         <member name="M:SCADA.CommonCtrl.WpfHelper.NormalIcon.CreateIcon(SCADA.CommonCtrl.NormalIconType,System.Windows.Media.Brush)">
             <summary>
             
@@ -10708,61 +11095,6 @@
             
             </summary>
         </member>
-        <member name="T:SCADA.CommonCtrl.Wpf.WindowSize">
-            <summary>
-            窗口的大小
-            </summary>
-        </member>
-        <member name="F:SCADA.CommonCtrl.Wpf.WindowSize.MaxSize">
-            <summary>
-            
-            </summary>
-        </member>
-        <member name="F:SCADA.CommonCtrl.Wpf.WindowSize.Normal">
-            <summary>
-            
-            </summary>
-        </member>
-        <member name="F:SCADA.CommonCtrl.Wpf.WindowSize.FHD">
-            <summary>
-            
-            </summary>
-        </member>
-        <member name="F:SCADA.CommonCtrl.Wpf.WindowSize.WXGAPlus">
-            <summary>
-            
-            </summary>
-        </member>
-        <member name="F:SCADA.CommonCtrl.Wpf.WindowSize.WXGA">
-            <summary>
-            
-            </summary>
-        </member>
-        <member name="F:SCADA.CommonCtrl.Wpf.WindowSize.SXGA">
-            <summary>
-            
-            </summary>
-        </member>
-        <member name="F:SCADA.CommonCtrl.Wpf.WindowSize.XGA">
-            <summary>
-            
-            </summary>
-        </member>
-        <member name="F:SCADA.CommonCtrl.Wpf.WindowSize.K_2">
-            <summary>
-            
-            </summary>
-        </member>
-        <member name="F:SCADA.CommonCtrl.Wpf.WindowSize.K_4">
-            <summary>
-            
-            </summary>
-        </member>
-        <member name="F:SCADA.CommonCtrl.Wpf.WindowSize.K_8">
-            <summary>
-            
-            </summary>
-        </member>
         <member name="T:LiveCharts.AxisCore">
             <summary>
             

BIN
Lib/SCADA.CommonLib.dll


+ 593 - 110
Lib/SCADA.CommonLib.xml

@@ -10,8 +10,11 @@
             </summary>
         </member>
         <member name="P:SCADA.CommonLib.AdvanceTimer.TimerName">
-            <summary>
-            /
+            <summary> 定时器名称
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.AdvanceTimer.LastExcuteTime">
+            <summary> 最后一次执行时间
             </summary>
         </member>
         <member name="P:SCADA.CommonLib.AdvanceTimer.Timer">
@@ -68,8 +71,7 @@
             </summary>
         </member>
         <member name="M:SCADA.CommonLib.AdvanceTimer.TriggerOnce">
-            <summary>
-            
+            <summary> 立即执行一次
             </summary>
         </member>
         <member name="M:SCADA.CommonLib.AdvanceTimer.#ctor(System.Threading.ThreadStart,System.String,System.Int32,System.Int32)">
@@ -86,6 +88,22 @@
             
             </summary>
         </member>
+        <member name="T:SCADA.CommonLib.AdvPropertyChangedEventArgs">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="M:SCADA.CommonLib.AdvPropertyChangedEventArgs.#ctor(System.String)">
+            <summary>
+            
+            </summary>
+            <param name="propertyName"></param>
+        </member>
+        <member name="P:SCADA.CommonLib.AdvPropertyChangedEventArgs.IsModifyIgnore">
+            <summary>
+            是否忽略修改
+            </summary>
+        </member>
         <member name="T:SCADA.CommonLib.AutoViewModelAttribute">
             <summary>
             
@@ -438,6 +456,16 @@
             将属性绑定到控件上
             </summary>
         </member>
+        <member name="T:SCADA.CommonLib.ModifyIgnoreAttribute">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="M:SCADA.CommonLib.ModifyIgnoreAttribute.#ctor">
+            <summary>
+            通过此标签可以抑制Parent上的Modify属性,被属性变化通知引起变化,该标签不会影响变化通知
+            </summary>
+        </member>
         <member name="T:SCADA.CommonLib.QueryAttribute">
             <summary>
             
@@ -2684,13 +2712,11 @@
             </summary>
         </member>
         <member name="E:SCADA.CommonLib.Data.DIL.BaseTable.ProcessReport">
-            <summary>
-            进度报告
+            <summary> 进度报告
             </summary>
         </member>
         <member name="E:SCADA.CommonLib.Data.DIL.BaseTable.ExecuteError">
-            <summary>
-            执行错误
+            <summary>执行错误
             </summary>
         </member>
         <member name="P:SCADA.CommonLib.Data.DIL.BaseTable.So">
@@ -6134,6 +6160,61 @@
             
             </summary>
         </member>
+        <member name="T:SCADA.CommonLib.Enums.WindowSize">
+            <summary>
+            窗口的大小
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonLib.Enums.WindowSize.MaxSize">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonLib.Enums.WindowSize.Normal">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonLib.Enums.WindowSize.FHD">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonLib.Enums.WindowSize.WXGAPlus">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonLib.Enums.WindowSize.WXGA">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonLib.Enums.WindowSize.SXGA">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonLib.Enums.WindowSize.XGA">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonLib.Enums.WindowSize.K_2">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonLib.Enums.WindowSize.K_4">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonLib.Enums.WindowSize.K_8">
+            <summary>
+            
+            </summary>
+        </member>
         <member name="T:SCADA.CommonLib.QueryOperator">
             <summary>
             
@@ -6719,46 +6800,6 @@
             
             </summary>
         </member>
-        <member name="T:SCADA.CommonLib.GlobalEnv">
-            <summary>
-            
-            </summary>
-        </member>
-        <member name="P:SCADA.CommonLib.GlobalEnv.Instance">
-            <summary>
-            
-            </summary>
-        </member>
-        <member name="P:SCADA.CommonLib.GlobalEnv.ServiceHost">
-            <summary>
-            
-            </summary>
-        </member>
-        <member name="P:SCADA.CommonLib.GlobalEnv.GlobalDB">
-            <summary>
-            系统数据库
-            </summary>
-        </member>
-        <member name="P:SCADA.CommonLib.GlobalEnv.LocalAppDB">
-            <summary>
-            本地应用数据库
-            </summary>
-        </member>
-        <member name="P:SCADA.CommonLib.GlobalEnv.AppDB">
-            <summary>
-            应用数据库
-            </summary>
-        </member>
-        <member name="P:SCADA.CommonLib.GlobalEnv.AlarmDB">
-            <summary>
-            
-            </summary>
-        </member>
-        <member name="P:SCADA.CommonLib.GlobalEnv.User">
-            <summary>
-            
-            </summary>
-        </member>
         <member name="T:SCADA.CommonLib.Helper.AESHelper">
             <summary>
             AES 加密帮助类
@@ -7856,7 +7897,7 @@
             <param name="time"></param>
             <returns></returns>
         </member>
-        <member name="M:SCADA.CommonLib.Helper.DateTimeHelper.TimeFrom(System.DateTime,System.String)">
+        <member name="M:SCADA.CommonLib.Helper.DateTimeHelper.TimeFormat(System.DateTime,System.String)">
             <summary>
             
             </summary>
@@ -9210,6 +9251,14 @@
             <param name="dst">目标对象</param>
             <param name="deepCopy">是否深度拷贝</param>
         </member>
+        <member name="M:SCADA.CommonLib.Helper.ReflectionHelper.GetTypes``1(System.Collections.Generic.IEnumerable{System.String})">
+            <summary>
+            
+            </summary>
+            <typeparam name="T"></typeparam>
+            <param name="dllFiles"></param>
+            <returns></returns>
+        </member>
         <member name="T:SCADA.CommonLib.Helper.SystemHelper">
             <summary>
             
@@ -10929,24 +10978,19 @@
             
             </summary>
         </member>
-        <member name="P:SCADA.CommonLib.IApp.ProductId">
-            <summary>
-            产品ID
-            </summary>
-        </member>
-        <member name="P:SCADA.CommonLib.IApp.UidVersion">
+        <member name="P:SCADA.CommonLib.IApp.ThemeConfig">
             <summary>
-            产品版本UID
+            
             </summary>
         </member>
-        <member name="P:SCADA.CommonLib.IApp.StartTime">
+        <member name="P:SCADA.CommonLib.IApp.SystemConfig">
             <summary>
-            启动时间
+            
             </summary>
         </member>
-        <member name="P:SCADA.CommonLib.IApp.SessionId">
+        <member name="P:SCADA.CommonLib.IApp.RuntimeInfo">
             <summary>
-            会话ID
+            
             </summary>
         </member>
         <member name="M:SCADA.CommonLib.IApp.Restart(System.Boolean)">
@@ -10965,16 +11009,6 @@
             重新加载授权文件
             </summary>
         </member>
-        <member name="P:SCADA.CommonLib.IApp.Memonry">
-            <summary>
-            内存占用
-            </summary>
-        </member>
-        <member name="P:SCADA.CommonLib.IApp.CpuRate">
-            <summary>
-            CPU 占用率
-            </summary>
-        </member>
         <member name="P:SCADA.CommonLib.IApp.ServiceHost">
             <summary>
             
@@ -11002,6 +11036,172 @@
             <param name="message">toast内容</param>
             <param name="toastType">0:default 1:Primary 2:Success 3:Info 4:Warning 5:Danger</param>
         </member>
+        <member name="T:SCADA.CommonLib.License.ComputerModel">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.ComputerModel.CpuIDs">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.ComputerModel.CpuNames">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.ComputerModel.MacAddresss">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.ComputerModel.DiskIDs">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.ComputerModel.LoginUserName">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.ComputerModel.ComputerName">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.ComputerModel.SystemType">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.ComputerModel.TotalPhysicalMemory">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.ComputerModel.Version">
+            <summary>
+            操作系统版本号
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.ComputerModel.Caption">
+            <summary>
+            操作系统标题
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.ComputerModel.SerialNumber">
+            <summary>
+            操作系统序列号 
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.ComputerModel.ComputerId">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="M:SCADA.CommonLib.License.ComputerModel.#ctor">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="M:SCADA.CommonLib.License.ComputerModel.#ctor(SCADA.CommonLib.ComputerInfo)">
+            <summary>
+            
+            </summary>
+            <param name="computer"></param>
+        </member>
+        <member name="T:SCADA.CommonLib.License.LicenseInfo">
+            <summary>
+            授权信息
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.LicenseInfo.LicenseId">
+            <summary>
+            授权ID
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.LicenseInfo.AppName">
+            <summary>
+            应用名称
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.LicenseInfo.Mac">
+            <summary>
+            物理地址
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.LicenseInfo.Cpu">
+            <summary>
+            CPU
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.LicenseInfo.HDD">
+            <summary>
+            硬盘
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.LicenseInfo.CreateTime">
+            <summary>
+            首次使用时间
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.LicenseInfo.ActiveTime">
+            <summary>
+            激活时间
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.LicenseInfo.LicenseType">
+            <summary>
+            授权类型
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.LicenseInfo.IsExpired">
+            <summary>
+            是否已过期
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.LicenseInfo.LastUseTime">
+            <summary>
+            最后使用时间
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.LicenseInfo.ExpireDays">
+            <summary>
+            过期时间
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.License.LicenseInfo.Computer">
+            <summary>
+            计算机信息
+            </summary>
+        </member>
+        <member name="T:SCADA.CommonLib.License.LicenseType">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonLib.License.LicenseType.NoLicense">
+            <summary>
+            无许可
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonLib.License.LicenseType.TempLicense">
+            <summary>
+            临时许可
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonLib.License.LicenseType.Permanentlicense">
+            <summary>
+            永久许可
+            </summary>
+        </member>
+        <member name="F:SCADA.CommonLib.License.LicenseType.DelayVerify">
+            <summary>
+            延迟验证
+            </summary>
+        </member>
         <member name="T:SCADA.CommonLib.LoggerHelper.LogEntry">
             <summary>
             
@@ -11063,14 +11263,14 @@
             
             </summary>
         </member>
-        <member name="M:SCADA.CommonLib.LoggerHelper.Logger.CreatLogger(System.Type)">
+        <member name="M:SCADA.CommonLib.LoggerHelper.Logger.CreateLogger(System.Type)">
             <summary>
             
             </summary>
             <param name="type"></param>
             <returns></returns>
         </member>
-        <member name="M:SCADA.CommonLib.LoggerHelper.Logger.CreatLogger(System.String)">
+        <member name="M:SCADA.CommonLib.LoggerHelper.Logger.CreateLogger(System.String)">
             <summary>
             
             </summary>
@@ -11100,6 +11300,12 @@
             </summary>
             <returns></returns>
         </member>
+        <member name="M:SCADA.CommonLib.LoggerHelper.Logger.ClearLog(System.Int32)">
+            <summary>
+            
+            </summary>
+            <param name="retain">日志保留天数,默认30天</param>
+        </member>
         <member name="T:SCADA.CommonLib.LoggerHelper.LogItemModel">
             <summary>
             
@@ -11321,6 +11527,13 @@
             </summary>
             <param name="info"></param>
         </member>
+        <member name="M:SCADA.CommonLib.ObservableObject.OnPropertyChanged(System.String,System.Nullable{System.Boolean})">
+            <summary>
+            
+            </summary>
+            <param name="info"></param>
+            <param name="isModifyIgnore"></param>
+        </member>
         <member name="P:SCADA.CommonLib.ObservableObject.DataCheck">
             <summary>
             数据检查
@@ -11372,28 +11585,6 @@
             
             </summary>
         </member>
-        <member name="T:SCADA.CommonLib.PlugInServer">
-            <summary>
-            
-            </summary>
-        </member>
-        <member name="M:SCADA.CommonLib.PlugInServer.#ctor">
-            <summary>
-            
-            </summary>
-        </member>
-        <member name="P:SCADA.CommonLib.PlugInServer.Instance">
-            <summary>
-            
-            </summary>
-        </member>
-        <member name="M:SCADA.CommonLib.PlugInServer.GetTypes``1(System.String)">
-            <summary>
-            
-            </summary>
-            <typeparam name="T"></typeparam>
-            <returns></returns>
-        </member>
         <member name="T:SCADA.CommonLib.Properties.Resources">
             <summary>
               一个强类型的资源类,用于查找本地化的字符串等。
@@ -11683,6 +11874,276 @@
             <param name="includeInnerError"></param>
             <returns></returns>
         </member>
+        <member name="T:SCADA.CommonLib.RuntimeInfo">
+            <summary>
+            运行时信息
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.RuntimeInfo.ProductId">
+            <summary>
+            产品ID
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.RuntimeInfo.UidVersion">
+            <summary>
+            产品版本UID
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.RuntimeInfo.StartTime">
+            <summary>
+            启动时间
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.RuntimeInfo.SessionId">
+            <summary>
+            会话ID
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.RuntimeInfo.Memonry">
+            <summary>
+            内存占用
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.RuntimeInfo.CpuRate">
+            <summary>
+            CPU 占用率
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.RuntimeInfo.ComputerId">
+            <summary>
+            电脑ID
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.RuntimeInfo.ServiceHost">
+            <summary>
+            宿主服务
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.RuntimeInfo.User">
+            <summary>
+            当前用户
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.RuntimeInfo.ExeName">
+            <summary>
+            运行程序名称
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.RuntimeInfo.PuginPaths">
+            <summary>
+            插件路径,多个路径用;号隔开
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.RuntimeInfo.DllNameMatch">
+            <summary>
+            插件名称匹配规则
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.RuntimeInfo.MenuNameMatch">
+            <summary>
+            菜单名称匹配
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.RuntimeInfo.LicenseInfo">
+            <summary>
+            授权信息
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.RuntimeInfo.GlobalDB">
+            <summary>
+            系统数据库
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.RuntimeInfo.LocalAppDB">
+            <summary>
+            本地应用数据库
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.RuntimeInfo.AppDB">
+            <summary>
+            应用数据库
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.RuntimeInfo.AlarmDB">
+            <summary>
+            报警数据库
+            </summary>
+        </member>
+        <member name="T:SCADA.CommonLib.SystemConfig">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.SystemConfig.ComputerTag">
+            <summary>电脑标签
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.SystemConfig.SingleModel">
+            <summary> 单例模式
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.SystemConfig.AutoCycle">
+            <summary>
+            自动循环
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.SystemConfig.CycleTime">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.SystemConfig.AutomaticStart">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.SystemConfig.CreateDesktopShortcut">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.SystemConfig.ExitTip">
+            <summary>退出时提示
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.SystemConfig.AutoUpdate">
+            <summary>自动更新
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.SystemConfig.DeviceCfgFile">
+            <summary>设备配置
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.SystemConfig.ProductTitle">
+            <summary>窗口标题
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.SystemConfig.AuthorInfo">
+            <summary> 作者信息
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.SystemConfig.BackgroundImage">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.SystemConfig.Icon">
+            <summary>
+            软件图标
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.SystemConfig.ProductName">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.SystemConfig.DefaultUser">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.SystemConfig.DefaultUserSource">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.SystemConfig.WebServer">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.SystemConfig.AllowClose">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.SystemConfig.MenuIsExpanded">
+            <summary>展开菜单栏
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.SystemConfig.MsgIsExpanded">
+            <summary>
+            展开消息框
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.SystemConfig.IsFirstBoot">
+            <summary>
+            第一次启动
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.SystemConfig.LogLevel">
+            <summary>
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.SystemConfig.WindowSize">
+            <summary>窗口大小
+            </summary>
+        </member>
+        <member name="T:SCADA.CommonLib.ThemeConfig">
+            <summary>
+            主题配置
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.ThemeConfig.ThemeName">
+            <summary>
+            主题名称
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.ThemeConfig.ThemeNameSrc">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.ThemeConfig.ThemeColors">
+            <summary>
+            主题颜色
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.ThemeConfig.ThemeColorSrc">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.ThemeConfig.FontName">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.ThemeConfig.FontNameSrc">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.ThemeConfig.FontSize">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.ThemeConfig.FontSizeSrc">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.ThemeConfig.FontWeight">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.ThemeConfig.FontWeightSrc">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.ThemeConfig.Language">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.ThemeConfig.LanguageSrc">
+            <summary>
+            
+            </summary>
+        </member>
         <member name="T:SCADA.CommonLib.Schedual">
             <summary>
             班次信息
@@ -12030,35 +12491,33 @@
             </summary>
         </member>
         <member name="P:SCADA.CommonLib.Service.BaseService.ServiceName">
-            <summary>
-            服务名称
+            <summary>服务名称
             </summary>
         </member>
         <member name="P:SCADA.CommonLib.Service.BaseService.Log">
-            <summary>
-            日志
+            <summary> 日志
             </summary>
         </member>
         <member name="P:SCADA.CommonLib.Service.BaseService.ServiceConfig">
-            <summary>
-            服务配置
+            <summary>服务配置
             </summary>
         </member>
         <member name="P:SCADA.CommonLib.Service.BaseService.ConfigType">
-            <summary>
-            配置类类型
+            <summary>配置类类型
             </summary>
         </member>
         <member name="P:SCADA.CommonLib.Service.BaseService.IsRunning">
-            <summary>
-            运行中
+            <summary>运行中
             </summary>
         </member>
-        <member name="P:SCADA.CommonLib.Service.BaseService.ServiceId">
+        <member name="P:SCADA.CommonLib.Service.BaseService.AppRuntime">
             <summary>
             
             </summary>
         </member>
+        <member name="P:SCADA.CommonLib.Service.BaseService.ServiceId">
+            <summary> </summary>
+        </member>
         <member name="F:SCADA.CommonLib.Service.BaseService.Timers">
             <summary>
             后台任务
@@ -12100,6 +12559,11 @@
             </summary>
             <returns></returns>
         </member>
+        <member name="M:SCADA.CommonLib.Service.BaseService.OnStarted">
+            <summary>
+            
+            </summary>
+        </member>
         <member name="M:SCADA.CommonLib.Service.BaseService.Stop">
             <summary>
             停止服务
@@ -12164,6 +12628,11 @@
             服务名称
             </summary>
         </member>
+        <member name="P:SCADA.CommonLib.Service.IService.AppRuntime">
+            <summary>
+            运行时上下文
+            </summary>
+        </member>
         <member name="M:SCADA.CommonLib.Service.IService.Restart">
             <summary>
             重启
@@ -12199,7 +12668,7 @@
         </member>
         <member name="M:SCADA.CommonLib.Service.IServiceHost.GetService``1(System.String)">
             <summary>
-            
+            根据名称查找
             </summary>
             <typeparam name="T"></typeparam>
             <param name="serviceName"></param>
@@ -12207,27 +12676,41 @@
         </member>
         <member name="M:SCADA.CommonLib.Service.IServiceHost.GetService``1">
             <summary>
-            
+            查找服务
             </summary>
             <typeparam name="T"></typeparam>
             <returns></returns>
         </member>
         <member name="M:SCADA.CommonLib.Service.IServiceHost.Paused">
             <summary>
-            
+            暂停
             </summary>
             <returns></returns>
         </member>
         <member name="M:SCADA.CommonLib.Service.IServiceHost.Start">
             <summary>
-            
+            启动
             </summary>
             <returns></returns>
         </member>
         <member name="M:SCADA.CommonLib.Service.IServiceHost.Stop">
             <summary>
-            
+            停止
+            </summary>
+            <returns></returns>
+        </member>
+        <member name="M:SCADA.CommonLib.Service.IServiceHost.GetPluginTypes``1">
+            <summary>
+            查找插件中的所有类型
+            </summary>
+            <typeparam name="T"></typeparam>
+            <returns></returns>
+        </member>
+        <member name="M:SCADA.CommonLib.Service.IServiceHost.GetPluginTypes``1(System.String)">
+            <summary>
+            查找插件中的所有类型
             </summary>
+            <typeparam name="T">要查找的根目录</typeparam>
             <returns></returns>
         </member>
         <member name="T:SCADA.CommonLib.Service.RpcCallInfo">

BIN
Lib/SCADA.NetCamera.dll


BIN
Lib/SCADA.dll


+ 174 - 11
Lib/SCADA.xml

@@ -1257,6 +1257,11 @@
             
             </summary>
         </member>
+        <member name="P:SCADA.BaseCmd.ResponseMessage">
+            <summary>
+            
+            </summary>
+        </member>
         <member name="T:SCADA.DataDirect">
             <summary>
             数据方向读写
@@ -1277,6 +1282,16 @@
             
             </summary>
         </member>
+        <member name="P:SCADA.BaseDevice.StartTime">
+            <summary>
+            启动时间
+            </summary>
+        </member>
+        <member name="P:SCADA.BaseDevice.ListenRegNames">
+            <summary>
+            监听寄存器地址
+            </summary>
+        </member>
         <member name="F:SCADA.BaseDevice.SystemTag_ConnectState">
             <summary>
             连接状态
@@ -1420,11 +1435,6 @@
             
             </summary>
         </member>
-        <member name="F:SCADA.BaseDevice.LastScanDate">
-            <summary>
-            
-            </summary>
-        </member>
         <member name="P:SCADA.BaseDevice.HeartHeatRegName">
             <summary>
             心跳寄存器名称
@@ -1833,6 +1843,18 @@
             热加载寄存器
             </summary>
         </member>
+        <member name="M:SCADA.BaseDevice.HotLoadConfig(System.String)">
+            <summary>
+            
+            </summary>
+            <param name="regNames"></param>
+        </member>
+        <member name="M:SCADA.BaseDevice.UpdateComm(SCADA.Comm.IComm)">
+            <summary>
+            修改通信通道
+            </summary>
+            <param name="comm"></param>
+        </member>
         <member name="M:SCADA.BaseDevice.UpdatePollRate(System.Int32)">
             <summary>
             修改轮询速度
@@ -2541,6 +2563,11 @@
             最后打印连接日志的时间
             </summary>
         </member>
+        <member name="P:SCADA.Comm.BaseComm.CommId">
+            <summary>
+            
+            </summary>
+        </member>
         <member name="P:SCADA.Comm.BaseComm.EFs">
             <summary>
             定义了结束标志后收到数据将引发事件
@@ -4978,6 +5005,11 @@
             <param name="protocol"></param>
             <param name="regArea"></param>
         </member>
+        <member name="P:SCADA.Drive.BaseMessage.ChildRegs">
+            <summary>
+            
+            </summary>
+        </member>
         <member name="P:SCADA.Drive.BaseMessage.RegArea">
             <summary>
             寄存器区域
@@ -5430,16 +5462,47 @@
         </member>
         <member name="P:SCADA.Drive.CIP.CIPCommandSpecific.AddressLength">
             <summary>
-            
             This field shall be 0 since UCMM  messages use the NULL address item
             此字段应为 0,因为 UCMM 邮件使用空地址项。
             </summary>
         </member>
+        <member name="P:SCADA.Drive.CIP.CIPCommandSpecific.DataTypeID">
+            <summary>
+            </summary>
+        </member>
+        <member name="P:SCADA.Drive.CIP.CIPCommandSpecific.MRRequestPacket">
+            <summary>
+            </summary>
+        </member>
         <member name="P:SCADA.Drive.CIP.CIPCommandSpecific.ConnectedAddressItem">
             <summary>
             
             </summary>
         </member>
+        <member name="P:SCADA.Drive.CIP.CIPCommandSpecific.ConnectedAddressItemLength">
+            <summary>
+            </summary>
+        </member>
+        <member name="P:SCADA.Drive.CIP.CIPCommandSpecific.ConnectionID">
+            <summary>
+            </summary>
+        </member>
+        <member name="P:SCADA.Drive.CIP.CIPCommandSpecific.ConnectedDataItem">
+            <summary>
+            </summary>
+        </member>
+        <member name="P:SCADA.Drive.CIP.CIPCommandSpecific.ConnectedDataItemLength">
+            <summary>
+            </summary>
+        </member>
+        <member name="P:SCADA.Drive.CIP.CIPCommandSpecific.CIPSequenceCount">
+            <summary>
+            </summary>
+        </member>
+        <member name="M:SCADA.Drive.CIP.CIPCommandSpecific.Encoding">
+            <summary>
+            </summary>
+        </member>
         <member name="F:SCADA.Drive.CIP.CIPErrorCodes.Invalid">
             <summary>
             发送方发出了无效或不受支持的封装命令
@@ -6663,11 +6726,22 @@
             最后一次扫描的时间
             </summary>
         </member>
+        <member name="P:SCADA.Drive.ListenPackage.LastDataDic">
+            <summary>
+             最后读取的字典
+            </summary>
+        </member>
         <member name="P:SCADA.Drive.ListenPackage.ErrorMsg">
             <summary>
             包错误信息
             </summary>
         </member>
+        <member name="M:SCADA.Drive.ListenPackage.ToString">
+            <summary>
+            
+            </summary>
+            <returns></returns>
+        </member>
         <member name="T:SCADA.Drive.Mitsubishi.BaseMitsubishi">
             <summary>
             
@@ -7868,6 +7942,15 @@
             汇川SD批量写
             </summary>
         </member>
+        <member name="M:SCADA.Drive.Modbus.ModbusHelper.ModbusRtuSendCmd(SCADA.Drive.BaseProtocol,SCADA.Comm.IComm,SCADA.BaseCmd)">
+            <summary>
+            ModbusRtu 发送接收
+            </summary>
+            <param name="protocol"></param>
+            <param name="comm"></param>
+            <param name="cmd"></param>
+            <returns></returns>
+        </member>
         <member name="M:SCADA.Drive.Modbus.ModbusRtuCmd.#ctor(System.Collections.Generic.List{System.Byte})">
             <summary>
             解码
@@ -8013,6 +8096,11 @@
             <param name="comm"></param>
             <param name="address"></param>
         </member>
+        <member name="M:SCADA.Drive.Modbus.ModbusSlaveTcp.Dispose">
+            <summary>
+            
+            </summary>
+        </member>
         <member name="F:SCADA.Drive.Modbus.ModbusTagExtersion.FiveBitAddressPattern">
             <summary>
             modbus 5位地址 后4位是16进制
@@ -8972,6 +9060,41 @@
             
             </summary>
         </member>
+        <member name="T:SCADA.Drive.RegCustomerEventTriggerEventArgs">
+            <summary>
+            寄存器的读数发生变化
+            </summary>
+        </member>
+        <member name="P:SCADA.Drive.RegCustomerEventTriggerEventArgs.Reg">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.Drive.RegCustomerEventTriggerEventArgs.NewValue">
+            <summary>
+            新值
+            </summary>
+        </member>
+        <member name="P:SCADA.Drive.RegCustomerEventTriggerEventArgs.OldValue">
+            <summary>
+            旧值
+            </summary>
+        </member>
+        <member name="P:SCADA.Drive.RegCustomerEventTriggerEventArgs.RegName">
+            <summary>
+            寄存器
+            </summary>
+        </member>
+        <member name="P:SCADA.Drive.RegCustomerEventTriggerEventArgs.Variable">
+            <summary>
+            变量名
+            </summary>
+        </member>
+        <member name="P:SCADA.Drive.RegCustomerEventTriggerEventArgs.TriggerModel">
+            <summary>
+            触发方式
+            </summary>
+        </member>
         <member name="T:SCADA.Drive.RegHistoryValue">
             <summary>
             寄存器值历史记录
@@ -8997,6 +9120,32 @@
             寄存器信息
             </summary>
         </member>
+        <member name="E:SCADA.Drive.RegInfo.PropertyChanged">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="M:SCADA.Drive.RegInfo.OnPropertyChanged(System.String)">
+            <summary>
+            
+            </summary>
+            <param name="propertyName"></param>
+        </member>
+        <member name="E:SCADA.Drive.RegInfo.RegValueChanged">
+            <summary>
+            寄存器值发生变化引发事件
+            </summary>
+        </member>
+        <member name="E:SCADA.Drive.RegInfo.RegReadValueChanged">
+            <summary>
+            寄存器读数发生变化(寄存器读数和实际值是有差别的,读数是经过转化之后加了单位的值)
+            </summary>
+        </member>
+        <member name="E:SCADA.Drive.RegInfo.CustomerEventTrigger">
+            <summary>
+            自定义事件被触发
+            </summary>
+        </member>
         <member name="P:SCADA.Drive.RegInfo.State">
             <summary>
             寄存器状态
@@ -9290,6 +9439,12 @@
             </summary>
             <returns></returns>
         </member>
+        <member name="M:SCADA.Drive.RegInfo.OnCustomEventTrigger(SCADA.Drive.RegCustomerEventTriggerEventArgs)">
+            <summary>
+            
+            </summary>
+            <param name="regCustomerEventTrigger"></param>
+        </member>
         <member name="M:SCADA.Drive.RegInfo.Copy(SCADA.Drive.RegInfo)">
             <summary>
             
@@ -9301,19 +9456,19 @@
             
             </summary>
         </member>
-        <member name="F:SCADA.Drive.RegKind.Default">
+        <member name="F:SCADA.Drive.RegKind.IO">
             <summary>
             默认
             </summary>
         </member>
-        <member name="F:SCADA.Drive.RegKind.User">
+        <member name="F:SCADA.Drive.RegKind.System">
             <summary>
-            用户
+            系统
             </summary>
         </member>
-        <member name="F:SCADA.Drive.RegKind.System">
+        <member name="F:SCADA.Drive.RegKind.Memnory">
             <summary>
-            系统
+            内存
             </summary>
         </member>
         <member name="T:SCADA.Drive.RegReadValueChangedEventArgs">
@@ -34497,6 +34652,14 @@
             <param name="source"></param>
             <returns></returns>
         </member>
+        <member name="M:SCADA.ScadaExtersion.ByteListEquals(System.Collections.Generic.List{System.Byte},System.Collections.Generic.List{System.Byte})">
+            <summary>
+            二级制集合比较
+            </summary>
+            <param name="source1"></param>
+            <param name="source2"></param>
+            <returns></returns>
+        </member>
         <member name="T:SCADA.SMT.NPM.Cancel">
             <summary>
             

BIN
Lib/SCADA_DAQ.Plugin.Core.dll


BIN
Lib/SCADA_DAQ.Plugin.CoreUI.dll


BIN
Lib/SCADA_DAQ.Plugin.Machine.dll


BIN
Lib/SCADA_DAQ.Plugin.MachineUI.dll


BIN
Lib/SCADA_DAQ.Plugin.RESTful.dll


+ 0 - 9
Lib/SCADA_DAQ.Plugin.RESTful.xml

@@ -171,15 +171,6 @@
             
             </summary>
         </member>
-        <member name="M:SCADA_DAQ.Plugin.RESTful.RESTfulService.RunApp(System.String,System.String,System.Boolean)">
-            <summary>  
-            运行一个控制台程序并返回其输出参数。  
-            </summary>  
-            <param name="filename">程序名</param>  
-            <param name="arguments">输入参数</param>
-            <param name="recordLog"></param>  
-            <returns></returns>  
-        </member>
         <member name="M:SCADA_DAQ.Plugin.RESTful.RESTfulService.#ctor">
             <summary>
             

BIN
Lib/System.CodeDom.dll


BIN
Lib/System.Data.OleDb.dll


BIN
Lib/System.Data.SqlClient.dll


BIN
Lib/Xceed.Wpf.Toolkit.dll


+ 39 - 52
SCADA_DAQ/App.xaml.cs

@@ -1,5 +1,6 @@
 using SCADA.CommonCtrl.WpfControl;
 using SCADA.CommonLib;
+using SCADA.CommonLib.Helper;
 using SCADA.CommonLib.Service;
 using SCADA_DAQ.Plugin.Core.AutoUpdater;
 using SCADA_DAQ.Plugin.CoreUI;
@@ -7,6 +8,7 @@ using System;
 using System.Diagnostics;
 using System.IO;
 using System.Linq;
+using System.Reflection;
 using System.Threading;
 using System.Threading.Tasks;
 using System.Windows;
@@ -24,77 +26,62 @@ namespace SCADA_DAQ
         private static SystemControl systemControl;
 
         private string _sessionid;
-
-        /// <summary>
-        /// 会话ID
-        /// </summary>
-        public string SessionId => _sessionid ?? (_sessionid = Guid.NewGuid().ToString());
-
         internal Task updateCheckTask;
 
         /// <summary>
-        /// 产品ID
-        /// </summary>
-        public string ProductId { get; } = System.Windows.Forms.Application.ProductName;
-
-        /// <summary>
-        /// 版本ID
-        /// </summary>
-        public string UidVersion { get; set; }
-
-        /// <summary>
-        /// 启动时间
         /// </summary>
-        public DateTime StartTime { get; }
-
+        public IServiceHost ServiceHost { get; set; }
         /// <summary>
         /// 
         /// </summary>
-        public IServiceHost ServiceHost { get; set; }
+        public ThemeConfig ThemeConfig { get => AutoSaveParameterItem.Create("App.ThemeConfig", new ThemeConfig()); }
 
         /// <summary>
-        /// 
         /// </summary>
-        public decimal Memonry { get; set; }
+        public SystemConfig SystemConfig { get => AutoSaveParameterItem.Create("App.SystemConfig", new SystemConfig()); }
 
         /// <summary>
         /// 
         /// </summary>
-        public decimal CpuRate { get; set; }
+        public RuntimeInfo RuntimeInfo { get; set; } = new RuntimeInfo();
+
 
         private App()
         {
-            StartTime = DateTime.Now;
+            //RuntimeInfo.ProductId=ApplicationHelper.GetProductTitle();
+            RuntimeInfo.ProductId = System.Windows.Forms.Application.ProductName;
+            RuntimeInfo.SessionId = _sessionid ?? (_sessionid = Guid.NewGuid().ToString());
+            RuntimeInfo.ExeName = Path.GetFileName(Assembly.GetExecutingAssembly().CodeBase);
+
+            RuntimeInfo.PuginPaths = "plugin";
+            RuntimeInfo.DllNameMatch = "SCADA_DAQ.Plugin.*.dll";
+            RuntimeInfo.MenuNameMatch = "UctFrm";
+
             Console.WriteLine($"App Start  {DateTime.Now:yyyy-MM-dd HH:mm:ss.fff}");
-            //AppDomain.MonitoringIsEnabled = true;
-            updateCheckTask = Task.Factory.StartNew(() =>
+            if (string.IsNullOrEmpty(SystemConfig.WebServer))
             {
-                try
-                {
-                    var _checkUpdate = true;
-                    if (File.Exists("UserConfig.xml"))
-                    {
-                        var xmlFile = XDocument.Load("UserConfig.xml");
-                        var node = xmlFile.Descendants("App.AutoUpdate").FirstOrDefault();
-                        var val = node?.Value;
-                        bool.TryParse(val, out _checkUpdate);
-                    }
-                    if (_checkUpdate)
-                    {
-                        var task = UpdateHelper.CheckUpdate();
-                        task.Wait();
-                    }
-                }
-                catch (Exception)
-                {
-
-                }
-            });
+                SystemConfig.WebServer = "www.skdscada.com";
+            }
+            if (string.IsNullOrEmpty(SystemConfig.ProductTitle))
+            {
+                SystemConfig.ProductTitle = ApplicationHelper.GetProductTitle();
+            }
+            if (string.IsNullOrEmpty(SystemConfig.AuthorInfo))
+            {
+                SystemConfig.AuthorInfo = System.Windows.Forms.Application.CompanyName;
+            }
+            if (string.IsNullOrEmpty(SystemConfig.DefaultUser))
+            {
+                SystemConfig.DefaultUser = "Operator";
+            }
             try
             {
-                var appServer = Env.WebServerAddress.Value;
+                var appServer = SystemConfig.WebServer;
                 Trace.WriteLine($"Server:{appServer}");
-                var task = Task.Factory.StartNew(Env.ParameterInit);
+                var task = Task.Factory.StartNew(() =>
+                {
+                    Env.ParameterInit(this);
+                });
                 var win = new MainWindow();
                 MainWindow = win;
                 win.FrmClosingWait += Win_FrmClosingWait;
@@ -104,13 +91,13 @@ namespace SCADA_DAQ
                 {
                     MainWindow.Icon = new BitmapImage(new Uri(iconPath, UriKind.RelativeOrAbsolute));
                 }
-                MainWindow.Show();
+
                 task.Wait();
                 systemControl.SystemInit();
             }
             catch (Exception ex)
             {
-                updateCheckTask?.Wait(10 * 1000);
+                //updateCheckTask?.Wait(10 * 1000);
                 Trace.TraceError(ex.ToString());
             }
         }
@@ -122,7 +109,7 @@ namespace SCADA_DAQ
 
         private void Application_Startup(object sender, StartupEventArgs e)
         {
-
+            MainWindow.Show();
         }
 
         private void Application_SessionEnding(object sender, SessionEndingCancelEventArgs e)

+ 1 - 1
SCADA_DAQ/Customer/Controllers/EicpWebHooks.cs

@@ -20,7 +20,7 @@ namespace SCADA_DAQ.Customer.Controllers
     /// </summary>
     public class RegWebHookController : ApiController
     {
-        private static ILog Log = Logger.CreatLogger("RegWebHook");
+        private static ILog Log = Logger.CreateLogger("RegWebHook");
 
         /// <summary>
         /// 

+ 2 - 1
SCADA_DAQ/Customer/Service/LoginSevice.cs

@@ -69,7 +69,8 @@ namespace SCADA_DAQ.Customer.Service
         /// <param name="password">密码</param>
         public RpcResponse<object> UserLogin(string userName, string password)
         {
-            if (GlobalEnv.Instance.GlobalDB is BaseDB db)
+
+            if (AppRuntime.RuntimeInfo.GlobalDB is BaseDB db)
             {
                 var res = db.UserLogin(userName, password);
                 if (res.ReturnValue != null)

BIN
SCADA_DAQ/Data/LocalApp.zip


BIN
SCADA_DAQ/Data/Platform.zip


BIN
SCADA_DAQ/Data/QwPlatform.zip


+ 67 - 140
SCADA_DAQ/Env.cs

@@ -15,6 +15,7 @@ using System.Reflection;
 using System.Windows;
 using System.Windows.Media;
 using SCADA_DAQ.Plugin.CoreUI;
+using SCADA.CommonLib.License;
 
 
 namespace SCADA_DAQ
@@ -29,21 +30,9 @@ namespace SCADA_DAQ
 
         public static Schedual Schedual { get; internal set; } = Schedual.Instance;
 
-        internal static LicenseInfo LicenseInfo;
-
         public static DateTime StartTime { get; set; }
         public static int StartTick { get; internal set; }
 
-        public static AutoSaveParameterItem<string> ProductTitle { get; set; }
-
-        public static AutoSaveParameterItem<string> ProductName { get; set; }
-
-        public static AutoSaveParameterItem<string> CompanyName { get; set; }
-
-        public static AutoSaveParameterItem<string> AuthorInfo { get; set; }
-
-        public static AutoSaveParameterItem<string> MainDllName { get; set; }
-
         public static DataBaseConfig CurrentDbConfig { get; set; }
 
         public static AutoSaveParameterItem<DatabaseSelector> CurrentDataBase { get; set; }
@@ -58,10 +47,6 @@ namespace SCADA_DAQ
 
         public static AutoSaveParameterItem<ObservableCollection<DataBaseConfig>> DataBaseResource { get; set; }
 
-        public static AutoSaveParameterItem<string> DefaultUserName { get; set; }
-
-        public static AutoSaveParameterItem<string> WebServerAddress = AutoSaveParameterItem.Create("App.WebServer", "www.skdscada.com");
-
         public static AutoSaveParameterItem<bool> DataBaseNeedRest { get; set; } = AutoSaveParameterItem.Create("App.DatabaseNeedRest", false);
 
         /// <summary>
@@ -74,74 +59,9 @@ namespace SCADA_DAQ
         /// </summary>
         public static AutoSaveParameterItem<decimal> TotalOutputQty { get; set; } = AutoSaveParameterItem.Create("App.TotalOutputQty", 0m);
 
-        #region 系统设置
-
-        public static AutoSaveParameterItem<string> ComputerId;
-
-        public static AutoSaveParameterItem<string> ComputerTag;
-
-        public static AutoSaveParameterItem<bool> SingleModel;
-
-        public static AutoSaveParameterItem<SCADA.CommonLib.LoggerHelper.LogLevel> LogLevel;
-
-        public static AutoSaveParameterItem<bool> AutoCycle;
-
-        public static AutoSaveParameterItem<int> CycleTime;
-
-        public static AutoSaveParameterItem<int> DataExpireDay;
-
-        #endregion
-        #region 主题配置
-        public static AutoSaveParameterItem<string> ThemeName;
-
-        public static AutoSaveParameterItem<string> ThemeColor;
-        #endregion
 
-        public static AutoSaveParameterItem<string> Language;
-        /// <summary>
-        /// 设备配置文件
-        /// </summary>
-        public static AutoSaveParameterItem<string> DeviceConfigFilePath;
-
-        public static void ParameterInit()
+        public static void ParameterInit(IApp app)
         {
-            ProductTitle = AutoSaveParameterItem.Create("App.MainTitle", ApplicationHelper.GetProductTitle(), true);
-            ProductTitle.DisplayName = "窗口标题";
-
-            ProductName = AutoSaveParameterItem.Create("App.ProductName", "EICP", true);
-            ProductName.DisplayName = "产品名称";
-
-            CompanyName = AutoSaveParameterItem.Create("App.CompanyName", "", true);
-            CompanyName.DisplayName = "公司名称";
-
-            AuthorInfo = AutoSaveParameterItem.Create("App.AuthorInfo", System.Windows.Forms.Application.CompanyName, true);
-            AuthorInfo.DisplayName = "作者信息";
-
-            DefaultUserName = AutoSaveParameterItem.Create("App.DefualtUserName", "Operator", true);
-            DefaultUserName.DisplayName = "默认用户";
-
-            ComputerId = AutoSaveParameterItem.Create("App.ComputerId", "", true);
-            ComputerId.IsReadOnly = true;
-            ComputerId.DisplayName = "本机ID";
-
-            ComputerTag = AutoSaveParameterItem.Create("App.ComputerTag", "", true);
-            ComputerTag.IsReadOnly = true;
-
-            SingleModel = AutoSaveParameterItem.Create("App.SingleModel", true);
-            SingleModel.DisplayName = "单例模式";
-
-            LogLevel = AutoSaveParameterItem.Create("App.LogLevel", SCADA.CommonLib.LoggerHelper.LogLevel.All);
-
-            AutoCycle = AutoSaveParameterItem.Create("App.AutoCycle", false);
-            AutoCycle.DisplayName = "页面自动循环";
-
-            CycleTime = AutoSaveParameterItem.Create("App.CycleTime", 5);
-
-            CycleTime.IsEnableBinding = new System.Windows.Data.Binding("Value")
-            {
-                Source = AutoCycle
-            };
-            CycleTime.Unit = "秒";
 
             CurrentDataBase = AutoSaveParameterItem.Create("App.DataBaseConfig", new DatabaseSelector()
             { CurrentDataBaseConfig = "Default" });
@@ -158,13 +78,13 @@ namespace SCADA_DAQ
                             {
                                 ResourceName="Default",
                                 DBType = DatabaseType.Sqlite,
-                                FilePath = @"Data\QwPlatform.db"
+                                FilePath = @"Data\Platform.db"
                             },
                             new DataBaseConfig()
                             {
                                 ResourceName="AlarmDB",
                                 DBType = DatabaseType.Sqlite,
-                                FilePath = @"Data\QwPlatform.db"
+                                FilePath = @"Data\Platform.db"
                             },
                             new DataBaseConfig()
                             {
@@ -192,30 +112,9 @@ namespace SCADA_DAQ
                 selector.DataBaseConfig = config;
             }
 
-
-            DataExpireDay = AutoSaveParameterItem.Create($"App.DataExpireDay", 30);
-            DataExpireDay.DisplayName = "数据过期时间(天)";
-
-            ThemeName = AutoSaveParameterItem.Create("App.ThemeName", "Light");
-            ThemeName.StringType = StringType.IsLimited;
-            ThemeName.ShowButton = false;
-            ThemeName.ItemsSource = new Dictionary<string, string>
-                        {
-                            { "Light", "Light" }, { "Dark", "Dark" }
-                        };
-
-            ThemeColor = AutoSaveParameterItem.Create("App.ThemeColor", "Blue");
-            ThemeColor.StringType = StringType.IsLimited;
-            ThemeColor.ShowButton = false;
-
-
-            DeviceConfigFilePath = AutoSaveParameterItem.Create("DeviceConfigFilePath", "DeviceCfg.json");
-            DeviceConfigFilePath.StringType = StringType.IsFilePath;
-            DeviceConfigFilePath.DisplayName = "设备配置文件";
-
-            Language = AutoSaveParameterItem.Create("App.Language", "zh-cn");
-            Language.StringType = StringType.IsLimited;
-            Language.ItemsSource = new Dictionary<string, string>()
+            app.ThemeConfig.ThemeNameSrc = new List<string> { "Light", "Dark" };
+            app.ThemeConfig.ThemeColorSrc = new List<string>() { "Red", "Green", "Blue", "Purple", "Orange", "Lime", "Emerald", "Teal", "Cyan", "Cobalt", "Indigo", "Violet", "Pink", "Magenta", "Crimson", "Amber", "Yellow", "Brown", "Olive", "Steel", "Mauve", "Taupe", "Sienna" };
+            app.ThemeConfig.LanguageSrc = new Dictionary<string, string>()
             {
                 {"中文(简体)","zh-cn" },
                 {"中文(繁体)","zh-tw" },
@@ -226,26 +125,23 @@ namespace SCADA_DAQ
                 {"한국어","ko-kr" },
                 {"ภาษาไทย","th-th"}
             };
-
-            ThemeColor.PropertyChanged += Theme_PropertyChanged;
-            ThemeName.PropertyChanged += Theme_PropertyChanged;
-            if (Application.Current != null)
-            {
-                ThemeColor.ItemsSource = new List<string>() {
-                 "Red", "Green", "Blue", "Purple", "Orange", "Lime", "Emerald", "Teal", "Cyan", "Cobalt", "Indigo", "Violet", "Pink", "Magenta", "Crimson", "Amber", "Yellow", "Brown", "Olive", "Steel", "Mauve", "Taupe", "Sienna"
-                }.ToDictionary(t => t, t => t);
-            }
+            app.ThemeConfig.PropertyChanged += SystemConfig_PropertyChanged;
 
             bool neeRestDatabase = DataBaseNeedRest.Value;
 
             DAL = new DILDBV1(CurrentDbConfig.GetDB());
             CheckDataBase(DAL, CurrentDbConfig.NeedReset || DataBaseNeedRest.Value);
-            GlobalEnv.Instance.GlobalDB = DAL;
-            GlobalEnv.Instance.AlarmDB = new DILDBV1(AlarmDBConfig.GetDB());
-            CheckDataBase(GlobalEnv.Instance.AlarmDB as BaseDB, CurrentDbConfig.NeedReset || DataBaseNeedRest.Value);
-            GlobalEnv.Instance.LocalAppDB = new LocalDB.DIL.DILDBV1(SysDBConfig.GetDB());
-            CheckDataBase(GlobalEnv.Instance.LocalAppDB as BaseDB, CurrentDbConfig.NeedReset || DataBaseNeedRest.Value);
-
+            //GlobalEnv.Instance.GlobalDB = DAL;
+            //GlobalEnv.Instance.AlarmDB = new DILDBV1(AlarmDBConfig.GetDB());
+            //CheckDataBase(GlobalEnv.Instance.AlarmDB as BaseDB, CurrentDbConfig.NeedReset || DataBaseNeedRest.Value);
+            //GlobalEnv.Instance.LocalAppDB = new LocalDB.DIL.DILDBV1(SysDBConfig.GetDB());
+            //CheckDataBase(GlobalEnv.Instance.LocalAppDB as BaseDB, CurrentDbConfig.NeedReset || DataBaseNeedRest.Value);
+
+            app.RuntimeInfo.GlobalDB = DAL;
+            app.RuntimeInfo.AlarmDB = new DILDBV1(AlarmDBConfig.GetDB());
+            CheckDataBase(app.RuntimeInfo.AlarmDB as BaseDB, CurrentDbConfig.NeedReset || DataBaseNeedRest.Value);
+            app.RuntimeInfo.LocalAppDB = new LocalDB.DIL.DILDBV1(SysDBConfig.GetDB());
+            CheckDataBase(app.RuntimeInfo.LocalAppDB as BaseDB, CurrentDbConfig.NeedReset || DataBaseNeedRest.Value);
 
             NewUser = new User(DAL)
             {
@@ -282,21 +178,32 @@ namespace SCADA_DAQ
                     }
                 }
             };
-            GlobalEnv.Instance.User = NewUser;
-            Language.PropertyChanged += Language_PropertyChanged;
+            app.RuntimeInfo.User = NewUser;
             EnvInitFinish = true;
         }
 
-        static Env()
+        private static void SystemConfig_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
         {
-            //XmlUserConfig.Create();
+            if (e.PropertyName == nameof(ThemeConfig.Language))
+            {
+                SetLanguage();
+            }
+            else if (e.PropertyName == nameof(ThemeConfig.ThemeColors) || e.PropertyName == nameof(ThemeConfig.ThemeName))
+            {
+                SetTheme();
+            }
+            else if (e.PropertyName == nameof(ThemeConfig.FontName) || e.PropertyName == nameof(ThemeConfig.FontSize) || e.PropertyName == nameof(ThemeConfig.FontWeight))
+            {
+                SetFont();
+            }
         }
 
-        private static void Language_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+        static Env()
         {
-            SetLanguage();
+
         }
 
+
         public static void SetLanguage()
         {
             try
@@ -306,12 +213,34 @@ namespace SCADA_DAQ
                 {
                     dictionaryList.Add(dictionary);
                 }
-                string requestedCulture = $@"{Language.Value}.xaml";
-                ResourceDictionary resourceDictionary = dictionaryList.FirstOrDefault(d => d?.Source?.Segments.Last() == requestedCulture);
+                string requestedCulture = $@"{(Application.Current as IApp).ThemeConfig.Language}.xaml";
+                ResourceDictionary resourceDictionary = null;
+                ResourceDictionary defaultLanguage = null;
+                foreach (var item in dictionaryList)
+                {
+                    try
+                    {
+                        if (item.Source == null) continue;
+                        if (item.Source.Segments.LastOrDefault() == requestedCulture)
+                        {
+                            resourceDictionary = item;
+                        }
+
+                        if (item.Source.Segments.LastOrDefault() == "zh-cn.xaml")
+                        {
+                            defaultLanguage = item;
+                        }
+                    }
+                    catch (Exception)
+                    {
+
+                    }
+                }
+                if (requestedCulture == null) return;
                 Application.Current.Resources.MergedDictionaries.Remove(resourceDictionary);
                 Application.Current.Resources.MergedDictionaries.Add(resourceDictionary);
                 LanguageHelper.CurrentLanguageDictionary = resourceDictionary;
-                LanguageHelper.DefaultLanguageDictionary = dictionaryList.FirstOrDefault(d => d?.Source?.Segments.Last() == @"zh-cn.xaml");
+                LanguageHelper.DefaultLanguageDictionary = defaultLanguage;
             }
             catch (Exception ex)
             {
@@ -328,7 +257,8 @@ namespace SCADA_DAQ
         {
             try
             {
-                ThemeManager.Current.ChangeTheme(Application.Current, $"{ThemeName.Value}.{ThemeColor.Value}");
+                var themeConfig = (Application.Current as IApp).ThemeConfig;
+                ThemeManager.Current.ChangeTheme(Application.Current, $"{themeConfig.ThemeName}.{themeConfig.ThemeColors}");
             }
             catch (Exception ex)
             {
@@ -338,13 +268,10 @@ namespace SCADA_DAQ
 
         public static void SetFont()
         {
-            AutoSaveParameterItem<string> DefaultFont = AutoSaveParameterItem.Create("App.DefaultFont", "Microsoft YaHei UI");
-            AutoSaveParameterItem<double> DefaultFontSize = AutoSaveParameterItem.Create("App.DefaultFontSize", 14d);
-            AutoSaveParameterItem<int> DefaultFontWeight = AutoSaveParameterItem.Create("App.DefaultFontWeight", 400);
-
-            Application.Current.Resources["DefaultFontWeight"] = FontWeight.FromOpenTypeWeight(DefaultFontWeight.Value);
-            Application.Current.Resources["DefaultFontSize"] = DefaultFontSize.Value;
-            Application.Current.Resources["DefaultFont"] = new FontFamily(DefaultFont.Value);
+            var app = (Application.Current as IApp);
+            Application.Current.Resources["DefaultFontWeight"] = FontWeight.FromOpenTypeWeight(app.ThemeConfig.FontWeight);
+            Application.Current.Resources["DefaultFontSize"] = app.ThemeConfig.FontSize;
+            Application.Current.Resources["DefaultFont"] = new FontFamily(app.ThemeConfig.FontName);
         }
 
 

+ 2 - 2
SCADA_DAQ/LocalResource.Designer.cs

@@ -73,9 +73,9 @@ namespace SCADA_DAQ {
         /// <summary>
         ///   查找 System.Byte[] 类型的本地化资源。
         /// </summary>
-        internal static byte[] QwPlatform {
+        internal static byte[] Platform {
             get {
-                object obj = ResourceManager.GetObject("QwPlatform", resourceCulture);
+                object obj = ResourceManager.GetObject("Platform", resourceCulture);
                 return ((byte[])(obj));
             }
         }

+ 2 - 2
SCADA_DAQ/LocalResource.resx

@@ -121,7 +121,7 @@
   <data name="LocalApp" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>data\localapp.zip;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
-  <data name="QwPlatform" type="System.Resources.ResXFileRef, System.Windows.Forms">
-    <value>data\qwplatform.zip;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  <data name="Platform" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>Data\Platform.zip;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </data>
 </root>

+ 64 - 21
SCADA_DAQ/ServiceHost.cs

@@ -1,5 +1,4 @@
 using LocalDB.DBModel;
-using LocalDB.DBNames;
 using log4net;
 using SCADA.CommonLib;
 using SCADA.CommonLib.Data.DIL;
@@ -23,13 +22,19 @@ namespace SCADA_DAQ
         /// <summary>
         /// 
         /// </summary>
-        readonly ILog log = SCADA.CommonLib.LoggerHelper.Logger.CreatLogger(typeof(ServiceHost));
-
+        public IApp AppRuntime { get; set; }
         /// <summary>
         /// 
         /// </summary>
+        readonly ILog log = SCADA.CommonLib.LoggerHelper.Logger.CreateLogger(typeof(ServiceHost));
+
+        /// <summary> 已经加载的服务器集合
+        /// </summary>
         public ConcurrentDictionary<string, IService> ServiceCollection { get; private set; } = new ConcurrentDictionary<string, IService>();
 
+        /// <summary> 可选服务类型
+        /// </summary>
+        public Dictionary<string, Type> ServiceTypes { get; private set; } = new Dictionary<string, Type>();
         /// <summary>
         /// 
         /// </summary>
@@ -69,6 +74,16 @@ namespace SCADA_DAQ
 
         private ITable serviceTable { get; set; }
 
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="app"></param>
+        /// <returns></returns>
+        public bool Start(IApp app)
+        {
+            AppRuntime = app;
+            return Start();
+        }
         /// <summary>
         /// 
         /// </summary>
@@ -79,10 +94,9 @@ namespace SCADA_DAQ
             {
                 RpcService.GetInstance().Regiseter(this);
                 var serviceTasks = new List<Task>() { };
-                serviceTable = GlobalEnv.Instance.LocalAppDB?.GetValueByPath("Sys_Service", true) as ITable;
+                serviceTable = AppRuntime.RuntimeInfo.LocalAppDB?.GetValueByPath("Sys_Service", true) as ITable;
                 var services = DataTableHelper.DtToList<Sys_Service>(serviceTable.GetData())?.OrderBy(t => t.StartSquence_Int);
-                var serviceTypes = PlugInServer.Instance.GetTypes<IService>(Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase.Replace("file:///", ""))).ToDictionary(t => t.FullName, t => t);
-                var updateItems = new ConcurrentBag<Tuple<UpdateItem[], UpdateItem[]>>();
+                ServiceTypes = GetPluginTypes<IService>().ToDictionary(t => t.FullName, t => t);
                 if (services == null) return false;
                 foreach (var item in services)
                 {
@@ -91,7 +105,7 @@ namespace SCADA_DAQ
                         var exMsg = "";
                         var serviceState = "";
                         var startTime = DateTime.Now;
-                        if (serviceTypes.ContainsKey(item.ServiceType_Str))
+                        if (ServiceTypes.ContainsKey(item.ServiceType_Str))
                         {
                             var task = Task.Factory.StartNew(() =>
                             {
@@ -102,7 +116,7 @@ namespace SCADA_DAQ
                                     log.Debug($"服务ID:{item.ID} ,类型:{item.ServiceType_Str} 开始启动");
                                     st = new System.Diagnostics.Stopwatch();
                                     st.Start();
-                                    var type = serviceTypes[item.ServiceType_Str];
+                                    var type = ServiceTypes[item.ServiceType_Str];
 
                                     var constructorInfoArray = type.GetConstructors(BindingFlags.Instance
                                                                                   | BindingFlags.NonPublic
@@ -128,6 +142,7 @@ namespace SCADA_DAQ
                                         service.ServiceConfig = (ObservableObject)JsonHelper.JsonDeserialize(item.ServiceConfig_Str, service.ConfigType) ??
                                         (ObservableObject)Activator.CreateInstance(service.ConfigType);
                                     }
+                                    service.AppRuntime = AppRuntime;
                                     service.ServiceId = item.ID.ToString();
                                     service.ServiceName = item.ServiceName_Str;
                                     service.Start();
@@ -163,20 +178,16 @@ namespace SCADA_DAQ
                         {
                             serviceState = "启动失败";
                         }
-
-                        updateItems.Add(new Tuple<UpdateItem[], UpdateItem[]>(
-                            new UpdateItem[] { new UpdateItem(T_Col_Name.Sys_Service.ID, item.ID) },
-                            new UpdateItem[] {
-                                                    new UpdateItem(T_Col_Name.Sys_Service.ServiceState_Str, serviceState),
-                                                    new UpdateItem(T_Col_Name.Sys_Service.StartTime_Dt, startTime),
-                                                    new UpdateItem(T_Col_Name.Sys_Service.ServiceMessage_Str, exMsg)}
-                                            ));
+                        item.ServiceState_Str = serviceState;
+                        item.StartTime_Dt = startTime;
+                        item.ServiceMessage_Str = exMsg;
                     }
                 }
                 Task.WaitAll(serviceTasks.ToArray());
-                serviceTable.Update(
-                updateItems.Select(t => t.Item1).ToList(),
-                updateItems.Select(t => t.Item2).ToList());
+                (serviceTable as BaseTable).Update(
+                    services, t => new { t.ID },
+                    t => new { t.ServiceState_Str, t.StartTime_Dt, t.ServiceMessage_Str });
+
                 return true;
             }
             catch (Exception ex)
@@ -194,7 +205,7 @@ namespace SCADA_DAQ
         {
             try
             {
-#if WINDOWS  || NETFRAMEWORK
+#if WINDOWS || NETFRAMEWORK
                 Microsoft.Win32.RegistryKey registryRoot = Microsoft.Win32.Registry.LocalMachine;
                 string[] path = new string[] { "SYSTEM", "CurrentControlSet", "Control", "Terminal Server", "" };
                 foreach (string p in path)
@@ -207,7 +218,6 @@ namespace SCADA_DAQ
                     return (int)registryRoot.GetValue("fDenyTSConnections") == 0;
                 }
 #endif
-
             }
             catch (Exception)
             {
@@ -293,6 +303,39 @@ namespace SCADA_DAQ
             return true;
         }
 
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <returns></returns>
+        public List<Type> GetPluginTypes<T>()
+        {
+            return GetPluginTypes<T>(Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase
+                                .Replace("file:///", "")));
+        }
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <returns></returns>
+        public List<Type> GetPluginTypes<T>(string basePath)
+        {
+            var typeList = new List<Type>();
+            var assemblys = new List<Assembly>();
+            if (Assembly.GetEntryAssembly() != null)
+            {
+                assemblys.Add(Assembly.GetEntryAssembly());
+            }
+            assemblys.Add(Assembly.GetEntryAssembly());
+            var currentPath = string.IsNullOrEmpty(basePath) ? AppDomain.CurrentDomain.BaseDirectory : basePath;
+            var files = new DirectoryInfo(currentPath).GetFiles(@"SCADA_DAQ.Plugin.*.dll");
+
+            var pluginFiles = Directory.CreateDirectory($"{currentPath}\\plugin")
+                 .GetFiles(@"SCADA_DAQ.Plugin.*.dll");
+
+            return ReflectionHelper.GetTypes<T>(files.Concat(pluginFiles).ToLookup(t => t.Name).Select(t => t.FirstOrDefault().FullName));
+        }
+
         #region Web接口
         private List<Sys_Service> QueryServiceInfo()
         {

+ 41 - 36
SCADA_DAQ/SystemControl.cs

@@ -3,6 +3,7 @@ using DBNames;
 using log4net;
 using SCADA.CommonLib;
 using SCADA.CommonLib.Helper;
+using SCADA.CommonLib.License;
 using SCADA_DAQ.Plugin.Core;
 using SCADA_DAQ.Plugin.Core.License;
 using SCADA_DAQ.Plugin.CoreUI;
@@ -46,13 +47,13 @@ namespace SCADA_DAQ
             PowerOnTime = DateTime.Now;
             SoftWareId = MD5Helper.GetFileMD5(GetType().Assembly.Location);
             UidVersion = $"{ApplicationHelper.GetAppVersion()}.{Convert.ToUInt16(SoftWareId.Substring(0, 3), 16):D4}";
-            app.UidVersion = UidVersion;
+            app.RuntimeInfo.UidVersion = UidVersion;
             initTask = Task.Factory.StartNew(() =>
             {
                 bool createdNew = true;
-                if (Env.SingleModel.Value == true)
+                if (app.SystemConfig.SingleModel == true)
                 {
-                    evh = new EventWaitHandle(false, EventResetMode.AutoReset, App.ProductId, out createdNew);
+                    evh = new EventWaitHandle(false, EventResetMode.AutoReset, App.RuntimeInfo.ProductId, out createdNew);
                     var currentProcess = Process.GetCurrentProcess();
                     var ps = Process.GetProcessesByName(
                         Path.GetFileNameWithoutExtension(Assembly.GetEntryAssembly().ManifestModule.Name))
@@ -88,7 +89,7 @@ namespace SCADA_DAQ
                 }
 
                 Console.WriteLine($"开始获取电脑ID  {DateTime.Now:yyyy-MM-dd HH:mm:ss.fff}");
-                LicenseManage.GenerateID(App.ProductId, out var str);
+                LicenseManage.GenerateID(App.RuntimeInfo.ProductId, out var str);
                 Console.WriteLine($"检查释放系统组件  {DateTime.Now:yyyy-MM-dd HH:mm:ss.fff}");
                 ReleaseRunTime();
                 try
@@ -111,10 +112,10 @@ namespace SCADA_DAQ
                     Env.Schedual.Classes.Add(new WorkShift(new TimeSpan(7, 30, 0), new TimeSpan(19, 30, 0), "白班"));
                     Env.Schedual.Classes.Add(new WorkShift(new TimeSpan(19, 30, 0), new TimeSpan(7, 30, 0), "夜班"));
                 }
-                Plugin.CoreUI.SystemApp.SystemStatictics.AppStart();
                 CreateBackGroundTask(ReportOnLine, 10 * 1000 * 60, 10 * 1000, true, "ReportAppInfo");
-                CreateBackGroundTask(Plugin.CoreUI.SystemApp.SystemStatictics.UpdateLastOnLineTime, 1 * 1000 * 60, 10 * 1000, true, "UpdateLastTime");
-                CreateBackGroundTask(Plugin.CoreUI.SystemApp.SystemStatictics.StatisticsRunTime, 30 * 1000, 15 * 1000, true, "StatisticsRunTime");
+                var systemStatics = Plugin.CoreUI.SystemApp.SystemStatictics.Create();
+                systemStatics.AppRuntime = App;
+                systemStatics.Start();
             });
 
             initServer = Task.Factory.StartNew(() =>
@@ -152,15 +153,16 @@ namespace SCADA_DAQ
             {
                 Task.WaitAll(initTask);
                 if (isShutDown) return;
-                var st = new System.Diagnostics.Stopwatch();
+                var st = new Stopwatch();
                 st.Start();
+                EicpCoreManage.AppRuntime = App;
                 host = ServiceHost.Instance;
-                host.Start();
                 (App as IApp).ServiceHost = host;
+                host.Start(App);
                 try
                 {
-                    Env.StartTime = DateTime.Now;
-                    Log = SCADA.CommonLib.LoggerHelper.Logger.CreatLogger(typeof(App));
+                    App.RuntimeInfo.StartTime = DateTime.Now;
+                    Log = SCADA.CommonLib.LoggerHelper.Logger.CreateLogger(typeof(App));
                     Dictionary<SCADA.CommonLib.LoggerHelper.LogLevel, log4net.Core.Level> logLevel =
                     new Dictionary<SCADA.CommonLib.LoggerHelper.LogLevel, log4net.Core.Level>()
                     {
@@ -172,8 +174,8 @@ namespace SCADA_DAQ
                         { SCADA.CommonLib.LoggerHelper.LogLevel.Fatal,log4net.Core.Level.Fatal},
                         { SCADA.CommonLib.LoggerHelper.LogLevel.None,log4net.Core.Level.Off},
                     };
-                    LogManager.GetRepository().Threshold = logLevel[Env.LogLevel.Value];
-                    Log.Info($"App {App.ProductId} ({UidVersion}) is starting ……");
+                    LogManager.GetRepository().Threshold = logLevel[App.SystemConfig.LogLevel];
+                    Log.Info($"App {App.RuntimeInfo.ProductId} ({UidVersion}) is starting ……");
                     Task.WaitAll(initServer);
                     Console.WriteLine($"系统初始化完成 {DateTime.Now:yyyy-MM-dd HH:mm:ss,fff}");
                     Func<bool> action = null;
@@ -185,7 +187,7 @@ namespace SCADA_DAQ
                             action = window.GetLicense;
                         }
                     }));
-                    if (!LicenseManage.CheckID(App.ProductId, out var str, action))
+                    if (!LicenseManage.CheckID(App as IApp, out var str, action))
                     {
                         App.Dispatcher.Invoke(new Action(() =>
                         {
@@ -196,14 +198,15 @@ namespace SCADA_DAQ
                     }
                     else
                     {
-                        Env.LicenseInfo = LicenseManage.GetLicenseInfo(App.ProductId);
+                        App.RuntimeInfo.LicenseInfo = LicenseManage.GetLicenseInfo(App.RuntimeInfo.ProductId);
                     }
-                    Env.ComputerId.Value = Env.LicenseInfo.Computer.ComputerId;
+                    App.RuntimeInfo.ComputerId = App.RuntimeInfo.LicenseInfo.Computer.ComputerId;
+
                     App.Dispatcher.Invoke(new Action(() =>
                     {
                         if (App.MainWindow is MainWindow window)
                         {
-                            window.LicenseInfo = Env.LicenseInfo;
+                            window.LicenseInfo = App.RuntimeInfo.LicenseInfo;
                             Log.Debug($"系统初始化完成,即将开启");
                             Env.SetLanguage();
                             window.SystemInited();
@@ -246,15 +249,15 @@ namespace SCADA_DAQ
         /// </summary>
         internal void LoadLicense()
         {
-            Env.LicenseInfo = LicenseManage.GetLicenseInfo(App.ProductId);
-            if (isShutDown) return;
+            App.RuntimeInfo.LicenseInfo = LicenseManage.GetLicenseInfo(App.RuntimeInfo.ProductId);
+            if (isShutDown || App.RuntimeInfo.LicenseInfo == null) return;
             if (!App.Dispatcher.HasShutdownStarted)
             {
                 App.Dispatcher.Invoke(new Action(() =>
                 {
                     if (App.MainWindow is MainWindow window)
                     {
-                        window.MainWindowViewModel.CopyRightInfo = $"{Env.AuthorInfo.Value}({Env.LicenseInfo.LicenseType})";
+                        window.MainWindowViewModel.CopyRightInfo = $"{App.SystemConfig.AuthorInfo}({App.RuntimeInfo.LicenseInfo.LicenseType})";
                     }
                 }));
                 ReportAppInfo(true);
@@ -274,19 +277,19 @@ namespace SCADA_DAQ
 
         private void ReportAppInfo(bool isOnline = true)
         {
-            if (Env.LicenseInfo != null && (Env.LicenseInfo.LicenseType == LicenseType.TempLicense || Env.LicenseInfo.LicenseType == LicenseType.Permanentlicense))
+            if (App.RuntimeInfo.LicenseInfo != null && (App.RuntimeInfo.LicenseInfo.LicenseType == LicenseType.TempLicense || App.RuntimeInfo.LicenseInfo.LicenseType == LicenseType.Permanentlicense))
             {
                 var reportInfo = new
                 {
-                    SessionID = App.SessionId,
-                    AppName = Env.LicenseInfo?.AppName,
+                    SessionID = App.RuntimeInfo.SessionId,
+                    AppName = App.RuntimeInfo.LicenseInfo?.AppName,
                     Version = UidVersion,
-                    CustomerTag = Env.ComputerTag.Value,
-                    ComputerId = Env.LicenseInfo?.Computer.ComputerId,
-                    LicenseId = Env.LicenseInfo?.LicenseId,
-                    LicenseType = Env.LicenseInfo?.LicenseType.ToString(),
-                    ActiveTime = Env.LicenseInfo?.ActiveTime,
-                    ExpireDate = Env.LicenseInfo?.ActiveTime.AddDays(Env.LicenseInfo.ExpireDays),
+                    CustomerTag = App.SystemConfig.ComputerTag,
+                    ComputerId = App.RuntimeInfo.LicenseInfo?.Computer.ComputerId,
+                    LicenseId = App.RuntimeInfo.LicenseInfo?.LicenseId,
+                    LicenseType = App.RuntimeInfo.LicenseInfo?.LicenseType.ToString(),
+                    ActiveTime = App.RuntimeInfo.LicenseInfo?.ActiveTime,
+                    ExpireDate = App.RuntimeInfo.LicenseInfo?.ActiveTime.AddDays(App.RuntimeInfo.LicenseInfo.ExpireDays),
                     TotalOutputPcs = Env.TotalOutputPcs.Value,
                     TotalOutputQty = Env.TotalOutputQty.Value,
                     IsOnline = isOnline
@@ -294,7 +297,7 @@ namespace SCADA_DAQ
                 if (EicpCoreManage.ReportAppInfo(reportInfo, out var appName))
                 {
                     lastReportSuccessTime = DateTime.Now;
-                    Env.ComputerTag.Value = appName;
+                    App.SystemConfig.ComputerTag = appName;
                 }
             }
         }
@@ -302,16 +305,18 @@ namespace SCADA_DAQ
         private void FalatReport(Exception exception)
         {
             if (isShutDown) return;
-            if (Env.LicenseInfo != null && (Env.LicenseInfo.LicenseType == LicenseType.TempLicense || Env.LicenseInfo.LicenseType == LicenseType.Permanentlicense))
+            if (App.RuntimeInfo.LicenseInfo != null &&
+                (App.RuntimeInfo.LicenseInfo.LicenseType == LicenseType.TempLicense ||
+                App.RuntimeInfo.LicenseInfo.LicenseType == LicenseType.Permanentlicense))
             {
                 try
                 {
                     EicpCoreManage.FalatReport(new
                     {
-                        SessionID = App.SessionId,
-                        AppName = Env.LicenseInfo?.AppName,
+                        SessionID = App.RuntimeInfo.SessionId,
+                        AppName = App.RuntimeInfo.LicenseInfo?.AppName,
                         Version = UidVersion,
-                        ComputerId = Env.LicenseInfo?.Computer?.ComputerId,
+                        ComputerId = App.RuntimeInfo.LicenseInfo?.Computer?.ComputerId,
                         SoftwareID = SoftWareId,
                         Customer = System.Windows.Forms.Application.CompanyName,
                         Message = exception.Message,
@@ -397,7 +402,7 @@ namespace SCADA_DAQ
 
         private void ExitHandler(string exitMsg)
         {
-            Plugin.CoreUI.SystemApp.SystemStatictics.AppExit(exitMsg);
+            Plugin.CoreUI.SystemApp.SystemStatictics.Create().AppExit(exitMsg);
             ReportAppInfo(false);
         }
 
@@ -424,7 +429,7 @@ namespace SCADA_DAQ
             ExitHandler(exitReason);
             if (Log != null)
             {
-                Log.Info($"{App.ProductId}({UidVersion}) is shutdown by {exitReason}");
+                Log.Info($"{App.RuntimeInfo.ProductId}({UidVersion}) is shutdown by {exitReason}");
                 SCADA.CommonLib.LoggerHelper.Logger.Dispose();
             }
         }