|
|
@@ -2,6 +2,7 @@ |
|
|
|
using BPASmartClient.Business; |
|
|
|
using BPASmartClient.CustomResource.UserControls; |
|
|
|
using BPASmartClient.CustomResource.UserControls.MessageShow; |
|
|
|
using BPASmartClient.Device; |
|
|
|
using BPASmartClient.EventBus; |
|
|
|
using BPASmartClient.Helper; |
|
|
|
using BPASmartClient.Message; |
|
|
@@ -55,12 +56,12 @@ namespace BPASmartClient |
|
|
|
} |
|
|
|
this.DragMove(); |
|
|
|
}; |
|
|
|
MenuItem_Click(new MenuItem() { Tag = "LogView",Header = "日志监视" },null); |
|
|
|
MenuItem_Click(new MenuItem() { Tag = "LogView", Header = "日志监视" }, null); |
|
|
|
|
|
|
|
ThreadManage.GetInstance().Start(new Action(() => |
|
|
|
{ |
|
|
|
new MainConsole().Start(); |
|
|
|
}),"启动主控制台"); |
|
|
|
}), "启动主控制台"); |
|
|
|
} |
|
|
|
#endregion |
|
|
|
|
|
|
@@ -75,7 +76,7 @@ namespace BPASmartClient |
|
|
|
if (sender is MenuItem) |
|
|
|
{ |
|
|
|
Type type = Type.GetType($"BPASmartClient.Control.{(sender as MenuItem).Tag?.ToString()}"); |
|
|
|
if (type == null){MenuClick((sender as MenuItem).Tag?.ToString());return; } |
|
|
|
if (type == null) { MenuClick((sender as MenuItem).Tag?.ToString()); return; } |
|
|
|
ConstructorInfo cti = type.GetConstructor(System.Type.EmptyTypes); |
|
|
|
contentRegion.Content = (FrameworkElement)cti.Invoke(null); |
|
|
|
Title.Text = (sender as MenuItem).Header?.ToString() + "界面"; |
|
|
@@ -116,23 +117,23 @@ namespace BPASmartClient |
|
|
|
|
|
|
|
|
|
|
|
#region 临时测试代码 |
|
|
|
private void Button_Click(object sender,RoutedEventArgs e) |
|
|
|
private void Button_Click(object sender, RoutedEventArgs e) |
|
|
|
{ |
|
|
|
//new Demo_MakeCoffeeEvent() { Id = 1 }.Publish(); |
|
|
|
//new DRCoffee_MakeCoffeeEvent() { Id = 1, DrinkCode= DrCoffeeDrinksCode.两杯意式浓缩 }.Publish(); |
|
|
|
//new DRCoffee_CoffeeCommCmdEvent() { Id = 1,CommCmd = DrCoffeeCommCmd.冲煮系统快速冲洗指令}.Publish(); |
|
|
|
|
|
|
|
MorkOrderPush morkOrderPush = new MorkOrderPush() { DeviceId = 2 }; |
|
|
|
var temp = BPAPackage.Make(morkOrderPush,12,BPA.Message.Enum.DeviceClientType.MORKS); |
|
|
|
Plugin.GetInstance().GetPlugin<MQTTMgr>().Publish("DOWN/MORKS/ORDER/12",temp.Serialize()); |
|
|
|
var temp = BPAPackage.Make(morkOrderPush, 12, BPA.Message.Enum.DeviceClientType.MORKS); |
|
|
|
Plugin.GetInstance().GetPlugin<MQTTMgr>().Publish("DOWN/MORKS/ORDER/12", temp.Serialize()); |
|
|
|
} |
|
|
|
|
|
|
|
private void Button_Click_1(object sender, RoutedEventArgs e) |
|
|
|
{ |
|
|
|
NoticeDemoViewModel.OpenMsg(EnumPromptType.Info,this,"我是标题","我是消息内容!我是消息内容!我是消息内容!我是消息内容!"); |
|
|
|
NoticeDemoViewModel.OpenMsg(EnumPromptType.Error,this,"我是标题","我是消息内容!我是消息内容!我是消息内容!我是消息内容!"); |
|
|
|
NoticeDemoViewModel.OpenMsg(EnumPromptType.Warn,this,"我是标题","我是消息内容!我是消息内容!我是消息内容!我是消息内容!"); |
|
|
|
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success,this,"我是标题","我是消息内容!我是消息内容!我是消息内容!我是消息内容!"); |
|
|
|
NoticeDemoViewModel.OpenMsg(EnumPromptType.Info, this, "我是标题", "我是消息内容!我是消息内容!我是消息内容!我是消息内容!"); |
|
|
|
NoticeDemoViewModel.OpenMsg(EnumPromptType.Error, this, "我是标题", "我是消息内容!我是消息内容!我是消息内容!我是消息内容!"); |
|
|
|
NoticeDemoViewModel.OpenMsg(EnumPromptType.Warn, this, "我是标题", "我是消息内容!我是消息内容!我是消息内容!我是消息内容!"); |
|
|
|
NoticeDemoViewModel.OpenMsg(EnumPromptType.Success, this, "我是标题", "我是消息内容!我是消息内容!我是消息内容!我是消息内容!"); |
|
|
|
} |
|
|
|
#endregion |
|
|
|
|
|
|
|