@@ -6,4 +6,8 @@ | |||
<Nullable>enable</Nullable> | |||
</PropertyGroup> | |||
<ItemGroup> | |||
<Folder Include="发送消息Model\" /> | |||
</ItemGroup> | |||
</Project> |
@@ -24,16 +24,18 @@ namespace BPASmartClient.MessageName.Enum.运行状态 | |||
/// </summary> | |||
Stop | |||
} | |||
/// <summary> | |||
/// 运行状态Model | |||
/// </summary> | |||
public class RunEnumModel | |||
{ | |||
/// <summary> | |||
/// 运行状态 | |||
/// 消息id号:ID号 | |||
/// </summary> | |||
public RunEnum Run { get; set; } | |||
public string MessageID { get; set; } | |||
/// <summary> | |||
/// ID号 | |||
/// 运行状态 | |||
/// </summary> | |||
public string ID { get; set; } | |||
public RunEnum Run { get; set; } | |||
} | |||
} |
@@ -48,7 +48,6 @@ namespace BPASmartClient.MessageName | |||
// #endregion | |||
//} | |||
/// <summary> | |||
/// 消息名称管理中心-枚举 | |||
/// </summary> | |||
@@ -75,4 +74,6 @@ namespace BPASmartClient.MessageName | |||
} | |||
} |
@@ -0,0 +1,49 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
namespace BPASmartClient.MessageName.接收消息Model | |||
{ | |||
/// <summary> | |||
/// 事件消息Model:配置 | |||
/// </summary> | |||
public class EventReceiveMessage | |||
{ | |||
/// <summary> | |||
/// 消息号 | |||
/// </summary> | |||
public string MeaageID { get; set; } | |||
/// <summary> | |||
/// 消息名称:枚举 | |||
/// </summary> | |||
public MessageNameEnum Name { get; set; } | |||
/// <summary> | |||
/// 空:保留 | |||
/// </summary> | |||
public string Value { get; set; } | |||
/// <summary> | |||
/// 消息标题 | |||
/// </summary> | |||
public string Title { get; set; } | |||
public EventReceiveMessage() | |||
{ | |||
MeaageID=GetMessageID.GetID(); | |||
} | |||
} | |||
/// <summary> | |||
/// 四位消息号 | |||
/// </summary> | |||
public static class GetMessageID | |||
{ | |||
public static int i = 0; | |||
public static string GetID() | |||
{ | |||
i++; | |||
return ((Convert.ToInt32(i) + 1).ToString().PadLeft(4, '0')); | |||
} | |||
} | |||
} |
@@ -0,0 +1,23 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
namespace BPASmartClient.MessageName.接收消息Model.滚动线 | |||
{ | |||
/// <summary> | |||
/// 滚动线数据设置-Model | |||
/// </summary> | |||
public class ConveyorBeltMessageModel | |||
{ | |||
/// <summary> | |||
/// 消息ID号:id 号 | |||
/// </summary> | |||
public string MessageID { get; set; } | |||
/// <summary> | |||
/// 滚动线:标题 | |||
/// </summary> | |||
public string Title { get; set; } | |||
} | |||
} |
@@ -4,7 +4,7 @@ using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
namespace BPASmartClient.MessageName.Enum.物料仓 | |||
namespace BPASmartClient.MessageName.接收消息Model.物料仓 | |||
{ | |||
/// <summary> | |||
/// 物料仓数据设置-Model | |||
@@ -12,9 +12,9 @@ namespace BPASmartClient.MessageName.Enum.物料仓 | |||
public class SilosMessageModel | |||
{ | |||
/// <summary> | |||
/// 物料仓:仓号 | |||
/// 消息ID号:id 号 | |||
/// </summary> | |||
public string id { get; set; } | |||
public string MessageID { get; set; } | |||
/// <summary> | |||
/// 物料仓:标题 | |||
/// </summary> | |||
@@ -24,6 +24,4 @@ namespace BPASmartClient.MessageName.Enum.物料仓 | |||
/// </summary> | |||
public string Value { get; set; } | |||
} | |||
} |
@@ -10,6 +10,12 @@ | |||
<None Remove="Images\光柱.png" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<PackageReference Include="AvalonEdit" Version="6.1.3.50" /> | |||
<PackageReference Include="Microsoft.Toolkit.Mvvm" Version="7.1.2" /> | |||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\BPASmartClient.Compiler\BPASmartClient.Compiler.csproj" /> | |||
<ProjectReference Include="..\BPASmartClient.MessageCommunication\BPASmartClient.MessageCommunication.csproj" /> | |||
@@ -18,10 +24,10 @@ | |||
<ItemGroup> | |||
<Reference Include="Antlr3.Runtime"> | |||
<HintPath>DLL\Antlr3.Runtime.dll</HintPath> | |||
<HintPath>..\BPASmartClient.Compiler\DLL\Antlr3.Runtime.dll</HintPath> | |||
</Reference> | |||
<Reference Include="Unvell.ReoScript"> | |||
<HintPath>DLL\Unvell.ReoScript.dll</HintPath> | |||
<HintPath>..\BPASmartClient.Compiler\DLL\Unvell.ReoScript.dll</HintPath> | |||
</Reference> | |||
</ItemGroup> | |||
@@ -23,8 +23,9 @@ | |||
Fill="Transparent" | |||
Stroke="{Binding StrokeBrush, RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}}" | |||
StrokeThickness="{Binding StrokeThickness, RelativeSource={RelativeSource AncestorType=UserControl, Mode=FindAncestor}}" /> | |||
</Canvas> | |||
</Viewbox> | |||
<TextBlock Text="{Binding Text,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Tag="标题" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="0,-40,0,-40" Foreground="#FF25AD12" FontSize="30"></TextBlock> | |||
</Grid> | |||
</UserControl> |
@@ -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<TextBlock>(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<EventReceiveMessage> EventNameList | |||
{ | |||
get { return (ObservableCollection<EventReceiveMessage>)GetValue(EventNameListProperty); } | |||
set { SetValue(EventNameListProperty, value); } | |||
} | |||
public static readonly DependencyProperty EventNameListProperty = | |||
DependencyProperty.Register("EventNameList", typeof(ObservableCollection<EventReceiveMessage>), typeof(NewConveyorBelt), new PropertyMetadata(new ObservableCollection<EventReceiveMessage>(), 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<ObservableCollection<EventReceiveMessage>>(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 | |||
} | |||
} | |||
/// <summary> | |||
/// 目标属性刷新 | |||
/// </summary> | |||
public void TargetRefresh() | |||
{ | |||
if (textBlock != null ) | |||
{ | |||
textBlock.Text = Text; | |||
} | |||
} | |||
public void RunNameRefresh() | |||
{ | |||
@@ -58,26 +58,17 @@ d:DesignHeight="270" d:DesignWidth="180" > | |||
Foreground="#FF00FFF9" | |||
Text="(g)" /> | |||
</StackPanel> | |||
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center"> | |||
<TextBlock | |||
Margin="0,50,0,0" | |||
HorizontalAlignment="Center" | |||
FontSize="50" | |||
Foreground="#FFFFA400" Tag="Text" | |||
Text="{Binding Text,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" /> | |||
<TextBlock | |||
Grid.Row="1" | |||
<TextBlock | |||
Grid.Row="1" Tag="Text" | |||
Margin="0,70,0,0" | |||
HorizontalAlignment="Center" | |||
FontSize="25" | |||
Foreground="#FFFFA400" | |||
Text=" 号仓" /> | |||
</StackPanel> | |||
Text="{Binding Text,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" /> | |||
<Image | |||
Grid.RowSpan="2" | |||
Source="/BPASmartClient.SCADAControl;component/Images/光柱.png" | |||
Stretch="Fill" /> | |||
<ListBox Visibility="Collapsed" ItemsSource="{Binding EventNameList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></ListBox> | |||
</Grid> | |||
</UserControl> |
@@ -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<EventReceiveMessage> EventNameList | |||
{ | |||
get { return (MessageNameEnum)GetValue(EventDataNameProperty); } | |||
set { SetValue(EventDataNameProperty, value); } | |||
get { return (ObservableCollection<EventReceiveMessage>)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<EventReceiveMessage>), typeof(Silos), new PropertyMetadata(new ObservableCollection<EventReceiveMessage>(), 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 | |||
} | |||
} | |||
/// <summary> | |||
/// 运行名称变化事件 | |||
/// </summary> | |||
public void RunNameRefresh() | |||
{ | |||
} | |||
/// <summary> | |||
/// 数据名称变化事件 | |||
/// </summary> | |||
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<ObservableCollection<EventReceiveMessage>>(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) | |||
/// <summary> | |||
/// 统一事件消息处理中心 | |||
/// </summary> | |||
/// <param name="sender"></param> | |||
/// <param name="e"></param> | |||
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 | |||
} | |||
} |
@@ -141,4 +141,6 @@ namespace BPASmartClient.SCADAControl | |||
public string ControlType => "控件"; | |||
} | |||
} |
@@ -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<RunEnum>(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); | |||
} | |||
} | |||
} |