6 Commits 3804ecfc01 ... 57ef75027a

Author SHA1 Message Date
  莫海杰 57ef75027a TIJIAO 2 weeks ago
  莫海杰 8c0bfeb3bc Merge branch 'master' into 71博创自动立库 1 month ago
  肖奇伟 d8860a6e62 升级库 1 month ago
  肖奇伟 bb9e8503b2 更新库 1 month ago
  肖奇伟 b2594025f1 更新库 1 month ago
  肖奇伟 9e0518a040 升级库 1 month ago

BIN
Lib/SCADA.CommonCtrl.dll


+ 197 - 7
Lib/SCADA.CommonLib.xml

@@ -580,6 +580,19 @@
             <param name="isEncrypt">是否加密</param>
             <returns></returns>
         </member>
+        <member name="M:SCADA.CommonLib.AutoSaveParameterItem.Create``1(System.String,``0,System.String,System.String,System.Windows.Data.Binding,System.Boolean)">
+            <summary>
+            创建一个自动保存参数的对象
+            </summary>
+            <typeparam name="T"></typeparam>
+            <param name="parameterName">参数名称</param>
+            <param name="defaulValue">默认值</param>
+            <param name="displayName">显示名称</param>
+            <param name="isEnableBinding">使能绑定</param>
+            <param name="unit">单位</param>
+            <param name="isEncrypt">是否加密</param>
+            <returns></returns>
+        </member>
         <member name="P:SCADA.CommonLib.AutoSaveParameterItem.ParameterPath">
             <summary>
             参数在文件中的保存位置
@@ -6409,6 +6422,96 @@
             </summary>
             <param name="eventData"></param>
         </member>
+        <member name="T:SCADA.CommonLib.EventBus.EventBus">
+            <summary>
+            事件总线
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.EventBus.EventBus.IocContainer">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="P:SCADA.CommonLib.EventBus.EventBus.Default">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="M:SCADA.CommonLib.EventBus.EventBus.#ctor">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="M:SCADA.CommonLib.EventBus.EventBus.Register``1(SCADA.CommonLib.EventBus.IEventHandler)">
+            <summary>
+            手动绑定事件源与事件处理
+            </summary>
+            <typeparam name="TEventData"></typeparam>
+            <param name="eventHandler"></param>
+        </member>
+        <member name="M:SCADA.CommonLib.EventBus.EventBus.Register``1(System.Action{``0})">
+            <summary>
+            注册Action事件处理器
+            </summary>
+            <typeparam name="TEventData"></typeparam>
+            <param name="action"></param>
+        </member>
+        <member name="M:SCADA.CommonLib.EventBus.EventBus.Register(System.Type,System.Type)">
+            <summary>
+            手动绑定事件源与事件处理
+            </summary>
+            <param name="eventType"></param>
+            <param name="handlerType"></param>
+        </member>
+        <member name="M:SCADA.CommonLib.EventBus.EventBus.RegisterAllEventHandlerFromAssembly(System.Reflection.Assembly)">
+            <summary>
+            提供入口支持注册其它程序集中实现的IEventHandler
+            </summary>
+            <param name="assembly"></param>
+        </member>
+        <member name="M:SCADA.CommonLib.EventBus.EventBus.UnRegister``1(System.Type)">
+            <summary>
+            手动解除事件源与事件处理的绑定
+            </summary>
+            <typeparam name="TEventData"></typeparam>
+            <param name="handlerType"></param>
+        </member>
+        <member name="M:SCADA.CommonLib.EventBus.EventBus.UnRegisterAll``1">
+            <summary>
+            卸载指定事件源上绑定的所有事件
+            </summary>
+            <typeparam name="TEventData"></typeparam>
+        </member>
+        <member name="M:SCADA.CommonLib.EventBus.EventBus.Trigger``1(``0)">
+            <summary>
+            根据事件源触发绑定的事件处理
+            </summary>
+            <typeparam name="TEventData"></typeparam>
+            <param name="eventData"></param>
+        </member>
+        <member name="M:SCADA.CommonLib.EventBus.EventBus.Trigger``1(System.Type,``0)">
+            <summary>
+            触发指定EventHandler
+            </summary>
+            <param name="eventHandlerType"></param>
+            <param name="eventData"></param>
+        </member>
+        <member name="M:SCADA.CommonLib.EventBus.EventBus.TriggerAsync``1(``0)">
+            <summary>
+            异步触发
+            </summary>
+            <typeparam name="TEventData"></typeparam>
+            <param name="eventData"></param>
+            <returns></returns>
+        </member>
+        <member name="M:SCADA.CommonLib.EventBus.EventBus.TriggerAsycn``1(System.Type,``0)">
+            <summary>
+            异步触发指定EventHandler
+            </summary>
+            <param name="eventHandlerType"></param>
+            <param name="eventData"></param>
+            <returns></returns>
+        </member>
         <member name="T:SCADA.CommonLib.EventBus.IEventBus">
             <summary>
             
