From 8ec8160542f78733aaecf4598b24573a3b847aec Mon Sep 17 00:00:00 2001 From: fyf Date: Wed, 31 Aug 2022 09:25:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=9F=E6=96=B0=E5=8F=AF=E8=A7=86=E5=8C=96?= =?UTF-8?q?=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BPASmartClient.MessageName.csproj | 4 + .../Enum/运行状态/RunEnum.cs | 12 +- BPASmartClient.MessageName/MessageName.cs | 3 +- .../接收消息Model/EventReceiveMessage.cs | 49 +++++++ .../滚动线/ConveyorBeltMessageModel.cs | 23 +++ .../物料仓/SilosMessageModel.cs} | 8 +- .../BPASmartClient.SCADAControl.csproj | 10 +- .../NewConveyorBelt.xaml | 3 +- .../NewConveyorBelt.xaml.cs | 114 ++++++++++++--- BPASmartClient.SCADAControl/Silos.xaml | 17 +-- BPASmartClient.SCADAControl/Silos.xaml.cs | 137 ++++++++++-------- BPASmartClient.SCADAControl/SwitchButton.cs | 2 + SCADA.Test/MainWindow.xaml.cs | 8 +- 13 files changed, 280 insertions(+), 110 deletions(-) create mode 100644 BPASmartClient.MessageName/接收消息Model/EventReceiveMessage.cs create mode 100644 BPASmartClient.MessageName/接收消息Model/滚动线/ConveyorBeltMessageModel.cs rename BPASmartClient.MessageName/{Enum/物料仓/SilosRunEnum.cs => 接收消息Model/物料仓/SilosMessageModel.cs} (79%) diff --git a/BPASmartClient.MessageName/BPASmartClient.MessageName.csproj b/BPASmartClient.MessageName/BPASmartClient.MessageName.csproj index 132c02c5..6b7aa59a 100644 --- a/BPASmartClient.MessageName/BPASmartClient.MessageName.csproj +++ b/BPASmartClient.MessageName/BPASmartClient.MessageName.csproj @@ -6,4 +6,8 @@ enable + + + + diff --git a/BPASmartClient.MessageName/Enum/运行状态/RunEnum.cs b/BPASmartClient.MessageName/Enum/运行状态/RunEnum.cs index e4b1a9e3..1e3134d4 100644 --- a/BPASmartClient.MessageName/Enum/运行状态/RunEnum.cs +++ b/BPASmartClient.MessageName/Enum/运行状态/RunEnum.cs @@ -24,16 +24,18 @@ namespace BPASmartClient.MessageName.Enum.运行状态 /// Stop } - + /// + /// 运行状态Model + /// public class RunEnumModel { /// - /// 运行状态 + /// 消息id号:ID号 /// - public RunEnum Run { get; set; } + public string MessageID { get; set; } /// - /// ID号 + /// 运行状态 /// - public string ID { get; set; } + public RunEnum Run { get; set; } } } diff --git a/BPASmartClient.MessageName/MessageName.cs b/BPASmartClient.MessageName/MessageName.cs index 75754f00..33688c83 100644 --- a/BPASmartClient.MessageName/MessageName.cs +++ b/BPASmartClient.MessageName/MessageName.cs @@ -48,7 +48,6 @@ namespace BPASmartClient.MessageName // #endregion //} - /// /// 消息名称管理中心-枚举 /// @@ -75,4 +74,6 @@ namespace BPASmartClient.MessageName } + + } \ No newline at end of file diff --git a/BPASmartClient.MessageName/接收消息Model/EventReceiveMessage.cs b/BPASmartClient.MessageName/接收消息Model/EventReceiveMessage.cs new file mode 100644 index 00000000..934ef95c --- /dev/null +++ b/BPASmartClient.MessageName/接收消息Model/EventReceiveMessage.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPASmartClient.MessageName.接收消息Model +{ + /// + /// 事件消息Model:配置 + /// + public class EventReceiveMessage + { + /// + /// 消息号 + /// + public string MeaageID { get; set; } + /// + /// 消息名称:枚举 + /// + public MessageNameEnum Name { get; set; } + /// + /// 空:保留 + /// + public string Value { get; set; } + /// + /// 消息标题 + /// + public string Title { get; set; } + + public EventReceiveMessage() + { + MeaageID=GetMessageID.GetID(); + } + } + + /// + /// 四位消息号 + /// + public static class GetMessageID + { + public static int i = 0; + public static string GetID() + { + i++; + return ((Convert.ToInt32(i) + 1).ToString().PadLeft(4, '0')); + } + } +} diff --git a/BPASmartClient.MessageName/接收消息Model/滚动线/ConveyorBeltMessageModel.cs b/BPASmartClient.MessageName/接收消息Model/滚动线/ConveyorBeltMessageModel.cs new file mode 100644 index 00000000..25bcd887 --- /dev/null +++ b/BPASmartClient.MessageName/接收消息Model/滚动线/ConveyorBeltMessageModel.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BPASmartClient.MessageName.接收消息Model.滚动线 +{ + /// + /// 滚动线数据设置-Model + /// + public class ConveyorBeltMessageModel + { + /// + /// 消息ID号:id 号 + /// + public string MessageID { get; set; } + /// + /// 滚动线:标题 + /// + public string Title { get; set; } + } +} diff --git a/BPASmartClient.MessageName/Enum/物料仓/SilosRunEnum.cs b/BPASmartClient.MessageName/接收消息Model/物料仓/SilosMessageModel.cs similarity index 79% rename from BPASmartClient.MessageName/Enum/物料仓/SilosRunEnum.cs rename to BPASmartClient.MessageName/接收消息Model/物料仓/SilosMessageModel.cs index 3f36eb43..574dce45 100644 --- a/BPASmartClient.MessageName/Enum/物料仓/SilosRunEnum.cs +++ b/BPASmartClient.MessageName/接收消息Model/物料仓/SilosMessageModel.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace BPASmartClient.MessageName.Enum.物料仓 +namespace BPASmartClient.MessageName.接收消息Model.物料仓 { /// /// 物料仓数据设置-Model @@ -12,9 +12,9 @@ namespace BPASmartClient.MessageName.Enum.物料仓 public class SilosMessageModel { /// - /// 物料仓:仓号 + /// 消息ID号:id 号 /// - public string id { get; set; } + public string MessageID { get; set; } /// /// 物料仓:标题 /// @@ -24,6 +24,4 @@ namespace BPASmartClient.MessageName.Enum.物料仓 /// public string Value { get; set; } } - - } diff --git a/BPASmartClient.SCADAControl/BPASmartClient.SCADAControl.csproj b/BPASmartClient.SCADAControl/BPASmartClient.SCADAControl.csproj index e8a17b2f..a47eae6c 100644 --- a/BPASmartClient.SCADAControl/BPASmartClient.SCADAControl.csproj +++ b/BPASmartClient.SCADAControl/BPASmartClient.SCADAControl.csproj @@ -10,6 +10,12 @@ + + + + + + @@ -18,10 +24,10 @@ - DLL\Antlr3.Runtime.dll + ..\BPASmartClient.Compiler\DLL\Antlr3.Runtime.dll - DLL\Unvell.ReoScript.dll + ..\BPASmartClient.Compiler\DLL\Unvell.ReoScript.dll diff --git a/BPASmartClient.SCADAControl/NewConveyorBelt.xaml b/BPASmartClient.SCADAControl/NewConveyorBelt.xaml index f30a29d4..7d1da941 100644 --- a/BPASmartClient.SCADAControl/NewConveyorBelt.xaml +++ b/BPASmartClient.SCADAControl/NewConveyorBelt.xaml @@ -23,8 +23,9 @@ Fill="Transparent" Stroke="{Binding StrokeBrush, RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}}" StrokeThickness="{Binding StrokeThickness, RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}}" /> - + + diff --git a/BPASmartClient.SCADAControl/NewConveyorBelt.xaml.cs b/BPASmartClient.SCADAControl/NewConveyorBelt.xaml.cs index 56278baa..6f3685cb 100644 --- a/BPASmartClient.SCADAControl/NewConveyorBelt.xaml.cs +++ b/BPASmartClient.SCADAControl/NewConveyorBelt.xaml.cs @@ -3,6 +3,9 @@ using BPASmartClient.MessageCommunication; using BPASmartClient.MessageCommunication.MsgControl; using BPASmartClient.MessageName; using BPASmartClient.MessageName.Enum.运行状态; +using BPASmartClient.MessageName.接收消息Model; +using BPASmartClient.MessageName.接收消息Model.滚动线; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -29,6 +32,7 @@ namespace BPASmartClient.SCADAControl public partial class NewConveyorBelt : UserControl, IExecutable { #region 临时变量 + TextBlock textBlock = null; Path Path_mp = null; Path Path_cb = null; Storyboard storyboard = new Storyboard(); @@ -48,6 +52,38 @@ namespace BPASmartClient.SCADAControl StrokeDashArray = new DoubleCollection { 1.5, 1.5 }; StrokeFillBrush = new SolidColorBrush((System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#00BEFA")); StrokeThickness = 2; + this.Loaded += NewConveyorBelt_Loaded; ; + } + + private void NewConveyorBelt_Loaded(object sender, RoutedEventArgs e) + { + foreach (TextBlock tb in FindVisualChildren(this)) + { + // do something with tb here + if (tb.Tag != null) + { + if (tb.Tag.ToString() == "标题") + { + textBlock = tb; + } + } + } + EventNameList.CollectionChanged += EventNameList_CollectionChanged; + } + + private void EventNameList_CollectionChanged(object? sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) + { + if (EventNameList.Count > 0) + { + try + { + EventNameListStr = JsonConvert.SerializeObject(EventNameList); + + } + catch (Exception ex) + { + } + } } public string ControlType => "滚动线"; @@ -248,8 +284,8 @@ namespace BPASmartClient.SCADAControl set { SetValue(TextProperty, value); } } public static readonly DependencyProperty TextProperty = - DependencyProperty.Register("Text", typeof(string), typeof(NewConveyorBelt), new PropertyMetadata(string.Empty)); - + DependencyProperty.Register("Text", typeof(string), typeof(NewConveyorBelt), new PropertyMetadata(new PropertyChangedCallback(onTargetChanged))); + private static void onTargetChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) => (d as NewConveyorBelt)?.TargetRefresh(); [Category("主题订阅")] public string ConveyorBeltLeft { @@ -274,39 +310,72 @@ namespace BPASmartClient.SCADAControl } public static readonly DependencyProperty ConveyorBeltStopProperty = DependencyProperty.Register("ConveyorBeltStop", typeof(string), typeof(NewConveyorBelt), new PropertyMetadata(string.Empty)); - - [Category("消息名称")] - public MessageNameEnum EventRunName + public string EventNameListStr { - get { return (MessageNameEnum)GetValue(EventRunNameProperty); } - set { SetValue(EventRunNameProperty, value); } + get { return (string)GetValue(EventNameListStrProperty); } + set { SetValue(EventNameListStrProperty, value); } } - public static readonly DependencyProperty EventRunNameProperty = - DependencyProperty.Register("EventRunName", typeof(MessageNameEnum), typeof(NewConveyorBelt), new PropertyMetadata(MessageNameEnum.Null, onEventRunNameChanged)); - private static void onEventRunNameChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) => (d as NewConveyorBelt)?.RunNameRefresh(); + public static readonly DependencyProperty EventNameListStrProperty = + DependencyProperty.Register("EventNameListStr", typeof(string), typeof(NewConveyorBelt), new PropertyMetadata(string.Empty)); + [Category("消息名称集合")] + public ObservableCollection EventNameList + { + get { return (ObservableCollection)GetValue(EventNameListProperty); } + set { SetValue(EventNameListProperty, value); } + } + public static readonly DependencyProperty EventNameListProperty = + DependencyProperty.Register("EventNameList", typeof(ObservableCollection), typeof(NewConveyorBelt), new PropertyMetadata(new ObservableCollection(), onEventNameListChanged)); + private static void onEventNameListChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) => (d as NewConveyorBelt)?.RunNameRefresh(); #endregion #region 属性变更事件 public void Register() { - if (EventRunName != MessageNameEnum.Null) Class_InnerMessageBus.GetInstance().ListenMessage(this, EventRunName.ToString(), "EventRunNameHandler"); + if (!string.IsNullOrEmpty(EventNameListStr)) + { + try + { + EventNameList = JsonConvert.DeserializeObject>(EventNameListStr); + } + catch (Exception ex) + { + } + } + if (EventNameList != null) + { + EventNameList?.ToList().ForEach(x => + { + Class_InnerMessageBus.GetInstance().ListenMessage(this, x.Name.ToString(), "EventHandler"); + }); + } } - public void EventRunNameHandler(object sender, InnerMessageEventArgs e) + public void EventHandler(object sender, InnerMessageEventArgs e) { try { if (IsExecuteState = true) { - if (e.obj_MessageObj is RunEnumModel) + if (e.obj_MessageObj is RunEnumModel)//接收到运行消息 { - - RunEnumModel runEnum = (RunEnumModel)e.obj_MessageObj; - //if (runEnum.ID == Text) + RunEnumModel mode = (RunEnumModel)e.obj_MessageObj; + var msg = EventNameList?.ToList().Find(par => par.Name.ToString() == e.str_MessageStr && par.MeaageID == mode.MessageID); + //必对消息号: + if (msg != null) + { + Direction = mode.Run == RunEnum.Run ? 1 : ((mode.Run == RunEnum.Run_Left) ? 2 : 0); + } + } + else if (e.obj_MessageObj is ConveyorBeltMessageModel)//接收到数据模型 + { + ConveyorBeltMessageModel mode = (ConveyorBeltMessageModel)e.obj_MessageObj; + var msg = EventNameList?.ToList().Find(par => par.Name.ToString() == e.str_MessageStr && par.MeaageID == mode.MessageID); + //必对消息号: + if (msg != null) { - Direction = runEnum.Run == RunEnum.Run ? 1 : ((runEnum.Run == RunEnum.Run_Left) ? 2 : 0); + Text = mode.Title; } } } @@ -336,6 +405,17 @@ namespace BPASmartClient.SCADAControl } } + /// + /// 目标属性刷新 + /// + public void TargetRefresh() + { + if (textBlock != null ) + { + textBlock.Text = Text; + } + } + public void RunNameRefresh() { diff --git a/BPASmartClient.SCADAControl/Silos.xaml b/BPASmartClient.SCADAControl/Silos.xaml index b30d727d..9adb8355 100644 --- a/BPASmartClient.SCADAControl/Silos.xaml +++ b/BPASmartClient.SCADAControl/Silos.xaml @@ -58,26 +58,17 @@ d:DesignHeight="270" d:DesignWidth="180" > Foreground="#FF00FFF9" Text="(g)" /> - - - - - + Text="{Binding Text,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" /> + diff --git a/BPASmartClient.SCADAControl/Silos.xaml.cs b/BPASmartClient.SCADAControl/Silos.xaml.cs index d3dd9102..b13ee9ed 100644 --- a/BPASmartClient.SCADAControl/Silos.xaml.cs +++ b/BPASmartClient.SCADAControl/Silos.xaml.cs @@ -2,10 +2,14 @@ using BPASmartClient.MessageCommunication; using BPASmartClient.MessageCommunication.MsgControl; using BPASmartClient.MessageName; -using BPASmartClient.MessageName.Enum.物料仓; using BPASmartClient.MessageName.Enum.运行状态; +using BPASmartClient.MessageName.接收消息Model; +using BPASmartClient.MessageName.接收消息Model.物料仓; +using Newtonsoft.Json; using System; +using System.Collections; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.ComponentModel; using System.Linq; using System.Text; @@ -46,16 +50,28 @@ namespace BPASmartClient.SCADAControl this.DataContext = this; Width = 180; Height = 270; - //Value = "25.23"; - //Title = "香料"; - //Text = "1"; - //this.SizeChanged += Silos_SizeChanged; ; this.Loaded += Silos_Loaded; } private void Silos_Loaded(object sender, RoutedEventArgs e) { Silos_SizeChanged(null, null); + EventNameList.CollectionChanged += EventNameList_CollectionChanged; + } + + private void EventNameList_CollectionChanged(object? sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) + { + if (EventNameList.Count > 0) + { + try + { + EventNameListStr = JsonConvert.SerializeObject(EventNameList); + + } + catch (Exception ex) + { + } + } } public string ControlType => "物料仓"; @@ -152,22 +168,6 @@ namespace BPASmartClient.SCADAControl #endregion #region 属性 - //private string _变量; - //public string ym_value - //{ - // get - // { - // return _变量; - // } - // set - // { - // if (_变量 == value) - // return; - // _变量 = value; - // OnPropertyChanged("ym_value"); - // } - //} - [Category("值设定")] public string Value { @@ -197,23 +197,24 @@ namespace BPASmartClient.SCADAControl DependencyProperty.Register("Title", typeof(string), typeof(Silos), new PropertyMetadata(new PropertyChangedCallback(onTargetChanged))); [Category("消息名称")] - public MessageNameEnum EventRunName + public string EventNameListStr { - get { return (MessageNameEnum)GetValue(EventRunNameProperty); } - set { SetValue(EventRunNameProperty, value); } + get { return (string)GetValue(EventNameListStrProperty); } + set { SetValue(EventNameListStrProperty, value); } } - public static readonly DependencyProperty EventRunNameProperty = - DependencyProperty.Register("EventRunName", typeof(MessageNameEnum), typeof(Silos), new PropertyMetadata(MessageNameEnum.Null, onEventRunNameChanged)); - private static void onEventRunNameChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) => (d as Silos)?.RunNameRefresh(); - [Category("消息名称")] - public MessageNameEnum EventDataName + public static readonly DependencyProperty EventNameListStrProperty = + DependencyProperty.Register("EventNameListStr", typeof(string), typeof(Silos), new PropertyMetadata(string.Empty)); + + [Category("消息名称集合")] + public ObservableCollection EventNameList { - get { return (MessageNameEnum)GetValue(EventDataNameProperty); } - set { SetValue(EventDataNameProperty, value); } + get { return (ObservableCollection)GetValue(EventNameListProperty); } + set { SetValue(EventNameListProperty, value); } } - public static readonly DependencyProperty EventDataNameProperty = - DependencyProperty.Register("EventDataName", typeof(MessageNameEnum), typeof(Silos), new PropertyMetadata(MessageNameEnum.Null, onEventDataNameChanged)); - private static void onEventDataNameChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) => (d as Silos)?.DataNameRefresh(); + public static readonly DependencyProperty EventNameListProperty = + DependencyProperty.Register("EventNameList", typeof(ObservableCollection), typeof(Silos), new PropertyMetadata(new ObservableCollection(), new PropertyChangedCallback(onEventNameListChanged))); + private static void onEventNameListChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) => (d as Silos)?.DataNameRefresh(); + [Category("值设定")] public int Direction { @@ -240,7 +241,6 @@ namespace BPASmartClient.SCADAControl textBlockValue.Text = Value; textBlockText.Text = Text; textBlockTitle.Text = Title; - } } @@ -273,65 +273,75 @@ namespace BPASmartClient.SCADAControl } } + /// /// 运行名称变化事件 /// public void RunNameRefresh() { - + } + /// /// 数据名称变化事件 /// public void DataNameRefresh() { - + } #endregion #region 运行事件 public void Register() { - if (EventRunName != MessageNameEnum.Null) Class_InnerMessageBus.GetInstance().ListenMessage(this, EventRunName.ToString(), "EventRunNameHandler"); - if (EventDataName != MessageNameEnum.Null) Class_InnerMessageBus.GetInstance().ListenMessage(this, EventDataName.ToString(), "EventDataNameHandler"); - } - - public void EventRunNameHandler(object sender, InnerMessageEventArgs e) - { - try + if (!string.IsNullOrEmpty(EventNameListStr)) { - if (IsExecuteState = true) + try + { + EventNameList = JsonConvert.DeserializeObject>(EventNameListStr); + } + catch (Exception ex) { - if (e.obj_MessageObj is RunEnumModel) - { - RunEnumModel runEnum = (RunEnumModel)e.obj_MessageObj; - if (runEnum.ID == Text) - { - Direction = runEnum.Run == RunEnum.Run ? 1 : 2; - } - } } } - catch (Exception ex) + if (EventNameList != null) { - + EventNameList?.ToList().ForEach(x => + { + Class_InnerMessageBus.GetInstance().ListenMessage(this, x.Name.ToString(), "EventHandler"); + }); } } - - public void EventDataNameHandler(object sender, InnerMessageEventArgs e) + /// + /// 统一事件消息处理中心 + /// + /// + /// + public void EventHandler(object sender, InnerMessageEventArgs e) { try { - if (IsExecuteState = true) + if (IsExecuteState = true)//正在运行 { - if (e.obj_MessageObj is SilosMessageModel) + if (e.obj_MessageObj is RunEnumModel)//接收到运行消息 { - SilosMessageModel silosMessageModel = (SilosMessageModel)e.obj_MessageObj; - if (silosMessageModel.id == Text) + RunEnumModel mode = (RunEnumModel)e.obj_MessageObj; + var msg = EventNameList?.ToList().Find(par => par.Name.ToString() == e.str_MessageStr && par.MeaageID == mode.MessageID); + //必对消息号: + if (msg!=null) { - Title=silosMessageModel.Title; - Value= silosMessageModel.Value; + Direction = mode.Run == RunEnum.Run ? 1 : 2; + } + }else if (e.obj_MessageObj is SilosMessageModel)//接收到数据模型 + { + SilosMessageModel mode = (SilosMessageModel)e.obj_MessageObj; + var msg = EventNameList?.ToList().Find(par => par.Name.ToString() == e.str_MessageStr && par.MeaageID == mode.MessageID); + //必对消息号: + if (msg != null) + { + Title = mode.Title; + Value = mode.Value; } } } @@ -344,4 +354,5 @@ namespace BPASmartClient.SCADAControl #endregion } + } diff --git a/BPASmartClient.SCADAControl/SwitchButton.cs b/BPASmartClient.SCADAControl/SwitchButton.cs index 45f405e9..fc51b708 100644 --- a/BPASmartClient.SCADAControl/SwitchButton.cs +++ b/BPASmartClient.SCADAControl/SwitchButton.cs @@ -141,4 +141,6 @@ namespace BPASmartClient.SCADAControl public string ControlType => "控件"; } + + } diff --git a/SCADA.Test/MainWindow.xaml.cs b/SCADA.Test/MainWindow.xaml.cs index a812a193..c75ccf8e 100644 --- a/SCADA.Test/MainWindow.xaml.cs +++ b/SCADA.Test/MainWindow.xaml.cs @@ -1,7 +1,7 @@ using BPASmartClient.MessageCommunication; using BPASmartClient.MessageName; -using BPASmartClient.MessageName.Enum.物料仓; using BPASmartClient.MessageName.Enum.运行状态; +using BPASmartClient.MessageName.接收消息Model.物料仓; using Microsoft.Win32; using System; using System.Collections.Generic; @@ -92,7 +92,7 @@ namespace SCADA.Test } RunEnumModel runEnumModel = new RunEnumModel(); runEnumModel.Run = ToEnumValue(xx.Text); - runEnumModel.ID = hm.Text; + runEnumModel.MessageID = hm.Text; Class_InnerMessageBus.GetInstance().PostMessage(this, mlname.Text, runEnumModel); } @@ -127,11 +127,13 @@ namespace SCADA.Test return; } SilosMessageModel silosMessage = new SilosMessageModel(); - silosMessage.id= ch.Text; + silosMessage.MessageID = ch.Text; silosMessage.Value = zl.Text; silosMessage.Title = bt.Text; Class_InnerMessageBus.GetInstance().PostMessage(this, xxnc.Text, silosMessage); } + + } }