@@ -45,11 +45,11 @@ namespace BPASmartClient.Business | |||||
if (morkOrderPushes.TryDequeue(out MorkOrderPush mork)) | if (morkOrderPushes.TryDequeue(out MorkOrderPush mork)) | ||||
{ | { | ||||
Thread.Sleep(3000); | Thread.Sleep(3000); | ||||
new OrderStatusChangedEvent() { Status = ORDER_STATUS.COOKING, SubOrderId = mork.SuborderId, GoodName = mork.GoodsName }.Publish(); | |||||
new OrderStatusChangedEvent() { SortNum = mork.SortNum.ToString(), Status = ORDER_STATUS.COOKING, SubOrderId = mork.SuborderId, GoodName = mork.GoodsName }.Publish(); | |||||
Thread.Sleep(5000); | Thread.Sleep(5000); | ||||
new OrderStatusChangedEvent() { Status = ORDER_STATUS.COMPLETED_COOK, SubOrderId = mork.SuborderId, GoodName = mork.GoodsName }.Publish(); | |||||
new OrderStatusChangedEvent() { SortNum = mork.SortNum.ToString(), Status = ORDER_STATUS.COMPLETED_COOK, SubOrderId = mork.SuborderId, GoodName = mork.GoodsName }.Publish(); | |||||
Thread.Sleep(5000); | Thread.Sleep(5000); | ||||
new OrderStatusChangedEvent() { Status = ORDER_STATUS.COMPLETED_TAKE, SubOrderId = mork.SuborderId, GoodName = mork.GoodsName }.Publish(); | |||||
new OrderStatusChangedEvent() { SortNum = mork.SortNum.ToString(), Status = ORDER_STATUS.COMPLETED_TAKE, SubOrderId = mork.SuborderId, GoodName = mork.GoodsName }.Publish(); | |||||
Thread.Sleep(2000); | Thread.Sleep(2000); | ||||
} | } | ||||
} | } | ||||
@@ -167,6 +167,17 @@ | |||||
<None Remove="Image\黑菠萝科技.png" /> | <None Remove="Image\黑菠萝科技.png" /> | ||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | |||||
<Page Remove="Properties\App.xaml" /> | |||||
</ItemGroup> | |||||
<ItemGroup> | |||||
<ApplicationDefinition Include="Properties\App.xaml"> | |||||
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime> | |||||
<Generator>MSBuild:Compile</Generator> | |||||
</ApplicationDefinition> | |||||
</ItemGroup> | |||||
<ItemGroup> | <ItemGroup> | ||||
<Resource Include="Image\btn_close.png" /> | <Resource Include="Image\btn_close.png" /> | ||||
<Resource Include="Image\ComboBoxPopSelect.png" /> | <Resource Include="Image\ComboBoxPopSelect.png" /> | ||||
@@ -0,0 +1,35 @@ | |||||
<Application | |||||
x:Class="BPASmartClient.App" | |||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |||||
xmlns:con="clr-namespace:BPASmartClient.CustomResource.Converters;assembly=BPASmartClient.CustomResource" | |||||
xmlns:local="clr-namespace:BPASmartClient"> | |||||
<Application.Resources> | |||||
<ResourceDictionary> | |||||
<ResourceDictionary.MergedDictionaries> | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecCheckBox.xaml" /> | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecTitleBarButton.xaml" /> | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/GlobalStyle.xaml" /> | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecComboBox.xaml" /> | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecIcoButtonStyle.xaml" /> | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecToggleButton.xaml" /> | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/BeveledRadioButtonStyle.xaml" /> | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/DatePickeerDictionary.xaml" /> | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecButtonStyle.xaml" /> | |||||
<ResourceDictionary> | |||||
<con:ColorConverter x:Key="ColorConverter" /> | |||||
<con:TextConverter x:Key="TextConverter" /> | |||||
<con:VisibleTypeConverter x:Key="VisibleTypeConverter" /> | |||||
</ResourceDictionary> | |||||
<ResourceDictionary> | |||||
<ImageBrush x:Key="hbl" ImageSource="/BPASmartClient.CustomResource;component/Image/HBL.png" /> | |||||
<ImageBrush x:Key="dbxt" ImageSource="/BPASmartClient.CustomResource;component/Image/顶部线条.png" /> | |||||
</ResourceDictionary> | |||||
</ResourceDictionary.MergedDictionaries> | |||||
</ResourceDictionary> | |||||
</Application.Resources> | |||||
</Application> |
@@ -0,0 +1,132 @@ | |||||
using BPA.Message; | |||||
using BPA.Message.Enum; | |||||
using BPASmartClient.Helper; | |||||
using BPASmartClient.Message; | |||||
using BPASmartClient.Model; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Collections.ObjectModel; | |||||
using System.Configuration; | |||||
using System.Data; | |||||
using System.Drawing; | |||||
using System.Linq; | |||||
using System.Threading.Tasks; | |||||
using System.Windows; | |||||
using System.Windows.Forms; | |||||
namespace BPASmartClient | |||||
{ | |||||
/// <summary> | |||||
/// Interaction logic for App.xaml | |||||
/// </summary> | |||||
public partial class App : System.Windows.Application | |||||
{ | |||||
protected override void OnStartup(StartupEventArgs e) | |||||
{ | |||||
base.OnStartup(e); | |||||
SystemHelper.GetInstance.CreateDesktopShortcut(); | |||||
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; | |||||
DataRead(); | |||||
MainWindow mainView = new MainWindow(); | |||||
mainView.Show(); | |||||
SplitScreenDisplay(); | |||||
NoCompleteOrderInit(); | |||||
} | |||||
/// <summary> | |||||
/// 分屏显示 | |||||
/// </summary> | |||||
private void SplitScreenDisplay() | |||||
{ | |||||
if (Screen.AllScreens.Length == 3) | |||||
{ | |||||
//left = new MORKD_Window_Left(); | |||||
//right = new MORKD_Window_Right(); | |||||
//Screen[] screen = Screen.AllScreens; | |||||
//Rectangle[] rectangle = new Rectangle[screen.Length]; | |||||
//Window[] windows = new Window[screen.Length]; | |||||
//windows[0] = mainView; | |||||
//windows[1] = left; | |||||
//windows[2] = right; | |||||
//for (int i = 0; i < screen.Length; i++) | |||||
//{ | |||||
// rectangle[i] = screen[i].WorkingArea; | |||||
// windows[i].Height = rectangle[i].Height; | |||||
// windows[i].Width = rectangle[i].Width; | |||||
// windows[i].Top = rectangle[i].Top; | |||||
// windows[i].Left = rectangle[i].Left; | |||||
//} | |||||
//left.Show(); | |||||
//right.Show(); | |||||
//windows[1].Owner = windows[0]; | |||||
//windows[2].Owner = windows[0]; | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 未完成订单初始化 | |||||
/// </summary> | |||||
private void NoCompleteOrderInit() | |||||
{ | |||||
if (Json<KeepDataBase>.Data.orderLists.Count > 0) | |||||
{ | |||||
OrderListDialogView listDialogView = new OrderListDialogView(); | |||||
listDialogView.ShowDialog(); | |||||
} | |||||
} | |||||
private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) | |||||
{ | |||||
var ErroLog = e.ExceptionObject.ToString(); | |||||
MessageLog.GetInstance.Show(ErroLog); | |||||
TextHelper.GetInstance.WriteTextInfo(ErroLog, "ErroLog"); | |||||
DataSave(); | |||||
//SqlHelper.GetInstance.Save(); | |||||
//MainConsole.Main.GetInstance.DataSave(); | |||||
//IotReport.GetInstance.HttpAddLog(new BPA.Message.API请求.LogTable | |||||
//{ | |||||
// ClientId = InternetInfo.ClientId.ToString(), | |||||
// LogTime = DateTime.Now, | |||||
// LogType = "1", | |||||
// LogMessage = ErroLog, | |||||
// LogVla = "异常", | |||||
//}); | |||||
// Process.Start($"{AppDomain.CurrentDomain.BaseDirectory}{AppDomain.CurrentDomain.FriendlyName}.exe"); | |||||
} | |||||
protected override void OnExit(ExitEventArgs e) | |||||
{ | |||||
base.OnExit(e); | |||||
DataSave(); | |||||
//IotReport.Close(); | |||||
//SqlHelper.GetInstance.Save(); | |||||
//MainConsole.Main.GetInstance.DataSave(); | |||||
ThreadManage.GetInstance().Dispose(); | |||||
System.Environment.Exit(0); | |||||
} | |||||
/// <summary> | |||||
/// 输入保存 | |||||
/// </summary> | |||||
private void DataSave() | |||||
{ | |||||
Json<KeepDataBase>.Save(); | |||||
//Sqlite<Alarm>.GetInstance.Save(); | |||||
} | |||||
/// <summary> | |||||
/// 输入读取 | |||||
/// </summary> | |||||
private void DataRead() | |||||
{ | |||||
Json<KeepDataBase>.Read(); | |||||
Task.Run(new Action(() => { Sqlite<Alarm>.GetInstance.GetData(); })); | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,32 @@ | |||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | |||||
<!--#region 按钮样式--> | |||||
<Style x:Key="ButtonStyle" TargetType="Button"> | |||||
<Setter Property="Foreground" Value="#00c2f4" /> | |||||
<Setter Property="FontSize" Value="18" /> | |||||
<Setter Property="Margin" Value="10,0" /> | |||||
<Setter Property="Template"> | |||||
<Setter.Value> | |||||
<ControlTemplate TargetType="Button"> | |||||
<Border | |||||
Name="TitleBarBr" | |||||
Background="Transparent" | |||||
BorderBrush="#00c2f4" | |||||
BorderThickness="2" | |||||
CornerRadius="10"> | |||||
<ContentPresenter | |||||
Margin="{TemplateBinding Margin}" | |||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" | |||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" /> | |||||
</Border> | |||||
<ControlTemplate.Triggers> | |||||
<Trigger Property="IsMouseOver" Value="true"> | |||||
<Setter TargetName="TitleBarBr" Property="Background" Value="#3300c2f4" /> | |||||
</Trigger> | |||||
</ControlTemplate.Triggers> | |||||
</ControlTemplate> | |||||
</Setter.Value> | |||||
</Setter> | |||||
</Style> | |||||
<!--#endregion--> | |||||
</ResourceDictionary> |
@@ -16,10 +16,16 @@ | |||||
</UserControl.DataContext> | </UserControl.DataContext> | ||||
<Grid> | <Grid> | ||||
<Label | |||||
HorizontalAlignment="Center" | |||||
VerticalAlignment="Center" | |||||
Content="调试界面" | |||||
FontSize="40" /> | |||||
<Grid.RowDefinitions> | |||||
<RowDefinition Height="35" /> | |||||
<RowDefinition /> | |||||
</Grid.RowDefinitions> | |||||
<Button | |||||
Grid.Row="0" | |||||
Width="150" | |||||
Margin="10,0,0,0" | |||||
HorizontalAlignment="Left" | |||||
Content="初始化设备" | |||||
Style="{StaticResource ButtonStyle}" /> | |||||
</Grid> | </Grid> | ||||
</UserControl> | </UserControl> |
@@ -3,8 +3,8 @@ | |||||
<appSettings> | <appSettings> | ||||
<!--通用配置--> | <!--通用配置--> | ||||
<add key="ClientId" value="54"/> | |||||
<add key="IsEnableTest" value="False"/> | |||||
<add key="ClientId" value="43"/> | |||||
<add key="IsEnableTest" value="true"/> | |||||
<!--开发环境--> | <!--开发环境--> | ||||
<!--<add key="apollouri" value="http://10.2.1.21:28080/"/> | <!--<add key="apollouri" value="http://10.2.1.21:28080/"/> | ||||
@@ -16,8 +16,7 @@ | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecToggleButton.xaml" /> | <ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecToggleButton.xaml" /> | ||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/BeveledRadioButtonStyle.xaml" /> | <ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/BeveledRadioButtonStyle.xaml" /> | ||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/DatePickeerDictionary.xaml" /> | <ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/DatePickeerDictionary.xaml" /> | ||||
<!--<ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml"/> | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml"/>--> | |||||
<ResourceDictionary Source="/BPASmartClient.CustomResource;component/RecDictionarys/RecButtonStyle.xaml" /> | |||||
<ResourceDictionary> | <ResourceDictionary> | ||||
<con:ColorConverter x:Key="ColorConverter" /> | <con:ColorConverter x:Key="ColorConverter" /> | ||||