|
|
@@ -87,8 +87,9 @@ namespace BPASmartClient |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
#endregion |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 获取设备集合 |
|
|
|
/// </summary> |
|
|
|
private void GetDevices() |
|
|
|
{ |
|
|
|
//List<string> IDevices = new List<string>(); |
|
|
@@ -149,6 +150,7 @@ namespace BPASmartClient |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
#endregion |
|
|
|
|
|
|
|
#region Click |
|
|
|
/// <summary> |
|
|
@@ -200,8 +202,12 @@ namespace BPASmartClient |
|
|
|
} |
|
|
|
#endregion |
|
|
|
|
|
|
|
|
|
|
|
#region 临时测试代码 |
|
|
|
/// <summary> |
|
|
|
/// 测试按钮 |
|
|
|
/// </summary> |
|
|
|
/// <param name="sender"></param> |
|
|
|
/// <param name="e"></param> |
|
|
|
private void Button_Click(object sender, RoutedEventArgs e) |
|
|
|
{ |
|
|
|
//new Demo_MakeCoffeeEvent() { Id = 1 }.Publish(); |
|
|
@@ -212,56 +218,20 @@ namespace BPASmartClient |
|
|
|
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, "我是标题", "我是消息内容!我是消息内容!我是消息内容!我是消息内容!"); |
|
|
|
} |
|
|
|
|
|
|
|
#endregion |
|
|
|
|
|
|
|
private void Button_Click_2(object sender, RoutedEventArgs e) |
|
|
|
{ |
|
|
|
//this.save.IsEnabled = false; |
|
|
|
Task.Run(new Action(() => |
|
|
|
{ |
|
|
|
var res = Json<KeepDataBase>.Data.orderLists.FirstOrDefault(p => p.DeviceId == "2")?.morkOrderPushes; |
|
|
|
if (res != null) |
|
|
|
{ |
|
|
|
string info = string.Empty; |
|
|
|
int count = 0; |
|
|
|
foreach (var item in res) |
|
|
|
{ |
|
|
|
info = $"SuborderId:= {item.OrderPush.SuborderId},SortNum:= {item.OrderPush.SortNum},GoodsName:= {item.OrderPush.GoodsName} \r\n {info}"; |
|
|
|
count++; |
|
|
|
if (count >= 1000) |
|
|
|
{ |
|
|
|
TextHelper.GetInstance.WriteTextInfo(info, $"订单信息-{DateTime.Now.ToString("HH-mm-ss")}-{count}", "Morks"); |
|
|
|
info = string.Empty; |
|
|
|
count = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
if (info != string.Empty) |
|
|
|
{ |
|
|
|
TextHelper.GetInstance.WriteTextInfo(info, $"订单信息-{DateTime.Now.ToString("HH-mm-ss")}-{count}", "Morks"); |
|
|
|
info = string.Empty; |
|
|
|
count = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
//App.Current.Dispatcher.Invoke(new Action(() => { this.save.IsEnabled = true; })); |
|
|
|
})); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 初始化 |
|
|
|
/// </summary> |
|
|
|
/// <param name="sender"></param> |
|
|
|
/// <param name="e"></param> |
|
|
|
private void init_Click(object sender, RoutedEventArgs e) |
|
|
|
{ |
|
|
|
ActionManage.GetInstance.Send("InitDevice"); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 登录 |
|
|
|
/// </summary> |
|
|
|
/// <param name="sender"></param> |
|
|
|
/// <param name="e"></param> |
|
|
|
private void Button_Login(object sender, RoutedEventArgs e) |
|
|
|
{ |
|
|
|
try |
|
|
@@ -279,10 +249,16 @@ namespace BPASmartClient |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// 注销 |
|
|
|
/// </summary> |
|
|
|
/// <param name="sender"></param> |
|
|
|
/// <param name="e"></param> |
|
|
|
private void Button_LogOut(object sender, RoutedEventArgs e) |
|
|
|
{ |
|
|
|
|
|
|
|
} |
|
|
|
#endregion |
|
|
|
|
|
|
|
} |
|
|
|
} |