@@ -6900,6 +7003,42 @@
             
             </summary>
         </member>
+        <member name="T:SCADA.CommonLib.Helper.BartenderHelper">
+            <summary>
+            bartender 标签打印帮助类
+            </summary>
+        </member>
+        <member name="M:SCADA.CommonLib.Helper.BartenderHelper.GetPrintPreviewImage``1(``0,System.String,System.String,System.Boolean,System.Collections.Generic.Dictionary{System.String,System.String})">
+            <summary>
+            
+            </summary>
+            <typeparam name="T"></typeparam>
+            <param name="obj"></param>
+            <param name="templetPath"></param>
+            <param name="imageFilePath"></param>
+            <param name="autoMapper"></param>
+            <param name="mapping"></param>
+        </member>
+        <member name="M:SCADA.CommonLib.Helper.BartenderHelper.Print(System.Collections.Generic.Dictionary{System.String,System.String},System.String,System.String)">
+            <summary>
+            以键值对方式打印标签,key为标签中的数据标签
+            </summary>
+            <param name="printValues"></param>
+            <param name="templetPath"></param>
+            <param name="printer"></param>
+            <returns></returns>
+        </member>
+        <member name="M:SCADA.CommonLib.Helper.BartenderHelper.Print``1(``0,System.String,System.String,System.Boolean,System.Collections.Generic.Dictionary{System.String,System.String})">
+            <summary>
+            
+            </summary>
+            <typeparam name="T"></typeparam>
+            <param name="obj"></param>
+            <param name="templetPath"></param>
+            <param name="printer"></param>
+            <param name="autoMapper"></param>
+            <param name="mapping"></param>
+        </member>
         <member name="T:SCADA.CommonLib.Helper.BeepHelper">
             <summary>
             控制蜂鸣器
@@ -7197,6 +7336,39 @@
             <param name="type"></param>
             <returns></returns>
         </member>
+        <member name="T:SCADA.CommonLib.Helper.ColorHelper">
+            <summary>
+            
+            </summary>
+        </member>
+        <member name="M:SCADA.CommonLib.Helper.ColorHelper.ColorToHexString(System.Windows.Media.Color)">
+            <summary>
+            将ARGB颜色转换成16进制字符
+            </summary>
+            <param name="color">Color 类型的 ARGB颜色</param>
+            <returns>返回string 16进制的ARGB颜色</returns>
+        </member>
+        <member name="M:SCADA.CommonLib.Helper.ColorHelper.HexStringToColor(System.String)">
+            <summary>
+            将16进制类型的ARGB颜色 转换成 Color 类型
+            </summary>
+            <param name="strcolor">string类型的16进制ARGB颜色,00FF0000</param>
+            <returns>返回 Color 类型的ARGB颜色</returns>
+        </member>
+        <member name="M:SCADA.CommonLib.Helper.ColorHelper.ColorToArgbString(System.Windows.Media.Color)">
+            <summary>
+            将ARGB颜色转换成string
+            </summary>
+            <param name="color">Color 类型的 ARGB颜色</param>
+            <returns>返回string类型的ARGB颜色</returns>
+        </member>
+        <member name="M:SCADA.CommonLib.Helper.ColorHelper.ArgbStringToColor(System.String)">
+            <summary>
+            将string类型的ARGB颜色 转换成 Color 类型
+            </summary>
+            <param name="strcolor">string类型的ARGB颜色,以逗号分隔。如:255,255,128,255</param>
+            <returns>返回 Color 类型的ARGB颜色</returns>
+        </member>
         <member name="T:SCADA.CommonLib.Helper.ConvertEx">
             <summary>
             
@@ -8082,6 +8254,13 @@
             <param name="obj"></param>
             <returns></returns>
         </member>
+        <member name="M:SCADA.CommonLib.Helper.JsonHelper.IsJsonString(System.String)">
+            <summary>
+            判断字符串是Json
+            </summary>
+            <param name="str"></param>
+            <returns></returns>
+        </member>
         <member name="M:SCADA.CommonLib.Helper.JsonHelper.JsonDeserialize``1(System.String)">
             <summary>
             JSON反序列化
@@ -8119,13 +8298,6 @@
             <param name="type"></param>
             <returns></returns>
         </member>
-        <member name="M:SCADA.CommonLib.Helper.JsonHelper.IsJsonString(System.String)">
-            <summary>
-            判断字符串是Json
-            </summary>
-            <param name="str"></param>
-            <returns></returns>
-        </member>
         <member name="T:SCADA.CommonLib.Helper.WhereBuilder">
             <summary>
             Generating SQL from expression trees, Part 2
@@ -9017,6 +9189,19 @@
             </summary>
             <param name="random">随机数填充</param>
         </member>
+        <member name="M:SCADA.CommonLib.Helper.ReflectionHelper.SetBindingValue(System.Windows.Data.Binding,System.Object)">
+            <summary>
+            
+            </summary>
+            <param name="binding"></param>
+            <param name="value"></param>
+        </member>
+        <member name="M:SCADA.CommonLib.Helper.ReflectionHelper.GetBindingValue(System.Windows.Data.Binding)">
+            <summary>
+            
+            </summary>
+            <param name="binding"></param>
+        </member>
         <member name="M:SCADA.CommonLib.Helper.ReflectionHelper.InvokeMatchPara(System.Reflection.MethodInfo,System.Object,System.Object)">
             <summary>
             自动匹配执行参数
@@ -11498,6 +11683,11 @@
             
             </summary>
         </member>
+        <member name="P:SCADA.CommonLib.Context.HttpContext">
+            <summary>
+            Http 上下文
+            </summary>
+        </member>
         <member name="T:SCADA.CommonLib.RpcPara">
             <summary>
             远程调用参数

BIN
Lib/SCADA.dll


+ 0 - 7
Lib/SCADA.xml

@@ -3949,13 +3949,6 @@
             <param name="port"></param>
             <returns></returns>
         </member>
-        <member name="M:SCADA.Comm.TcpServer.GetSocket(System.String)">
-            <summary>
-            
-            </summary>
-            <param name="sessionId"></param>
-            <returns></returns>
-        </member>
         <member name="M:SCADA.Comm.TcpServer.Dispose">
             <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


+ 23 - 30
SCADA_DAQ/Customer/Machines/SampleMachine_ScanCompleted.cs

@@ -1,23 +1,13 @@
 using DBNames;
-using Mysqlx;
-using NPOI.SS.Formula.Functions;
 using SCADA;
 using SCADA.CommonLib.Data.DIL;
-using SCADA.CommonLib.Helper;
-using SCADA.Drive;
 using SCADA_DAQ.Customer.Models;
 using SCADA_DAQ.Customer.Utils;
 using SCADA_DAQ.Plugin.Machine;
-using SCADA_DAQ.Plugin.Machine.Device;
-using SCADA_DAQ.Plugin.Machine.HDAConfig;
 using System;
-using System.Collections.Generic;
 using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-using static Mysqlx.Expect.Open.Types;
 using static SCADA_DAQ.Customer.CustomerEnv;
+using SCADA.Comm;
 
 namespace SCADA_DAQ.Customer.Machines
 {
@@ -32,10 +22,13 @@ namespace SCADA_DAQ.Customer.Machines
         {
             if (RedundancyService?.RedundancyState == RedundancyStates.Standby) { return; }  //如果是待机模式就不执行下面的逻辑
             base.ScanCompleted(sender, e);
-            if (BaseDevice.DeviceID.StartsWith("输送线"))
+            if (BaseDevice.DeviceID.StartsWith("显示屏"))
             {
                 // 写入显示屏
                 WriteScreen();
+            }
+            if (BaseDevice.DeviceID.StartsWith("输送线"))
+            {
 
                 #region 按输送线按钮回原位
                 bool lowThenUpShelf(OperationBo ltuOperation)
@@ -249,56 +242,56 @@ namespace SCADA_DAQ.Customer.Machines
         private void WriteScreen()
         {
             var screen1 = MachineServer.GetInstance().GetMachine<SampleMachine>("显示屏1");
-            if (screen1?.GetListenReg("ScreenRow1") != null && CurrentOperationLine1 != null)
+            if (screen1?.ConnectState ==ConnectStates.Connected && CurrentOperationLine1 != null)
             {
                 var rcl = CurrentOperationLine1.RowColLayerFormat();
                 screen1?.GetListenReg("ScreenRow1").WriteReg($"       {rcl}");
-                screen1?.GetListenReg("ScreenRow2").WriteReg(CurrentOperationLine1.ItemName);
+                screen1?.GetListenReg("ScreenRow2").WriteReg(CurrentOperationLine1.ItemName ?? "        输送线1");
             }
-            if (screen1?.GetListenReg("ScreenRow1") != null && CurrentOperationLine1 == null)
+            if (screen1?.ConnectState ==ConnectStates.Connected && CurrentOperationLine1 == null)
             {
                 screen1?.GetListenReg("ScreenRow1").WriteReg("       00-000-00");
-                screen1?.GetListenReg("ScreenRow2").WriteReg(" ");
+                screen1?.GetListenReg("ScreenRow2").WriteReg("        输送线1");
             }
 
             var screen2 = MachineServer.GetInstance().GetMachine<SampleMachine>("显示屏2");
-            if (screen2?.GetListenReg("ScreenRow1") != null && CurrentOperationLine2 != null)
+            if (screen2?.ConnectState ==ConnectStates.Connected && CurrentOperationLine2 != null)
             {
                 var rcl = CurrentOperationLine2.RowColLayerFormat();
                 screen2?.GetListenReg("ScreenRow1").WriteReg($"       {rcl}");
-                screen2?.GetListenReg("ScreenRow2").WriteReg(CurrentOperationLine2.ItemName);
+                screen2?.GetListenReg("ScreenRow2").WriteReg(CurrentOperationLine2.ItemName?? "        输送线2");
             }
-            if (screen2?.GetListenReg("ScreenRow1") != null && CurrentOperationLine2 == null)
+            if (screen2?.ConnectState ==ConnectStates.Connected && CurrentOperationLine2 == null)
             {
                 screen2?.GetListenReg("ScreenRow1").WriteReg("       00-000-00");
-                screen2?.GetListenReg("ScreenRow2").WriteReg(" ");
+                screen2?.GetListenReg("ScreenRow2").WriteReg("        输送线2");
             }
 
             var screen3 = MachineServer.GetInstance().GetMachine<SampleMachine>("显示屏3");
-            if (screen3?.GetListenReg("ScreenRow1") != null && CurrentOperationLine3 != null)
+            if (screen3?.ConnectState ==ConnectStates.Connected && CurrentOperationLine3 != null)
             {
                 var rcl = CurrentOperationLine3.RowColLayerFormat();
                 screen3?.GetListenReg("ScreenRow1").WriteReg($"    {rcl}");
-                screen3?.GetListenReg("ScreenRow2").WriteReg(CurrentOperationLine3.ItemName);
+                screen3?.GetListenReg("ScreenRow2").WriteReg(CurrentOperationLine3.ItemName?? "    输送线3");
             }
 
-            if (screen3?.GetListenReg("ScreenRow1") != null && CurrentOperationLine3 == null)
+            if (screen3?.ConnectState ==ConnectStates.Connected && CurrentOperationLine3 == null)
             {
-                screen3?.GetListenReg("ScreenRow1").WriteReg("    00-000-00");
-                screen3?.GetListenReg("ScreenRow2").WriteReg(" ");
+                screen3?.GetListenReg("ScreenRow1").WriteReg("   00-000-00");
+                screen3?.GetListenReg("ScreenRow2").WriteReg("    输送线3");
             }
 
             var screen4 = MachineServer.GetInstance().GetMachine<SampleMachine>("显示屏4");
-            if (screen4?.GetListenReg("ScreenRow1") != null && CurrentOperationLine4 != null)
+            if (screen4?.ConnectState ==ConnectStates.Connected && CurrentOperationLine4 != null)
             {
                 var rcl = CurrentOperationLine4.RowColLayerFormat();
                 screen4?.GetListenReg("ScreenRow1").WriteReg($"    {rcl}");
-                screen4?.GetListenReg("ScreenRow2").WriteReg(CurrentOperationLine4.ItemName);
+                screen4?.GetListenReg("ScreenRow2").WriteReg(CurrentOperationLine4.ItemName?? "    输送线4");
             }
-            if (screen4?.GetListenReg("ScreenRow1") != null && CurrentOperationLine4 == null)
+            if (screen4?.ConnectState ==ConnectStates.Connected && CurrentOperationLine4 == null)
             {
-                screen4?.GetListenReg("ScreenRow1").WriteReg("    00-000-00");
-                screen4?.GetListenReg("ScreenRow2").WriteReg(" ");
+                screen4?.GetListenReg("ScreenRow1").WriteReg("   00-000-00");
+                screen4?.GetListenReg("ScreenRow2").WriteReg("    输送线4");
             }
 
         }