Kaynağa Gözat

提交大屏样式

样式分支
fyf 2 yıl önce
ebeveyn
işleme
4577617ffe
61 değiştirilmiş dosya ile 4786 ekleme ve 1 silme
  1. +9
    -0
      BPASmartClient.ScreenALL/App.config
  2. +8
    -0
      BPASmartClient.ScreenALL/App.xaml
  3. +27
    -0
      BPASmartClient.ScreenALL/App.xaml.cs
  4. +10
    -0
      BPASmartClient.ScreenALL/AssemblyInfo.cs
  5. +24
    -0
      BPASmartClient.ScreenALL/BPASmartClient.ScreenALL.csproj
  6. BIN
     
  7. +56
    -0
      BPASmartClient.ScreenLib/AppMain.cs
  8. +10
    -0
      BPASmartClient.ScreenLib/AssemblyInfo.cs
  9. +26
    -0
      BPASmartClient.ScreenLib/BPASmartClient.ScreenLib.csproj
  10. +238
    -0
      BPASmartClient.ScreenLib/Helper/FSystemHelper.cs
  11. +206
    -0
      BPASmartClient.ScreenLib/Helper/Main.cs
  12. +20
    -0
      BPASmartClient.ScreenLib/Model/DevRunStatus.cs
  13. +163
    -0
      BPASmartClient.ScreenLib/Model/OrderMakeModel.cs
  14. +219
    -0
      BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl1.xaml
  15. +70
    -0
      BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl1.xaml.cs
  16. +145
    -0
      BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl1ViewModel.cs
  17. +219
    -0
      BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl2.xaml
  18. +29
    -0
      BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl2.xaml.cs
  19. +145
    -0
      BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl2ViewModel.cs
  20. +219
    -0
      BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3.xaml
  21. +30
    -0
      BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3.xaml.cs
  22. +146
    -0
      BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3ViewModel.cs
  23. +31
    -0
      BPASmartClient.ScreenLib/分餐机/WindowShow.xaml
  24. +41
    -0
      BPASmartClient.ScreenLib/分餐机/WindowShow.xaml.cs
  25. +333
    -0
      BPASmartClient.ScreenLib/总监视大屏/ScreenALLControl.xaml
  26. +29
    -0
      BPASmartClient.ScreenLib/总监视大屏/ScreenALLControl.xaml.cs
  27. +216
    -0
      BPASmartClient.ScreenLib/总监视大屏/ScreenALLControlViewModel.cs
  28. +396
    -0
      BPASmartClient.ScreenLib/炒锅/ScreenMaxWokControl.xaml
  29. +29
    -0
      BPASmartClient.ScreenLib/炒锅/ScreenMaxWokControl.xaml.cs
  30. +176
    -0
      BPASmartClient.ScreenLib/炒锅/ScreenMaxWokControlViewModel.cs
  31. +396
    -0
      BPASmartClient.ScreenLib/炒锅/ScreenMinWokControl.xaml
  32. +29
    -0
      BPASmartClient.ScreenLib/炒锅/ScreenMinWokControl.xaml.cs
  33. +191
    -0
      BPASmartClient.ScreenLib/炒锅/ScreenMinWokControlViewModel.cs
  34. +222
    -0
      BPASmartClient.ScreenLib/煮面机/ScreenMorksControl.xaml
  35. +29
    -0
      BPASmartClient.ScreenLib/煮面机/ScreenMorksControl.xaml.cs
  36. +191
    -0
      BPASmartClient.ScreenLib/煮面机/ScreenMorksControlViewModel.cs
  37. +9
    -0
      BPASmartClient.ScreenMaxWok/App.config
  38. +8
    -0
      BPASmartClient.ScreenMaxWok/App.xaml
  39. +27
    -0
      BPASmartClient.ScreenMaxWok/App.xaml.cs
  40. +10
    -0
      BPASmartClient.ScreenMaxWok/AssemblyInfo.cs
  41. +23
    -0
      BPASmartClient.ScreenMaxWok/BPASmartClient.ScreenMaxWok.csproj
  42. BIN
     
  43. +9
    -0
      BPASmartClient.ScreenMinWok/App.config
  44. +8
    -0
      BPASmartClient.ScreenMinWok/App.xaml
  45. +27
    -0
      BPASmartClient.ScreenMinWok/App.xaml.cs
  46. +10
    -0
      BPASmartClient.ScreenMinWok/AssemblyInfo.cs
  47. +24
    -0
      BPASmartClient.ScreenMinWok/BPASmartClient.ScreenMinWok.csproj
  48. BIN
     
  49. +9
    -0
      BPASmartClient.ScreenMorks/App.config
  50. +8
    -0
      BPASmartClient.ScreenMorks/App.xaml
  51. +27
    -0
      BPASmartClient.ScreenMorks/App.xaml.cs
  52. +10
    -0
      BPASmartClient.ScreenMorks/AssemblyInfo.cs
  53. +24
    -0
      BPASmartClient.ScreenMorks/BPASmartClient.ScreenMorks.csproj
  54. BIN
     
  55. +9
    -0
      BPASmartClient.ScreenSplitMeals/App.config
  56. +8
    -0
      BPASmartClient.ScreenSplitMeals/App.xaml
  57. +27
    -0
      BPASmartClient.ScreenSplitMeals/App.xaml.cs
  58. +10
    -0
      BPASmartClient.ScreenSplitMeals/AssemblyInfo.cs
  59. +24
    -0
      BPASmartClient.ScreenSplitMeals/BPASmartClient.ScreenSplitMeals.csproj
  60. BIN
     
  61. +147
    -1
      SmartClient.sln

+ 9
- 0
BPASmartClient.ScreenALL/App.config Dosyayı Görüntüle

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<!--Redis配置-->
<add key="RedisConnection" value="10.2.1.254,6379,BapAdmin123456.,1"/>
<add key="DeviceMC" value="1"/>
<add key="GgAdder" value="https://stream7.iqilu.com/10339/upload_transcode/202002/18/20200218114723HDu3hhxqIT.mp4"/>
</appSettings>
</configuration>

+ 8
- 0
BPASmartClient.ScreenALL/App.xaml Dosyayı Görüntüle

@@ -0,0 +1,8 @@
<Application x:Class="BPASmartClient.ScreenALL.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:BPASmartClient.ScreenALL">
<Application.Resources>
</Application.Resources>
</Application>

+ 27
- 0
BPASmartClient.ScreenALL/App.xaml.cs Dosyayı Görüntüle

@@ -0,0 +1,27 @@
using BPASmartClient.ScreenLib;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace BPASmartClient.ScreenALL
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
AppMain appMain = new AppMain(MainWindow, this.GetType());
}
protected override void OnExit(ExitEventArgs e)
{
base.OnExit(e);
}
}
}

+ 10
- 0
BPASmartClient.ScreenALL/AssemblyInfo.cs Dosyayı Görüntüle

@@ -0,0 +1,10 @@
using System.Windows;

[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

+ 24
- 0
BPASmartClient.ScreenALL/BPASmartClient.ScreenALL.csproj Dosyayı Görüntüle

@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<AssemblyName>总监控大屏</AssemblyName>
<ApplicationIcon>hbl.ico</ApplicationIcon>

</PropertyGroup>

<ItemGroup>
<Content Include="hbl.ico" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BPASmartClient.ScreenLib\BPASmartClient.ScreenLib.csproj" />
</ItemGroup>
<ItemGroup>
<Resource Include="App.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
</ItemGroup>
</Project>


+ 56
- 0
BPASmartClient.ScreenLib/AppMain.cs Dosyayı Görüntüle

@@ -0,0 +1,56 @@
using BPA.CustomResource.UserControls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Forms;

namespace BPASmartClient.ScreenLib
{
public partial class AppMain
{
public AppMain(Window window, Type type)
{
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
FSystemHelper.GetInstance.CreateDesktopShortcut();
WindowLargeScreen windowLarge = new WindowLargeScreen();
#region 设置显示页面与标题
string TitleName = $"{type.Assembly.ManifestModule.Name.Replace(".dll", "")}";
string name= type.FullName.Split('.')[2];
string sbmc=string.Empty;
switch (type.FullName)
{
case "BPASmartClient.ScreenALL.App":
windowLarge.Init(TitleName, new ScreenALLControl()); windowLarge.Show();
break;
case "BPASmartClient.ScreenMaxWok.App":
windowLarge.Init(TitleName, new ScreenMaxWokControl()); windowLarge.Show();
break;
case "BPASmartClient.ScreenMinWok.App":
windowLarge.Init(TitleName, new ScreenMinWokControl()); windowLarge.Show();
break;
case "BPASmartClient.ScreenMorks.App":
windowLarge.Init(TitleName, new ScreenMorksControl()); windowLarge.Show();
break;
case "BPASmartClient.ScreenSplitMeals.App":
ScreenSplitMealsControl1 ScreenSplit=new ScreenSplitMealsControl1();
windowLarge.Init("一号" + TitleName, ScreenSplit);
windowLarge.Show();
ScreenSplit.Start(TitleName);
break;
}
#endregion
window = windowLarge;
Main main = new Main();
main.Start();
}

private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{

}

}
}

+ 10
- 0
BPASmartClient.ScreenLib/AssemblyInfo.cs Dosyayı Görüntüle

@@ -0,0 +1,10 @@
using System.Windows;

[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

+ 26
- 0
BPASmartClient.ScreenLib/BPASmartClient.ScreenLib.csproj Dosyayı Görüntüle

@@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
</PropertyGroup>
<ItemGroup>
<COMReference Include="IWshRuntimeLibrary">
<WrapperTool>tlbimp</WrapperTool>
<VersionMinor>0</VersionMinor>
<VersionMajor>1</VersionMajor>
<Guid>f935dc20-1cf0-11d0-adb9-00c04fd58a0b</Guid>
<Lcid>0</Lcid>
<Isolated>false</Isolated>
<EmbedInteropTypes>true</EmbedInteropTypes>
<UseWindowsForms>true</UseWindowsForms>
</COMReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="BPA.CustomResource" Version="1.0.4" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.1418.22" />
</ItemGroup>

</Project>

+ 238
- 0
BPASmartClient.ScreenLib/Helper/FSystemHelper.cs Dosyayı Görüntüle

@@ -0,0 +1,238 @@
using BPA.Helper;
using IWshRuntimeLibrary;
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.ScreenLib
{
/// <summary>
/// 系统操作类
/// </summary>
public class FSystemHelper
{
private volatile static FSystemHelper _Instance;
public static FSystemHelper GetInstance => _Instance ?? (_Instance = new FSystemHelper());
private FSystemHelper() { }

/// <summary>
/// 获取当前应用程序名称,包括后缀名
/// </summary>
public string GetApplicationName => $"{AppDomain.CurrentDomain.FriendlyName}.exe";

/// <summary>
/// 获取当前应用程序完整路径
/// </summary>
public string GetApplicationPath => $"{AppDomain.CurrentDomain.BaseDirectory}{GetApplicationName}";

/// <summary>
/// 创建桌面快捷方式
/// </summary>
/// <returns>成功或失败</returns>
public bool CreateDesktopShortcut()
{
//1、在COM对象中找到 Windows Script Host Object Model
//2、添加引用 using IWshRuntimeLibrary;
string deskTop = string.Empty;
try
{
deskTop = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + "\\";
if (System.IO.File.Exists(deskTop + GetApplicationName + ".lnk")) //
{
return true;
//System.IO.File.Delete(deskTop + FileName + ".lnk");//删除原来的桌面快捷键方式
}
WshShell shell = new WshShell();
//快捷键方式创建的位置、名称
IWshShortcut shortcut = shell.CreateShortcut(deskTop + GetApplicationName + ".lnk") as IWshShortcut;
shortcut.TargetPath = GetApplicationPath; //目标文件
//该属性指定应用程序的工作目录,当用户没有指定一个具体的目录时,快捷方式的目标应用程序将使用该属性所指定的目录来装载或保存文件。
shortcut.WorkingDirectory = System.Environment.CurrentDirectory;
shortcut.WindowStyle = 1; //目标应用程序的窗口状态分为普通、最大化、最小化【1,3,7】
shortcut.Description = GetApplicationName; //描述
//shortcut.IconLocation = exePath + "\\logo.ico"; //快捷方式图标
shortcut.Arguments = "";
//shortcut.Hotkey = "CTRL+ALT+F11"; // 快捷键
shortcut.Save(); //必须调用保存快捷才成创建成功
return true;
}
catch (Exception ex)
{
MessageLog.GetInstance.ShowEx(ex.ToString());
return false;
}
}

/// <summary>
/// 设置开机自启动
/// </summary>
/// <param name="isAuto">true:开机启动,false:不开机自启</param>
public void AutoStart(bool isAuto = true)
{
if (isAuto == true)
{
RegistryKey R_local = Registry.CurrentUser;
RegistryKey R_run = R_local.CreateSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run");
R_run.SetValue(GetApplicationName, GetApplicationPath);
R_run.Close();
R_local.Close();
}
else
{
RegistryKey R_local = Registry.CurrentUser;
RegistryKey R_run = R_local.CreateSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run");
R_run.DeleteValue(GetApplicationName, false);
R_run.Close();
R_local.Close();
}
}

/// <summary>
/// 判断是否是自动启动
/// </summary>
/// <returns></returns>
public bool IsAutoStart()
{
RegistryKey R_local = Registry.CurrentUser;
RegistryKey R_run = R_local.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run");
bool res = R_run.GetValueNames().Contains(GetApplicationName);
R_run.Close();
R_local.Close();
return res;
}

#region U盘,串口插拔信息
private const int WM_DEVICECHANGE = 0x219; //设备改变
private const int DBT_DEVICEARRIVAL = 0x8000; //检测到新设备
private const int DBT_DEVICEREMOVECOMPLETE = 0x8004; //移除设备
public const int DBT_DEVTYP_PORT = 0x00000003;
public const int DBT_DEVTYP_VOLUME = 0x00000002;

public IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
{
if (msg == WM_DEVICECHANGE)
{
//插入
if (wParam.ToInt32() == DBT_DEVICEARRIVAL)
{
var volume = (DEV_BROADCAST_HDR)Marshal.PtrToStructure(lParam, typeof(DEV_BROADCAST_HDR));

switch (volume.dbch_devicetype)
{
case DBT_DEVTYP_PORT://串口设备
string portName = Marshal.PtrToStringUni(lParam + Marshal.SizeOf(typeof(DEV_BROADCAST_PORT)));
MessageLog.GetInstance.Show($"插入串口:[{portName}]");
break;
case DBT_DEVTYP_VOLUME:
var drive = GetDrive(lParam);
MessageLog.GetInstance.Show($"usb插入:[{drive}]");
break;
default:
break;
}
}

//拔出
if (wParam.ToInt32() == DBT_DEVICEREMOVECOMPLETE)
{
var volume = (DEV_BROADCAST_HDR)Marshal.PtrToStructure(lParam, typeof(DEV_BROADCAST_HDR));
switch (volume.dbch_devicetype)
{
case DBT_DEVTYP_PORT://串口设备
string portName = Marshal.PtrToStringUni(lParam + Marshal.SizeOf(typeof(DEV_BROADCAST_PORT)));
MessageLog.GetInstance.Show($"拔出串口:[{portName}]");
break;
case DBT_DEVTYP_VOLUME:
var drive = GetDrive(lParam);
MessageLog.GetInstance.Show($"usb拔出:[{drive}]");
break;
default:
break;
}
}
}
return IntPtr.Zero;
}

private static string GetDrive(IntPtr lParam)
{
var volume = (DEV_BROADCAST_VOLUME)Marshal.PtrToStructure(lParam, typeof(DEV_BROADCAST_VOLUME));
var letter = GetLetter(volume.dbcv_unitmask);
return string.Format("{0}:\\", letter);
}

/// <summary>
/// 获得盘符
/// </summary>
/// <param name="dbcvUnitmask">
/// 1 = A
/// 2 = B
/// 4 = C...
/// </param>
/// <returns>结果是A~Z的任意一个字符或者为'?'</returns>
private static char GetLetter(uint dbcvUnitmask)
{
const char nona = '?';
const string drives = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
if (dbcvUnitmask == 0) return nona;
var i = 0;
var pom = dbcvUnitmask >> 1;
while (pom != 0)
{
pom = pom >> 1;
i++;
}
if (i < drives.Length)
return drives[i];
return nona;
}


#endregion
}

[StructLayout(LayoutKind.Sequential)]
struct DEV_BROADCAST_HDR
{
public UInt32 dbch_size;
public UInt32 dbch_devicetype;
public UInt32 dbch_reserved;
}

[StructLayout(LayoutKind.Sequential)]
struct DEV_BROADCAST_PORT
{
public uint dbcp_size;
public uint dbcp_devicetype;
public uint dbcp_reserved;
}

[StructLayout(LayoutKind.Sequential)]
struct DEV_BROADCAST_PORT_A
{
public uint dbcp_size;
public uint dbcp_devicetype;
public uint dbcp_reserved;
//public string dbcp_name;
}

[StructLayout(LayoutKind.Sequential)]
struct DEV_BROADCAST_VOLUME
{
/// DWORD->unsigned int
public uint dbcv_size;
/// DWORD->unsigned int
public uint dbcv_devicetype;
/// DWORD->unsigned int
public uint dbcv_reserved;
/// DWORD->unsigned int
public uint dbcv_unitmask;
/// WORD->unsigned short
public ushort dbcv_flags;
}
}

+ 206
- 0
BPASmartClient.ScreenLib/Helper/Main.cs Dosyayı Görüntüle

@@ -0,0 +1,206 @@
using BPA.Communication;
using BPA.Helper;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace BPASmartClient.ScreenLib
{
/// <summary>
/// 主函数
/// </summary>
public class Main
{
#region 接口继承变量
/// <summary>
/// Redis连接信息
/// </summary>
public string RedisConnection { get; set; }
/// <summary>
/// 业务名称
/// </summary>
private string _Name = string.Empty;
public string Name
{
get { return _Name; }
set
{
_Name = value;
ThreadServer();
}
}
/// <summary>
/// 是否自动重启(出现健康检查未通过时)
/// </summary>
public bool AutoRestart { get; set; }
#endregion

#region 自建变量
/// <summary>
/// 是否运行
/// </summary>
public bool IsRunning { get; set; }
/// <summary>
/// Redis是否运行
/// </summary>
public bool IsRunningReids => RedisHelper.GetInstance.IsConnected();
/// <summary>
/// 主函数
/// </summary>
private static volatile Main _Instance;
public static Main GetInstance => _Instance ?? (_Instance = new Main());
public Main() {
RedisConnection= System.Configuration.ConfigurationManager.AppSettings["RedisConnection"].ToString();
Name = System.Configuration.ConfigurationManager.AppSettings["DeviceMC"].ToString();
}
/// <summary>
/// 设备数据
/// </summary>
public List<RedisDataModel> reeisDatas { get; set; } = new List<RedisDataModel>();
/// <summary>
/// 告警数据
/// </summary>
public List<RedisDataModel> reeisDatasAic { get; set; } = new List<RedisDataModel>();
#endregion

#region 线程处理函数
/// <summary>
/// 线程服务
/// </summary>
public void ThreadServer()
{
ThreadManage.GetInstance().StartLong(new Action(() =>
{
try
{
if (IsRunning && IsRunningReids)
{
//1.读取Redis变量
List<RedisDataModel> Values = RedisHelper.GetInstance.Read<List<RedisDataModel>>($"{Name}[Device]").Content;
List<RedisDataModel> reeisDatasAic = RedisHelper.GetInstance.Read<List<RedisDataModel>>($"{Name}[Alarm]").Content;
}
}
catch (Exception ex)
{
MessageLog.GetInstance.ShowEx($"{Name}:线程服务异常,原因:{ex.Message}");
}
Thread.Sleep(100);
}), $"{Name},线程服务");
}
#endregion

#region 启动、停止、健康检查
/// <summary>
/// 开始服务
/// </summary>
public void Start()
{
try
{
//连接MQTT、Redis
Connection();
IsRunning = true;
}
catch (Exception ex)
{
MessageLog.GetInstance.ShowEx($"{Name}:MQTT或者Redis启动时,连接失败,原因:{ex.Message}");
}
}
/// <summary>
/// 停止服务
/// </summary>
public void Stop()
{
try
{
//0.设置运行标志
IsRunning = false;
}
catch (Exception ex)
{
MessageLog.GetInstance.ShowEx($"{Name}:MQTT或者Redis停止时异常,原因:{ex.Message}");
}
}
/// <summary>
/// 健康检查
/// </summary>
/// <param name="msg"></param>
/// <returns></returns>
public bool Check(out string msg)
{
string msgage = string.Empty;
bool IsTrue = false;
if (IsRunningReids && IsRunning)
IsTrue = true;
else
{
if (!IsRunningReids)
msgage += "Redis断开连接.";
IsTrue = false;
msgage = $"{Name}:健康检查失败,原因:{msgage}";
}
msg = msgage;
return IsTrue;
}
#endregion

#region 调用事件
/// <summary>
/// 初始化连接Redis MQTT
/// </summary>
public void Connection()
{
try
{
//1.连接Redis,如果已经连接过了 那么自动不会去连接
if (!string.IsNullOrEmpty(this.RedisConnection) && this.RedisConnection.Contains(','))
{
string[] rediscom = this.RedisConnection.Split(',');
if (rediscom != null && rediscom.Count() == 4)
RedisHelper.GetInstance.Connect(new ConfigurationOptions()
{
ServerAddress = $"{rediscom[0]}:{int.Parse(rediscom[1])}",
Password = rediscom[2]
});
}
}
catch (Exception ex)
{
MessageLog.GetInstance.ShowEx($"{Name}:初始化连接Redis MQTT,原因:{ex.Message}");
}

}
#endregion
}


/// <summary>
/// Redis 数据存储格式
/// </summary>
public class RedisDataModel
{
public string VarName { get; set; }
public string VarVaule { get; set; }
public EDataType DataType { get; set; }
}

/// <summary>
/// 数据类型枚举
/// </summary>
public enum EDataType
{
Bool = 1,
Byte = 2,
Int = 3,
Word = 4,
Dint = 5,
Dword = 6,
Float = 7,
Double = 8,
String = 9,
}
}

+ 20
- 0
BPASmartClient.ScreenLib/Model/DevRunStatus.cs Dosyayı Görüntüle

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.ScreenLib
{
public enum DevRunStatus
{
正常,
异常
}

public enum DevIsRun
{
运行,
停止
}
}

+ 163
- 0
BPASmartClient.ScreenLib/Model/OrderMakeModel.cs Dosyayı Görüntüle

@@ -0,0 +1,163 @@
using BPA.Helper;
using BPA.Message.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;

namespace BPASmartClient.ScreenLib
{
/// <summary>
/// 订单制作Model
/// </summary>
public class OrderMakeModel : NotifyBase
{
/// <summary>
/// 状态
/// </summary>
private ORDER_STATUS _Status;
public ORDER_STATUS Status
{
get { return _Status; }
set {
_Status = value;
foreground = new SolidColorBrush(Color.FromArgb(255, 0, 204, 255));
switch ((ORDER_STATUS)value)
{
case ORDER_STATUS.WAIT:
MakeStatus = "等待制作";

foreground = new SolidColorBrush(Color.FromArgb(255, 0, 204, 255));
break;
case ORDER_STATUS.COOKING:
MakeStatus = "制作中";
foreground = new SolidColorBrush(Color.FromArgb(255, 0, 255, 127));
break;
case ORDER_STATUS.COMPLETED_COOK:
MakeStatus = "制作完成";
foreground = new SolidColorBrush(Color.FromArgb(255, 255, 215, 00));
break;
case ORDER_STATUS.COMPLETED_TAKE:
MakeStatus = "取餐完成";
foreground = new SolidColorBrush(Color.FromArgb(255, 102, 204, 153));
break;
case ORDER_STATUS.ERR_NOT_REPLY_WHEN_COOKING:
MakeStatus = "取餐完成";
foreground = new SolidColorBrush(Color.FromArgb(255, 255, 0, 0));
break;
default:
MakeStatus = "异常订单";
break;
}
OnPropertyChanged();
}
}
/// <summary>
/// 制作状态
/// </summary>
private string _MakeStatus;
public string MakeStatus
{
get { return _MakeStatus; }
set
{
_MakeStatus = value;
OnPropertyChanged();
}
}
/// <summary>
/// 商品名称
/// </summary>
public string GoodName { get; set; }

/// <summary>
/// 订单排序号
/// </summary>
public string SortNum { get; set; }

/// <summary>
/// 开始时间
/// </summary>
public string StartTime { get; set; }

/// <summary>
/// 结束时间
/// </summary>
public string StopTime { get; set; }

private Brush _foreground;
public Brush foreground
{
get
{
return _foreground;
}
set
{
if (_foreground == value)
return;
_foreground = value;
OnPropertyChanged("foreground");
}
}
}

/// <summary>
/// 告警数据
/// </summary>
public class AlarmMsModel : NotifyBase
{
private string _AlarmTime;
public string AlarmTime
{
get { return _AlarmTime; }
set
{
_AlarmTime = value;
OnPropertyChanged();
}
}


private string _AlarmMs;
public string AlarmMs
{
get { return _AlarmMs; }
set
{
_AlarmMs = value;
OnPropertyChanged();
}
}
}

/// <summary>
/// 菜品类型
/// </summary>
public class CookType : NotifyBase
{
private string _Name;
public string Name
{
get { return _Name; }
set
{
_Name = value;
OnPropertyChanged();
}
}

private string _Name1;
public string Name1
{
get { return _Name1; }
set
{
_Name1 = value;
OnPropertyChanged();
}
}
}
}

+ 219
- 0
BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl1.xaml Dosyayı Görüntüle

@@ -0,0 +1,219 @@
<UserControl x:Class="BPASmartClient.ScreenLib.ScreenSplitMealsControl1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BPASmartClient.ScreenLib"
xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
xmlns:con="clr-namespace:BPA.CustomResource.UserControls;assembly=BPA.CustomResource"
mc:Ignorable="d"
d:DesignHeight="1080" d:DesignWidth="1920">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/BPA.CustomResource;component/Themes/ProlineStyle.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>

<StackPanel Margin="0,10,0,0">
<GroupBox Grid.Row="0" Margin="10,0,10,0" Height="460" Width="450" Header="2 号档口" Style="{DynamicResource from}" Tag="Start">
<StackPanel>
<GroupBox Header="设备运行情况" Margin="20,10,0,0"/>
<Grid Height="160" >
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="100" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding DevIsRun,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="停止">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">设备是否运行</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding RunStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="异常">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">设备当前状态</TextBlock>
</StackPanel>
</Grid>
<GroupBox Header="刷卡信息统计" Margin="20,10,0,0"/>
<Grid Height="160">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="100" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" FontSize="52" Foreground="#FFD2C106" Text="{Binding DdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">今日刷卡数</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" Foreground="#FFEC3107" FontSize="52" Text="{Binding YCDdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">异常刷卡数</TextBlock>
</StackPanel>
</Grid>

</StackPanel>
</GroupBox>
<GroupBox Margin="0,20,10,0" Height="480" Width="450" Header="今日菜品列表" Style="{DynamicResource from}" Tag="Start">
<ListBox ItemsSource="{Binding CookTypeListLeft,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<ListBox.ItemTemplate>
<DataTemplate>
<WrapPanel>
<Button Width="170" Height="100" Margin="20,20,0,0" Content="{Binding Name}"/>
<Button Width="170" Height="100" Margin="20,20,0,0" Content="{Binding Name1}"/>
</WrapPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</GroupBox>
</StackPanel>

<StackPanel Grid.Column="1" >
<GroupBox Height="600" Width="950" Margin="0,10,0,20" Header="广告区域" HorizontalAlignment="Center" VerticalAlignment="Top" Style="{DynamicResource from}" Tag="Start">
<Grid>
<wv2:WebView2 Name="webView" Source="{Binding GgAdder,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
</GroupBox>

<StackPanel Orientation="Horizontal">
<GroupBox Margin="5,0,0,0" Height="340" Width="470" Header="今日菜品刷卡统计图" Style="{DynamicResource from}">
<StackPanel>
<con:BasicBarChart Margin="30,40,0,0" HorizontalAlignment="Center" VerticalAlignment="Center" SeriesArray="{Binding Histogram,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="410" Height="200" ShowSize="50"></con:BasicBarChart>
</StackPanel>
</GroupBox>

<GroupBox Margin="10,0,0,0" Height="340" Width="470" Header="设备告警详情" Style="{DynamicResource from}">
<DataGrid Margin="0,10,0,0" ItemsSource="{Binding AlarmList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="160">
<DataGridTemplateColumn.Header>
<TextBlock Text="告警时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding AlarmTime}" Foreground="#FFD86E03" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="300">
<DataGridTemplateColumn.Header>
<TextBlock Text="告警描述" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding AlarmMs}" Foreground="#FFD86E03" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</GroupBox>
</StackPanel>
</StackPanel>

<StackPanel Grid.Column="2" Margin="0,10,0,0">
<GroupBox Grid.Row="0" Margin="10,0,10,0" Height="460" Width="450" Header="1 号档口" Style="{DynamicResource from}" Tag="Start">
<StackPanel>
<GroupBox Header="设备运行情况" Margin="20,10,0,0"/>
<Grid Height="160" >
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="100" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding DevIsRun,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="停止">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">设备是否运行</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding RunStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="异常">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">设备当前状态</TextBlock>
</StackPanel>
</Grid>
<GroupBox Header="刷卡信息统计" Margin="20,10,0,0"/>
<Grid Height="160">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="100" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" FontSize="52" Foreground="#FFD2C106" Text="{Binding DdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">今日刷卡数</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" Foreground="#FFEC3107" FontSize="52" Text="{Binding YCDdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">异常刷卡数</TextBlock>
</StackPanel>
</Grid>

</StackPanel>

</GroupBox>
<GroupBox Margin="0,20,10,0" Height="480" Width="450" Header="今日菜品列表" Style="{DynamicResource from}" Tag="Start">
<ListBox ItemsSource="{Binding CookTypeListReit,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<ListBox.ItemTemplate>
<DataTemplate>
<WrapPanel>
<Button Width="170" Height="100" Margin="20,20,0,0" Content="{Binding Name}"/>
<Button Width="170" Height="100" Margin="20,20,0,0" Content="{Binding Name1}"/>
</WrapPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</GroupBox>
</StackPanel>
</Grid>

</UserControl>

+ 70
- 0
BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl1.xaml.cs Dosyayı Görüntüle

@@ -0,0 +1,70 @@
using BPA.CustomResource.UserControls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace BPASmartClient.ScreenLib
{
/// <summary>
/// ScreenSplitMealsControl1.xaml 的交互逻辑
/// </summary>
public partial class ScreenSplitMealsControl1 : UserControl
{
public ScreenSplitMealsControl1()
{
InitializeComponent();
this.DataContext = new ScreenSplitMealsControl1ViewModel();
}

public void Start(string name)
{
WindowShow windowLarge2 = new WindowShow();
windowLarge2.Init("二号" + name, new ScreenSplitMealsControl2());
WindowShow windowLarge3 = new WindowShow();
windowLarge3.Init("三号"+ name, new ScreenSplitMealsControl3());
int i = 0;
foreach (System.Windows.Forms.Screen scr in System.Windows.Forms.Screen.AllScreens)
{
if (!scr.Primary)
{
if (i == 1)
{
windowLarge2.WindowStartupLocation = WindowStartupLocation.Manual;

windowLarge2.Left = scr.WorkingArea.Left;
windowLarge2.Top = scr.WorkingArea.Top;
windowLarge2.Width = scr.Bounds.Width;
windowLarge2.Height = scr.Bounds.Height;
windowLarge2.WindowState = WindowState.Maximized;
windowLarge2.ResizeMode = ResizeMode.NoResize;
windowLarge2.WindowStyle = WindowStyle.None;
windowLarge2.WindowState = WindowState.Normal;
windowLarge2.ShowInTaskbar = false;
}
else if (i == 2)
{
windowLarge3.WindowStartupLocation = WindowStartupLocation.Manual;

windowLarge3.Left = scr.WorkingArea.Left;
windowLarge3.Top = scr.WorkingArea.Top;
windowLarge3.Width = scr.Bounds.Width;
windowLarge3.Height = scr.Bounds.Height;
}
i++;
}
}
windowLarge2.Show(); windowLarge3.Show();
}
}
}

+ 145
- 0
BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl1ViewModel.cs Dosyayı Görüntüle

@@ -0,0 +1,145 @@
using BPA.Helper;
using BPA.Message.Enum;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace BPASmartClient.ScreenLib
{
public class ScreenSplitMealsControl1ViewModel : NotifyBase
{
#region 变量
/// <summary>
/// 柱状图显示集合
/// </summary>
public IEnumerable<KeyValuePair<string, double>> Histogram { get { return _Histogram; } set { _Histogram = value; OnPropertyChanged(); } }
private IEnumerable<KeyValuePair<string, double>> _Histogram = new List<KeyValuePair<string, double>>();

/// <summary>
/// 设备是否运行
/// </summary>
public DevIsRun DevIsRun { get { return _DevIsRun; } set { _DevIsRun = value; OnPropertyChanged(); } }
private DevIsRun _DevIsRun = DevIsRun.停止;

/// <summary>
/// 设备状态
/// </summary>
public DevRunStatus RunStatus { get { return _RunStatus; } set { _RunStatus = value; OnPropertyChanged(); } }
private DevRunStatus _RunStatus = DevRunStatus.正常;

/// <summary>
/// 订单数
/// </summary>
public int DdCount { get { return _DdCount; } set { _DdCount = value; OnPropertyChanged(); } }
private int _DdCount = 0;

/// <summary>
/// 异常订单数
/// </summary>
public int YCDdCount { get { return _YCDdCount; } set { _YCDdCount = value; OnPropertyChanged(); } }
private int _YCDdCount = 0;

/// <summary>
/// 广告地址
/// </summary>
public Uri GgAdder { get { return _GgAdder; } set { _GgAdder = value; OnPropertyChanged(); } }
private Uri _GgAdder = new Uri(System.Configuration.ConfigurationManager.AppSettings["GgAdder"].ToString());

/// <summary>
/// 告警数据
/// </summary>
public ObservableCollection<AlarmMsModel> AlarmList
{
get { return _AlarmList; }
set
{
_AlarmList = value;
OnPropertyChanged();
}
}
private ObservableCollection<AlarmMsModel> _AlarmList = new ObservableCollection<AlarmMsModel>();

/// <summary>
/// 菜品类型-左
/// </summary>
public ObservableCollection<CookType> CookTypeListLeft
{
get { return _CookTypeListLeft; }
set
{
_CookTypeListLeft = value;
OnPropertyChanged();
}
}
private ObservableCollection<CookType> _CookTypeListLeft = new ObservableCollection<CookType>();

/// <summary>
/// 菜品类型-右边
/// </summary>
public ObservableCollection<CookType> CookTypeListReit
{
get { return _CookTypeListReit; }
set
{
_CookTypeListReit = value;
OnPropertyChanged();
}
}
private ObservableCollection<CookType> _CookTypeListReit = new ObservableCollection<CookType>();
#endregion
public ScreenSplitMealsControl1ViewModel()
{
Init();
}

/// <summary>
/// 初始化
/// </summary>
public void Init()
{
ThreadManage.GetInstance().StartLong(new Action(() =>
{
System.Windows.Application.Current?.Dispatcher.Invoke((Action)(() =>
{
RunStatus = RunStatus == DevRunStatus.正常 ? DevRunStatus.异常 : DevRunStatus.正常;
DevIsRun = DevIsRun == DevIsRun.运行 ? DevIsRun.停止 : DevIsRun.运行;
DdCount = new Random().Next(0, 400);
YCDdCount = new Random().Next(0, 400);

List<ORDER_STATUS> oRDER_s = new List<ORDER_STATUS>() { ORDER_STATUS.WAIT, ORDER_STATUS.COOKING };
List<ORDER_STATUS> oRDER_s1 = new List<ORDER_STATUS>() { ORDER_STATUS.COMPLETED_COOK, ORDER_STATUS.COMPLETED_TAKE };

List<string> name_s = new List<string>() { "担担面", "鸡蛋面", "火鸡面", "扬州炒饭", "回锅肉盖饭", "炒茄子" };
CookTypeListReit = new ObservableCollection<CookType>();
CookTypeListReit.Add(new CookType { Name = name_s[0],Name1= name_s[1] });
CookTypeListReit.Add(new CookType { Name = name_s[2], Name1 = name_s[3] });
CookTypeListReit.Add(new CookType { Name = name_s[4], Name1 = name_s[5] });

CookTypeListLeft = new ObservableCollection<CookType>();
CookTypeListLeft.Add(new CookType { Name = name_s[0], Name1 = name_s[1] });
CookTypeListLeft.Add(new CookType { Name = name_s[2], Name1 = name_s[3] });
CookTypeListLeft.Add(new CookType { Name = name_s[4], Name1 = name_s[5] });

AlarmList = new ObservableCollection<AlarmMsModel>();
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
Histogram = new[] {
new KeyValuePair<string, double>(name_s[0], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[1], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[2], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[3], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[4], new Random().Next(0,400))};
}));
Thread.Sleep(5000);
}), $"{DateTime.Now}_1,线程服务");
}
}
}

+ 219
- 0
BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl2.xaml Dosyayı Görüntüle

@@ -0,0 +1,219 @@
<UserControl x:Class="BPASmartClient.ScreenLib.ScreenSplitMealsControl2"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BPASmartClient.ScreenLib"
xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
xmlns:con="clr-namespace:BPA.CustomResource.UserControls;assembly=BPA.CustomResource"
mc:Ignorable="d"
d:DesignHeight="1080" d:DesignWidth="1920">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/BPA.CustomResource;component/Themes/ProlineStyle.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>

<StackPanel Margin="0,10,0,0">
<GroupBox Grid.Row="0" Margin="10,0,10,0" Height="460" Width="450" Header="4 号档口" Style="{DynamicResource from}" Tag="Start">
<StackPanel>
<GroupBox Header="设备运行情况" Margin="20,10,0,0"/>
<Grid Height="160" >
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="100" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding DevIsRun,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="停止">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">设备是否运行</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding RunStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="异常">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">设备当前状态</TextBlock>
</StackPanel>
</Grid>
<GroupBox Header="刷卡信息统计" Margin="20,10,0,0"/>
<Grid Height="160">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="100" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" FontSize="52" Foreground="#FFD2C106" Text="{Binding DdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">今日刷卡数</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" Foreground="#FFEC3107" FontSize="52" Text="{Binding YCDdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">异常刷卡数</TextBlock>
</StackPanel>
</Grid>

</StackPanel>

</GroupBox>
<GroupBox Margin="0,20,10,0" Height="480" Width="450" Header="今日菜品列表" Style="{DynamicResource from}" Tag="Start">
<ListBox ItemsSource="{Binding CookTypeListLeft,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<ListBox.ItemTemplate>
<DataTemplate>
<WrapPanel>
<Button Width="170" Height="100" Margin="20,20,0,0" Content="{Binding Name}"/>
<Button Width="170" Height="100" Margin="20,20,0,0" Content="{Binding Name1}"/>
</WrapPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</GroupBox>
</StackPanel>

<StackPanel Grid.Column="1" >
<GroupBox Height="600" Width="950" Margin="0,10,0,20" Header="广告区域" HorizontalAlignment="Center" VerticalAlignment="Top" Style="{DynamicResource from}" Tag="Start">
<Grid>
<wv2:WebView2 Name="webView" Source="{Binding GgAdder,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
</GroupBox>

<StackPanel Orientation="Horizontal">
<GroupBox Margin="5,0,0,0" Height="340" Width="470" Header="今日菜品刷卡统计图" Style="{DynamicResource from}">
<StackPanel>
<con:BasicBarChart Margin="30,40,0,0" HorizontalAlignment="Center" VerticalAlignment="Center" SeriesArray="{Binding Histogram,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="410" Height="200" ShowSize="50"></con:BasicBarChart>
</StackPanel>
</GroupBox>

<GroupBox Margin="10,0,0,0" Height="340" Width="470" Header="设备告警详情" Style="{DynamicResource from}">
<DataGrid Margin="0,10,0,0" ItemsSource="{Binding AlarmList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="160">
<DataGridTemplateColumn.Header>
<TextBlock Text="告警时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding AlarmTime}" Foreground="#FFD86E03" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="300">
<DataGridTemplateColumn.Header>
<TextBlock Text="告警描述" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding AlarmMs}" Foreground="#FFD86E03" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</GroupBox>
</StackPanel>
</StackPanel>

<StackPanel Grid.Column="2" Margin="0,10,0,0">
<GroupBox Grid.Row="0" Margin="10,0,10,0" Height="460" Width="450" Header="3 号档口" Style="{DynamicResource from}" Tag="Start">
<StackPanel>
<GroupBox Header="设备运行情况" Margin="20,10,0,0"/>
<Grid Height="160" >
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="100" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding DevIsRun,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="停止">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">设备是否运行</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding RunStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="异常">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">设备当前状态</TextBlock>
</StackPanel>
</Grid>
<GroupBox Header="刷卡信息统计" Margin="20,10,0,0"/>
<Grid Height="160">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="100" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" FontSize="52" Foreground="#FFD2C106" Text="{Binding DdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">今日刷卡数</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" Foreground="#FFEC3107" FontSize="52" Text="{Binding YCDdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">异常刷卡数</TextBlock>
</StackPanel>
</Grid>

</StackPanel>

</GroupBox>
<GroupBox Margin="0,20,10,0" Height="480" Width="450" Header="今日菜品列表" Style="{DynamicResource from}" Tag="Start">
<ListBox ItemsSource="{Binding CookTypeListReit,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<ListBox.ItemTemplate>
<DataTemplate>
<WrapPanel>
<Button Width="170" Height="100" Margin="20,20,0,0" Content="{Binding Name}"/>
<Button Width="170" Height="100" Margin="20,20,0,0" Content="{Binding Name1}"/>
</WrapPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</GroupBox>
</StackPanel>
</Grid>

</UserControl>

+ 29
- 0
BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl2.xaml.cs Dosyayı Görüntüle

@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace BPASmartClient.ScreenLib
{
/// <summary>
/// ScreenSplitMealsControl2.xaml 的交互逻辑
/// </summary>
public partial class ScreenSplitMealsControl2 : UserControl
{
public ScreenSplitMealsControl2()
{
InitializeComponent();
this.DataContext = new ScreenSplitMealsControl2ViewModel();
}
}
}

+ 145
- 0
BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl2ViewModel.cs Dosyayı Görüntüle

@@ -0,0 +1,145 @@
using BPA.Helper;
using BPA.Message.Enum;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace BPASmartClient.ScreenLib
{
public class ScreenSplitMealsControl2ViewModel : NotifyBase
{
#region 变量
/// <summary>
/// 柱状图显示集合
/// </summary>
public IEnumerable<KeyValuePair<string, double>> Histogram { get { return _Histogram; } set { _Histogram = value; OnPropertyChanged(); } }
private IEnumerable<KeyValuePair<string, double>> _Histogram = new List<KeyValuePair<string, double>>();

/// <summary>
/// 设备是否运行
/// </summary>
public DevIsRun DevIsRun { get { return _DevIsRun; } set { _DevIsRun = value; OnPropertyChanged(); } }
private DevIsRun _DevIsRun = DevIsRun.停止;

/// <summary>
/// 设备状态
/// </summary>
public DevRunStatus RunStatus { get { return _RunStatus; } set { _RunStatus = value; OnPropertyChanged(); } }
private DevRunStatus _RunStatus = DevRunStatus.正常;

/// <summary>
/// 订单数
/// </summary>
public int DdCount { get { return _DdCount; } set { _DdCount = value; OnPropertyChanged(); } }
private int _DdCount = 0;

/// <summary>
/// 异常订单数
/// </summary>
public int YCDdCount { get { return _YCDdCount; } set { _YCDdCount = value; OnPropertyChanged(); } }
private int _YCDdCount = 0;

/// <summary>
/// 广告地址
/// </summary>
public Uri GgAdder { get { return _GgAdder; } set { _GgAdder = value; OnPropertyChanged(); } }
private Uri _GgAdder = new Uri(System.Configuration.ConfigurationManager.AppSettings["GgAdder"].ToString());

/// <summary>
/// 告警数据
/// </summary>
public ObservableCollection<AlarmMsModel> AlarmList
{
get { return _AlarmList; }
set
{
_AlarmList = value;
OnPropertyChanged();
}
}
private ObservableCollection<AlarmMsModel> _AlarmList = new ObservableCollection<AlarmMsModel>();

/// <summary>
/// 菜品类型-左
/// </summary>
public ObservableCollection<CookType> CookTypeListLeft
{
get { return _CookTypeListLeft; }
set
{
_CookTypeListLeft = value;
OnPropertyChanged();
}
}
private ObservableCollection<CookType> _CookTypeListLeft = new ObservableCollection<CookType>();

/// <summary>
/// 菜品类型-右边
/// </summary>
public ObservableCollection<CookType> CookTypeListReit
{
get { return _CookTypeListReit; }
set
{
_CookTypeListReit = value;
OnPropertyChanged();
}
}
private ObservableCollection<CookType> _CookTypeListReit = new ObservableCollection<CookType>();
#endregion
public ScreenSplitMealsControl2ViewModel()
{
Init();
}

/// <summary>
/// 初始化
/// </summary>
public void Init()
{
ThreadManage.GetInstance().StartLong(new Action(() =>
{
System.Windows.Application.Current?.Dispatcher.Invoke((Action)(() =>
{
RunStatus = RunStatus == DevRunStatus.正常 ? DevRunStatus.异常 : DevRunStatus.正常;
DevIsRun = DevIsRun == DevIsRun.运行 ? DevIsRun.停止 : DevIsRun.运行;
DdCount = new Random().Next(0, 400);
YCDdCount = new Random().Next(0, 400);

List<ORDER_STATUS> oRDER_s = new List<ORDER_STATUS>() { ORDER_STATUS.WAIT, ORDER_STATUS.COOKING };
List<ORDER_STATUS> oRDER_s1 = new List<ORDER_STATUS>() { ORDER_STATUS.COMPLETED_COOK, ORDER_STATUS.COMPLETED_TAKE };

List<string> name_s = new List<string>() { "担担面", "鸡蛋面", "火鸡面", "扬州炒饭", "回锅肉盖饭", "炒茄子" };
CookTypeListReit = new ObservableCollection<CookType>();
CookTypeListReit.Add(new CookType { Name = name_s[0], Name1 = name_s[1] });
CookTypeListReit.Add(new CookType { Name = name_s[2], Name1 = name_s[3] });
CookTypeListReit.Add(new CookType { Name = name_s[4], Name1 = name_s[5] });

CookTypeListLeft = new ObservableCollection<CookType>();
CookTypeListLeft.Add(new CookType { Name = name_s[0], Name1 = name_s[1] });
CookTypeListLeft.Add(new CookType { Name = name_s[2], Name1 = name_s[3] });
CookTypeListLeft.Add(new CookType { Name = name_s[4], Name1 = name_s[5] });

AlarmList = new ObservableCollection<AlarmMsModel>();
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
Histogram = new[] {
new KeyValuePair<string, double>(name_s[0], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[1], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[2], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[3], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[4], new Random().Next(0,400))};
}));
Thread.Sleep(5000);
}), $"{DateTime.Now}_2,线程服务");
}
}
}

+ 219
- 0
BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3.xaml Dosyayı Görüntüle

@@ -0,0 +1,219 @@
<UserControl x:Class="BPASmartClient.ScreenLib.ScreenSplitMealsControl3"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BPASmartClient.ScreenLib"
xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
xmlns:con="clr-namespace:BPA.CustomResource.UserControls;assembly=BPA.CustomResource"
mc:Ignorable="d"
d:DesignHeight="1080" d:DesignWidth="1920">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/BPA.CustomResource;component/Themes/ProlineStyle.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>

<StackPanel Margin="0,10,0,0">
<GroupBox Grid.Row="0" Margin="10,0,10,0" Height="460" Width="450" Header="6 号档口" Style="{DynamicResource from}" Tag="Start">
<StackPanel>
<GroupBox Header="设备运行情况" Margin="20,10,0,0"/>
<Grid Height="160" >
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="100" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding DevIsRun,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="停止">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">设备是否运行</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding RunStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="异常">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">设备当前状态</TextBlock>
</StackPanel>
</Grid>
<GroupBox Header="刷卡信息统计" Margin="20,10,0,0"/>
<Grid Height="160">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="100" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" FontSize="52" Foreground="#FFD2C106" Text="{Binding DdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">今日刷卡数</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" Foreground="#FFEC3107" FontSize="52" Text="{Binding YCDdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">异常刷卡数</TextBlock>
</StackPanel>
</Grid>

</StackPanel>

</GroupBox>
<GroupBox Margin="0,20,10,0" Height="480" Width="450" Header="今日菜品列表" Style="{DynamicResource from}" Tag="Start">
<ListBox ItemsSource="{Binding CookTypeListLeft,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<ListBox.ItemTemplate>
<DataTemplate>
<WrapPanel>
<Button Width="170" Height="100" Margin="20,20,0,0" Content="{Binding Name}"/>
<Button Width="170" Height="100" Margin="20,20,0,0" Content="{Binding Name1}"/>
</WrapPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</GroupBox>
</StackPanel>

<StackPanel Grid.Column="1" >
<GroupBox Height="600" Width="950" Margin="0,10,0,20" Header="广告区域" HorizontalAlignment="Center" VerticalAlignment="Top" Style="{DynamicResource from}" Tag="Start">
<Grid>
<wv2:WebView2 Name="webView" Source="{Binding GgAdder,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
</GroupBox>

<StackPanel Orientation="Horizontal">
<GroupBox Margin="5,0,0,0" Height="340" Width="470" Header="今日菜品刷卡统计图" Style="{DynamicResource from}">
<StackPanel>
<con:BasicBarChart Margin="30,40,0,0" HorizontalAlignment="Center" VerticalAlignment="Center" SeriesArray="{Binding Histogram,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="410" Height="200" ShowSize="50"></con:BasicBarChart>
</StackPanel>
</GroupBox>

<GroupBox Margin="10,0,0,0" Height="340" Width="470" Header="设备告警详情" Style="{DynamicResource from}">
<DataGrid Margin="0,10,0,0" ItemsSource="{Binding AlarmList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="160">
<DataGridTemplateColumn.Header>
<TextBlock Text="告警时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding AlarmTime}" Foreground="#FFD86E03" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="300">
<DataGridTemplateColumn.Header>
<TextBlock Text="告警描述" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding AlarmMs}" Foreground="#FFD86E03" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</GroupBox>
</StackPanel>
</StackPanel>

<StackPanel Grid.Column="2" Margin="0,10,0,0">
<GroupBox Grid.Row="0" Margin="10,0,10,0" Height="460" Width="450" Header="5 号档口" Style="{DynamicResource from}" Tag="Start">
<StackPanel>
<GroupBox Header="设备运行情况" Margin="20,10,0,0"/>
<Grid Height="160" >
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="100" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding DevIsRun,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="停止">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">设备是否运行</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding RunStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="异常">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">设备当前状态</TextBlock>
</StackPanel>
</Grid>
<GroupBox Header="刷卡信息统计" Margin="20,10,0,0"/>
<Grid Height="160">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="100" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" FontSize="52" Foreground="#FFD2C106" Text="{Binding DdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">今日刷卡数</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" Foreground="#FFEC3107" FontSize="52" Text="{Binding YCDdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">异常刷卡数</TextBlock>
</StackPanel>
</Grid>

</StackPanel>

</GroupBox>
<GroupBox Margin="0,20,10,0" Height="480" Width="450" Header="今日菜品列表" Style="{DynamicResource from}" Tag="Start">
<ListBox ItemsSource="{Binding CookTypeListReit,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<ListBox.ItemTemplate>
<DataTemplate>
<WrapPanel>
<Button Width="170" Height="100" Margin="20,20,0,0" Content="{Binding Name}"/>
<Button Width="170" Height="100" Margin="20,20,0,0" Content="{Binding Name1}"/>
</WrapPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</GroupBox>
</StackPanel>
</Grid>

</UserControl>

+ 30
- 0
BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3.xaml.cs Dosyayı Görüntüle

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace BPASmartClient.ScreenLib
{
/// <summary>
/// ScreenSplitMealsControl3.xaml 的交互逻辑
/// </summary>
public partial class ScreenSplitMealsControl3 : UserControl
{
public ScreenSplitMealsControl3()
{
InitializeComponent();
this.DataContext = new ScreenSplitMealsControl3ViewModel();

}
}
}

+ 146
- 0
BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3ViewModel.cs Dosyayı Görüntüle

@@ -0,0 +1,146 @@
using BPA.Helper;
using BPA.Message.Enum;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;


namespace BPASmartClient.ScreenLib
{
public class ScreenSplitMealsControl3ViewModel : NotifyBase
{
#region 变量
/// <summary>
/// 柱状图显示集合
/// </summary>
public IEnumerable<KeyValuePair<string, double>> Histogram { get { return _Histogram; } set { _Histogram = value; OnPropertyChanged(); } }
private IEnumerable<KeyValuePair<string, double>> _Histogram = new List<KeyValuePair<string, double>>();

/// <summary>
/// 设备是否运行
/// </summary>
public DevIsRun DevIsRun { get { return _DevIsRun; } set { _DevIsRun = value; OnPropertyChanged(); } }
private DevIsRun _DevIsRun = DevIsRun.停止;

/// <summary>
/// 设备状态
/// </summary>
public DevRunStatus RunStatus { get { return _RunStatus; } set { _RunStatus = value; OnPropertyChanged(); } }
private DevRunStatus _RunStatus = DevRunStatus.正常;

/// <summary>
/// 订单数
/// </summary>
public int DdCount { get { return _DdCount; } set { _DdCount = value; OnPropertyChanged(); } }
private int _DdCount = 0;

/// <summary>
/// 异常订单数
/// </summary>
public int YCDdCount { get { return _YCDdCount; } set { _YCDdCount = value; OnPropertyChanged(); } }
private int _YCDdCount = 0;

/// <summary>
/// 广告地址
/// </summary>
public Uri GgAdder { get { return _GgAdder; } set { _GgAdder = value; OnPropertyChanged(); } }
private Uri _GgAdder = new Uri(System.Configuration.ConfigurationManager.AppSettings["GgAdder"].ToString());

/// <summary>
/// 告警数据
/// </summary>
public ObservableCollection<AlarmMsModel> AlarmList
{
get { return _AlarmList; }
set
{
_AlarmList = value;
OnPropertyChanged();
}
}
private ObservableCollection<AlarmMsModel> _AlarmList = new ObservableCollection<AlarmMsModel>();

/// <summary>
/// 菜品类型-左
/// </summary>
public ObservableCollection<CookType> CookTypeListLeft
{
get { return _CookTypeListLeft; }
set
{
_CookTypeListLeft = value;
OnPropertyChanged();
}
}
private ObservableCollection<CookType> _CookTypeListLeft = new ObservableCollection<CookType>();

/// <summary>
/// 菜品类型-右边
/// </summary>
public ObservableCollection<CookType> CookTypeListReit
{
get { return _CookTypeListReit; }
set
{
_CookTypeListReit = value;
OnPropertyChanged();
}
}
private ObservableCollection<CookType> _CookTypeListReit = new ObservableCollection<CookType>();
#endregion
public ScreenSplitMealsControl3ViewModel()
{
Init();
}

/// <summary>
/// 初始化
/// </summary>
public void Init()
{
ThreadManage.GetInstance().StartLong(new Action(() =>
{
System.Windows.Application.Current?.Dispatcher.Invoke((Action)(() =>
{
RunStatus = RunStatus == DevRunStatus.正常 ? DevRunStatus.异常 : DevRunStatus.正常;
DevIsRun = DevIsRun == DevIsRun.运行 ? DevIsRun.停止 : DevIsRun.运行;
DdCount = new Random().Next(0, 400);
YCDdCount = new Random().Next(0, 400);

List<ORDER_STATUS> oRDER_s = new List<ORDER_STATUS>() { ORDER_STATUS.WAIT, ORDER_STATUS.COOKING };
List<ORDER_STATUS> oRDER_s1 = new List<ORDER_STATUS>() { ORDER_STATUS.COMPLETED_COOK, ORDER_STATUS.COMPLETED_TAKE };

List<string> name_s = new List<string>() { "担担面", "鸡蛋面", "火鸡面", "扬州炒饭", "回锅肉盖饭", "炒茄子" };
CookTypeListReit = new ObservableCollection<CookType>();
CookTypeListReit.Add(new CookType { Name = name_s[0], Name1 = name_s[1] });
CookTypeListReit.Add(new CookType { Name = name_s[2], Name1 = name_s[3] });
CookTypeListReit.Add(new CookType { Name = name_s[4], Name1 = name_s[5] });

CookTypeListLeft = new ObservableCollection<CookType>();
CookTypeListLeft.Add(new CookType { Name = name_s[0], Name1 = name_s[1] });
CookTypeListLeft.Add(new CookType { Name = name_s[2], Name1 = name_s[3] });
CookTypeListLeft.Add(new CookType { Name = name_s[4], Name1 = name_s[5] });

AlarmList = new ObservableCollection<AlarmMsModel>();
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
Histogram = new[] {
new KeyValuePair<string, double>(name_s[0], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[1], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[2], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[3], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[4], new Random().Next(0,400))};
}));
Thread.Sleep(5000);
}), $"{DateTime.Now}_3,线程服务");
}
}
}

+ 31
- 0
BPASmartClient.ScreenLib/分餐机/WindowShow.xaml Dosyayı Görüntüle

@@ -0,0 +1,31 @@
<Window x:Class="BPASmartClient.ScreenLib.WindowShow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:BPASmartClient.ScreenLib"
mc:Ignorable="d"
WindowStartupLocation="Manual"
WindowState="Maximized"
WindowStyle="None"
Title="监控大屏" Height="1080" Width="1920">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/BPA.CustomResource;component/Themes/ProlineStyle.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<Grid Background="{DynamicResource image大屏}">
<Grid.RowDefinitions>
<RowDefinition Height="100"/>
<RowDefinition/>
</Grid.RowDefinitions>
<GroupBox x:Name="titlename" Header="攀华产线数据可视化大屏" Style="{DynamicResource TopStyle}" Tag="Start">

</GroupBox>
<Border x:Name="main" Grid.Row="1">

</Border>
</Grid>
</Window>

+ 41
- 0
BPASmartClient.ScreenLib/分餐机/WindowShow.xaml.cs Dosyayı Görüntüle

@@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace BPASmartClient.ScreenLib
{
/// <summary>
/// WindowShow.xaml 的交互逻辑
/// </summary>
public partial class WindowShow : Window
{
public WindowShow()
{
InitializeComponent();
this.KeyDown += new KeyEventHandler((o, k) =>
{
if (k.Key == Key.Escape)
{
if (MessageBox.Show("确认是否退出大屏!", "退出提示", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
this.Close();
}
});
}

public void Init(string title, UserControl user)
{
titlename.Header = title;
main.Child = user;
}
}
}

+ 333
- 0
BPASmartClient.ScreenLib/总监视大屏/ScreenALLControl.xaml Dosyayı Görüntüle

@@ -0,0 +1,333 @@
<UserControl x:Class="BPASmartClient.ScreenLib.ScreenALLControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BPASmartClient.ScreenLib"
xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
xmlns:con="clr-namespace:BPA.CustomResource.UserControls;assembly=BPA.CustomResource"
mc:Ignorable="d"
d:DesignHeight="1080" d:DesignWidth="1920">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/BPA.CustomResource;component/Themes/ProlineStyle.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Margin="0,10,0,0">
<GroupBox Grid.Row="0" Margin="10,0,10,0" Height="310" Width="450" Header="大炒设备" Style="{DynamicResource from}" Tag="Start">
<StackPanel>
<GroupBox Header="1 号炒锅" Margin="20,0,0,0"/>
<Grid Height="80" >
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="60" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding DevIsRun,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="停止">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,0,0,0" FontSize="19">设备是否运行</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" FontSize="42" Foreground="#FFD2C106" Text="{Binding DdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,0,0,0" FontSize="19">今日刷卡数</TextBlock>
</StackPanel>
</Grid>
<GroupBox Header="2 号炒锅" Margin="20,0,0,0"/>
<Grid Height="80">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="60" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding DevIsRun,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="停止">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,0,0,0" FontSize="19">设备是否运行</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" FontSize="42" Foreground="#FFD2C106" Text="{Binding DdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,0,0,0" FontSize="19">今日刷卡数</TextBlock>
</StackPanel>
</Grid>
</StackPanel>
</GroupBox>
<GroupBox Grid.Row="0" Margin="10,10,10,0" Height="320" Width="450" Header="小炒设备" Style="{DynamicResource from}" Tag="Start">
<StackPanel>
<GroupBox Header="1 号炒锅" Margin="20,0,0,0"/>
<Grid Height="80" >
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="60" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding DevIsRun,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="停止">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,0,0,0" FontSize="19">设备是否运行</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" FontSize="42" Foreground="#FFD2C106" Text="{Binding DdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,0,0,0" FontSize="19">今日刷卡数</TextBlock>
</StackPanel>
</Grid>
<GroupBox Header="2 号炒锅" Margin="20,0,0,0"/>
<Grid Height="80">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="60" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding DevIsRun,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="停止">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,0,0,0" FontSize="19">设备是否运行</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" FontSize="42" Foreground="#FFD2C106" Text="{Binding DdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,0,0,0" FontSize="19">今日刷卡数</TextBlock>
</StackPanel>
</Grid>
</StackPanel>
</GroupBox>
<GroupBox Grid.Row="0" Margin="10,10,10,0" Height="310" Width="450" Header="煮面设备 MorkS" Style="{DynamicResource from}" Tag="Start">
<StackPanel>
<GroupBox Header="设备运行情况" Margin="20,0,0,0"/>
<Grid Height="80" >
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="60" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding DevIsRun,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="停止">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,0,0,0" FontSize="19" >设备是否运行</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding RunStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="异常">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,0,0,0" FontSize="19">设备当前状态</TextBlock>
</StackPanel>
</Grid>
<GroupBox Header="订单信息统计" Margin="20,0,0,0"/>
<Grid Height="80">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="60" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" FontSize="42" Foreground="#FFD2C106" Text="{Binding DdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,0,0,0" FontSize="19">今日订单数</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" Foreground="#FFEC3107" FontSize="42" Text="{Binding YCDdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,0,0,0" FontSize="19">异常订单数</TextBlock>
</StackPanel>
</Grid>
</StackPanel>
</GroupBox>
</StackPanel>
<Grid Grid.Column="1" >
<Grid> <Grid VerticalAlignment="Top" Margin="0,-30,0,0"> <Image Style="{DynamicResource imagezhu}"></Image> <Image Style="{DynamicResource image中1}" Margin="0,400,0,0"></Image> <GroupBox Margin="600,100,0,500" Header="10000" Style="{DynamicResource GroupStyle圆形}" Tag="累计收入" Content="万元" Width="100"/> <GroupBox Margin="600,400,0,0" Header="988" Style="{DynamicResource GroupStyle圆形}" Tag="累计刷卡" Content="次" Width="160"/> <GroupBox Margin="-500,100,0,0" Header="0" Style="{DynamicResource GroupStyle圆形}" Tag="累计故障" Content="次" Width="160"/> </Grid> <GroupBox Margin="10,10,10,10" Height="260" Width="940" HorizontalAlignment="Center" VerticalAlignment="Bottom" Style="{DynamicResource fromNoTitle}"> <Grid Margin="0,10,0,0"> <Grid.ColumnDefinitions> <ColumnDefinition/> <ColumnDefinition/> </Grid.ColumnDefinitions> <Grid> <GroupBox Header="商品分布图" Margin="20,0,0,0"/>
<con:RadarChart x:Name="生存图示例" Margin="0,10,0,0" Width="120" Height="150" RadarArray="{Binding RadarModelList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" ></con:RadarChart> </Grid> <Grid Grid.Column="1"> <GroupBox Header="商品统计图" Margin="20,0,0,0"/>
<con:BasicBarChart Margin="30,20,0,0" HorizontalAlignment="Center" VerticalAlignment="Center" SeriesArray="{Binding Histogram,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="370" Height="150" ShowSize="50"></con:BasicBarChart>
</Grid> </Grid> </GroupBox> </Grid>
</Grid>
<StackPanel Grid.Column="2" Margin="0,10,0,0">
<GroupBox Grid.Row="0" Margin="10,0,10,0" Height="420" Width="450" Header="分餐机设备" Style="{DynamicResource from}" Tag="Start">
<StackPanel>
<GroupBox Header="1 号分餐机" Margin="20,0,0,0"/>
<Grid Height="80" >
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="60" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding DevIsRun,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="停止">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,0,0,0" FontSize="19">设备是否运行</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" FontSize="42" Foreground="#FFD2C106" Text="{Binding DdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,0,0,0" FontSize="19">今日刷卡数</TextBlock>
</StackPanel>
</Grid>
<GroupBox Header="2 号分餐机" Margin="20,0,0,0"/>
<Grid Height="80" >
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="60" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding DevIsRun,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="停止">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,0,0,0" FontSize="19">设备是否运行</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" FontSize="42" Foreground="#FFD2C106" Text="{Binding DdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,0,0,0" FontSize="19">今日刷卡数</TextBlock>
</StackPanel>
</Grid>
<GroupBox Header="3 号分餐机" Margin="20,0,0,0"/>
<Grid Height="80" >
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="60" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding DevIsRun,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="停止">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,0,0,0" FontSize="19">设备是否运行</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" FontSize="42" Foreground="#FFD2C106" Text="{Binding DdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,0,0,0" FontSize="19">今日刷卡数</TextBlock>
</StackPanel>
</Grid>
</StackPanel>
</GroupBox>
<GroupBox Margin="10,10,10,0" Height="260" Width="450" Header="今日商品统计图" Style="{DynamicResource from}">
<StackPanel>
<con:BasicBarChart Margin="30,20,0,0" HorizontalAlignment="Center" VerticalAlignment="Center" SeriesArray="{Binding Histogram,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="410" Height="160" ShowSize="50"></con:BasicBarChart>
</StackPanel>
</GroupBox>
<GroupBox Margin="10,10,10,0" Height="260" Width="450" Header="设备告警详情" Style="{DynamicResource from}">
<DataGrid Margin="0,10,0,0" ItemsSource="{Binding AlarmList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="160">
<DataGridTemplateColumn.Header>
<TextBlock Text="告警时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding AlarmTime}" Foreground="#FFD86E03" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="300">
<DataGridTemplateColumn.Header>
<TextBlock Text="告警描述" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding AlarmMs}" Foreground="#FFD86E03" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</GroupBox>
</StackPanel>
</Grid>
</UserControl>

+ 29
- 0
BPASmartClient.ScreenLib/总监视大屏/ScreenALLControl.xaml.cs Dosyayı Görüntüle

@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace BPASmartClient.ScreenLib
{
/// <summary>
/// ScreenALLControl.xaml 的交互逻辑
/// </summary>
public partial class ScreenALLControl : UserControl
{
public ScreenALLControl()
{
InitializeComponent();
this.DataContext = new ScreenALLControlViewModel();
}
}
}

+ 216
- 0
BPASmartClient.ScreenLib/总监视大屏/ScreenALLControlViewModel.cs Dosyayı Görüntüle

@@ -0,0 +1,216 @@
using BPA.CustomResource.UserControls;
using BPA.Helper;
using BPA.Message.Enum;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace BPASmartClient.ScreenLib
{
public class ScreenALLControlViewModel : NotifyBase
{
#region 变量
/// <summary>
/// 柱状图显示集合
/// </summary>
public IEnumerable<KeyValuePair<string, double>> Histogram { get { return _Histogram; } set { _Histogram = value; OnPropertyChanged(); } }
private IEnumerable<KeyValuePair<string, double>> _Histogram = new List<KeyValuePair<string, double>>();


/// <summary>
/// 分布统计图
/// </summary>
public ObservableCollection<RadarModel> RadarModelList
{
get { return _RadarModelList; }
set
{
_RadarModelList = value;
OnPropertyChanged();
}
}
private ObservableCollection<RadarModel> _RadarModelList = new ObservableCollection<RadarModel>();

/// <summary>
/// 设备是否运行
/// </summary>
public DevIsRun DevIsRun { get { return _DevIsRun; } set { _DevIsRun = value; OnPropertyChanged(); } }
private DevIsRun _DevIsRun = DevIsRun.停止;

/// <summary>
/// 设备状态
/// </summary>
public DevRunStatus RunStatus { get { return _RunStatus; } set { _RunStatus = value; OnPropertyChanged(); } }
private DevRunStatus _RunStatus = DevRunStatus.正常;

/// <summary>
/// 订单数
/// </summary>
public int DdCount { get { return _DdCount; } set { _DdCount = value; OnPropertyChanged(); } }
private int _DdCount = 0;

/// <summary>
/// 异常订单数
/// </summary>
public int YCDdCount { get { return _YCDdCount; } set { _YCDdCount = value; OnPropertyChanged(); } }
private int _YCDdCount = 0;

/// <summary>
/// 广告地址
/// </summary>
public Uri GgAdder { get { return _GgAdder; } set { _GgAdder = value; OnPropertyChanged(); } }
private Uri _GgAdder = new Uri(System.Configuration.ConfigurationManager.AppSettings["GgAdder"].ToString());

/// <summary>
/// 正在制作订单数据
/// </summary>
public ObservableCollection<OrderMakeModel> OrderMakeList
{
get { return _OrderMakeList; }
set
{
_OrderMakeList = value;
OnPropertyChanged();
}
}
private ObservableCollection<OrderMakeModel> _OrderMakeList = new ObservableCollection<OrderMakeModel>();

/// <summary>
/// 制作完成订单数据
/// </summary>
public ObservableCollection<OrderMakeModel> OrderMakeListOver
{
get { return _OrderMakeListOver; }
set
{
_OrderMakeListOver = value;
OnPropertyChanged();
}
}
private ObservableCollection<OrderMakeModel> _OrderMakeListOver = new ObservableCollection<OrderMakeModel>();

/// <summary>
/// 告警数据
/// </summary>
public ObservableCollection<AlarmMsModel> AlarmList
{
get { return _AlarmList; }
set
{
_AlarmList = value;
OnPropertyChanged();
}
}
private ObservableCollection<AlarmMsModel> _AlarmList = new ObservableCollection<AlarmMsModel>();


#endregion
public ScreenALLControlViewModel()
{
Init();
}

/// <summary>
/// 初始化
/// </summary>
public void Init()
{
ThreadManage.GetInstance().StartLong(new Action(() =>
{
System.Windows.Application.Current?.Dispatcher.Invoke((Action)(() =>
{
RunStatus = RunStatus == DevRunStatus.正常 ? DevRunStatus.异常 : DevRunStatus.正常;
DevIsRun = DevIsRun == DevIsRun.运行 ? DevIsRun.停止 : DevIsRun.运行;
DdCount = new Random().Next(0, 400);
YCDdCount = new Random().Next(0, 400);

List<ORDER_STATUS> oRDER_s = new List<ORDER_STATUS>() { ORDER_STATUS.WAIT, ORDER_STATUS.COOKING };
List<ORDER_STATUS> oRDER_s1 = new List<ORDER_STATUS>() { ORDER_STATUS.COMPLETED_COOK, ORDER_STATUS.COMPLETED_TAKE };

List<string> name_s = new List<string>() { "担担面", "鸡蛋面", "火鸡面", "扬州炒饭", "回锅肉盖饭" };
OrderMakeList = new ObservableCollection<OrderMakeModel>();
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "011", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "012", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "013", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "014", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });

OrderMakeListOver = new ObservableCollection<OrderMakeModel>();
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "001", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "002", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "003", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "005", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "006", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "008", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "009", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "010", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });


AlarmList = new ObservableCollection<AlarmMsModel>();
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
Histogram = new[] {
new KeyValuePair<string, double>(name_s[0], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[1], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[2], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[3], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[4], new Random().Next(0,400))};

RadarModelList = new ObservableCollection<RadarModel>();
RadarModelList.Add(new RadarModel { Text = name_s[0], ValueMax = new Random().Next(0, 100) });
RadarModelList.Add(new RadarModel { Text = name_s[1], ValueMax = new Random().Next(0, 100) });
RadarModelList.Add(new RadarModel { Text = name_s[2], ValueMax = new Random().Next(0, 100) });
RadarModelList.Add(new RadarModel { Text = name_s[3], ValueMax = new Random().Next(0, 100) });
RadarModelList.Add(new RadarModel { Text = name_s[4], ValueMax = new Random().Next(0, 100) });

}));
Thread.Sleep(5000);
}), $"{DateTime.Now},线程服务");
}
}
}

+ 396
- 0
BPASmartClient.ScreenLib/炒锅/ScreenMaxWokControl.xaml Dosyayı Görüntüle

@@ -0,0 +1,396 @@
<UserControl x:Class="BPASmartClient.ScreenLib.ScreenMaxWokControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BPASmartClient.ScreenLib"
xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
xmlns:con="clr-namespace:BPA.CustomResource.UserControls;assembly=BPA.CustomResource"
mc:Ignorable="d"
d:DesignHeight="1080" d:DesignWidth="1920">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/BPA.CustomResource;component/Themes/ProlineStyle.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Margin="0,10,0,0">
<GroupBox Grid.Row="0" Margin="10,0,10,0" Height="370" Width="450" Header="2 号炒锅" Style="{DynamicResource from}" Tag="Start">
<StackPanel>
<GroupBox Header="设备运行情况" Margin="20,10,0,0"/>
<Grid Height="100" >
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="100" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding DevIsRun,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="停止">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">设备是否运行</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding RunStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="异常">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">设备当前状态</TextBlock>
</StackPanel>
</Grid>
<GroupBox Header="订单信息统计" Margin="20,10,0,0"/>
<Grid Height="100">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="100" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" FontSize="52" Foreground="#FFD2C106" Text="{Binding DdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">今日订单数</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" Foreground="#FFEC3107" FontSize="52" Text="{Binding YCDdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">异常订单数</TextBlock>
</StackPanel>
</Grid>

</StackPanel>
</GroupBox>
<GroupBox Margin="0,20,10,0" Height="275" Width="450" Header="待制作订单列表" Style="{DynamicResource from}" Tag="Start">
<DataGrid Margin="0,10,0,0" ItemsSource="{Binding OrderMakeList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="60">
<DataGridTemplateColumn.Header>
<TextBlock Text="订单号" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding SortNum,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Foreground="{Binding foreground,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" VerticalAlignment="Bottom" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="120">
<DataGridTemplateColumn.Header>
<TextBlock Text="商品名称" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding GoodName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Foreground="{Binding foreground,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="160">
<DataGridTemplateColumn.Header>
<TextBlock Text="开始时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding StartTime,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Foreground="{Binding foreground,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="80">
<DataGridTemplateColumn.Header>
<TextBlock Text="状态" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding MakeStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Foreground="{Binding foreground,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</GroupBox>
<GroupBox Margin="0,20,10,0" Height="275" Width="450" Header="已制作订单列表" Style="{DynamicResource from}" Tag="Start">
<DataGrid Margin="0,10,0,0" ItemsSource="{Binding OrderMakeListOver,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="50">
<DataGridTemplateColumn.Header>
<TextBlock Text="订单号" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding SortNum,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="80">
<DataGridTemplateColumn.Header>
<TextBlock Text="商品名称" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding GoodName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="145">
<DataGridTemplateColumn.Header>
<TextBlock Text="开始时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding StartTime,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="145">
<DataGridTemplateColumn.Header>
<TextBlock Text="结束时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding StopTime,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</GroupBox>
</StackPanel>

<StackPanel Grid.Column="1" >
<GroupBox Height="600" Width="950" Margin="0,10,0,20" Header="广告区域" HorizontalAlignment="Center" VerticalAlignment="Top" Style="{DynamicResource from}" Tag="Start">
<Grid>
<wv2:WebView2 Name="webView" Source="{Binding GgAdder,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
</GroupBox>

<StackPanel Orientation="Horizontal">
<GroupBox Margin="5,0,0,0" Height="340" Width="470" Header="2号炒锅告警信息" Style="{DynamicResource from}">
<DataGrid Margin="0,10,0,0" ItemsSource="{Binding AlarmList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="160">
<DataGridTemplateColumn.Header>
<TextBlock Text="告警时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding AlarmTime}" Foreground="#FFD86E03" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="300">
<DataGridTemplateColumn.Header>
<TextBlock Text="告警描述" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding AlarmMs}" Foreground="#FFD86E03" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</GroupBox>
<GroupBox Margin="10,0,0,0" Height="340" Width="470" Header="1号炒锅告警信息" Style="{DynamicResource from}">
<DataGrid Margin="0,10,0,0" ItemsSource="{Binding AlarmList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="160">
<DataGridTemplateColumn.Header>
<TextBlock Text="告警时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding AlarmTime}" Foreground="#FFD86E03" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="300">
<DataGridTemplateColumn.Header>
<TextBlock Text="告警描述" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding AlarmMs}" Foreground="#FFD86E03" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</GroupBox>
</StackPanel>
</StackPanel>
<StackPanel Grid.Column="2" Margin="0,10,0,0">
<GroupBox Grid.Row="0" Margin="10,0,10,0" Height="370" Width="450" Header="1 号炒锅" Style="{DynamicResource from}" Tag="Start">
<StackPanel>
<GroupBox Header="设备运行情况" Margin="20,10,0,0"/>
<Grid Height="100" >
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="100" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding DevIsRun,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="停止">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">设备是否运行</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding RunStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="异常">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">设备当前状态</TextBlock>
</StackPanel>
</Grid>
<GroupBox Header="订单信息统计" Margin="20,10,0,0"/>
<Grid Height="100">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="100" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" FontSize="52" Foreground="#FFD2C106" Text="{Binding DdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">今日订单数</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" Foreground="#FFEC3107" FontSize="52" Text="{Binding YCDdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">异常订单数</TextBlock>
</StackPanel>
</Grid>

</StackPanel>
</GroupBox>
<GroupBox Margin="0,20,10,0" Height="275" Width="450" Header="待制作订单列表" Style="{DynamicResource from}" Tag="Start">
<DataGrid Margin="0,10,0,0" ItemsSource="{Binding OrderMakeList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="60">
<DataGridTemplateColumn.Header>
<TextBlock Text="订单号" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding SortNum,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Foreground="{Binding foreground,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" VerticalAlignment="Bottom" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="120">
<DataGridTemplateColumn.Header>
<TextBlock Text="商品名称" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding GoodName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Foreground="{Binding foreground,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="160">
<DataGridTemplateColumn.Header>
<TextBlock Text="开始时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding StartTime,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Foreground="{Binding foreground,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="80">
<DataGridTemplateColumn.Header>
<TextBlock Text="状态" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding MakeStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Foreground="{Binding foreground,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</GroupBox>
<GroupBox Margin="0,20,10,0" Height="275" Width="450" Header="已制作订单列表" Style="{DynamicResource from}" Tag="Start">
<DataGrid Margin="0,10,0,0" ItemsSource="{Binding OrderMakeListOver,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="50">
<DataGridTemplateColumn.Header>
<TextBlock Text="订单号" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding SortNum,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="80">
<DataGridTemplateColumn.Header>
<TextBlock Text="商品名称" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding GoodName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="145">
<DataGridTemplateColumn.Header>
<TextBlock Text="开始时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding StartTime,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="145">
<DataGridTemplateColumn.Header>
<TextBlock Text="结束时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding StopTime,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</GroupBox>
</StackPanel>
</Grid>
</UserControl>

+ 29
- 0
BPASmartClient.ScreenLib/炒锅/ScreenMaxWokControl.xaml.cs Dosyayı Görüntüle

@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace BPASmartClient.ScreenLib
{
/// <summary>
/// ScreenMaxWokControl.xaml 的交互逻辑
/// </summary>
public partial class ScreenMaxWokControl : UserControl
{
public ScreenMaxWokControl()
{
InitializeComponent();
this.DataContext = new ScreenMaxWokControlViewModel();
}
}
}

+ 176
- 0
BPASmartClient.ScreenLib/炒锅/ScreenMaxWokControlViewModel.cs Dosyayı Görüntüle

@@ -0,0 +1,176 @@
using BPA.Helper;
using BPA.Message.Enum;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace BPASmartClient.ScreenLib
{
public class ScreenMaxWokControlViewModel : NotifyBase
{
#region 变量
/// <summary>
/// 广告地址
/// </summary>
public Uri GgAdder { get { return _GgAdder; } set { _GgAdder = value; OnPropertyChanged(); } }
private Uri _GgAdder = new Uri(System.Configuration.ConfigurationManager.AppSettings["GgAdder"].ToString());

/// <summary>
/// 设备是否运行
/// </summary>
public DevIsRun DevIsRun { get { return _DevIsRun; } set { _DevIsRun = value; OnPropertyChanged(); } }
private DevIsRun _DevIsRun = DevIsRun.停止;

/// <summary>
/// 设备状态
/// </summary>
public DevRunStatus RunStatus { get { return _RunStatus; } set { _RunStatus = value; OnPropertyChanged(); } }
private DevRunStatus _RunStatus = DevRunStatus.正常;

/// <summary>
/// 订单数
/// </summary>
public int DdCount { get { return _DdCount; } set { _DdCount = value; OnPropertyChanged(); } }
private int _DdCount = 0;

/// <summary>
/// 异常订单数
/// </summary>
public int YCDdCount { get { return _YCDdCount; } set { _YCDdCount = value; OnPropertyChanged(); } }
private int _YCDdCount = 0;

/// <summary>
/// 正在制作订单数据
/// </summary>
public ObservableCollection<OrderMakeModel> OrderMakeList { get { return _OrderMakeList; } set {
_OrderMakeList = value;
OnPropertyChanged();
} }
private ObservableCollection<OrderMakeModel> _OrderMakeList = new ObservableCollection<OrderMakeModel>();

/// <summary>
/// 制作完成订单数据
/// </summary>
public ObservableCollection<OrderMakeModel> OrderMakeListOver
{
get { return _OrderMakeListOver; }
set
{
_OrderMakeListOver = value;
OnPropertyChanged();
}
}
private ObservableCollection<OrderMakeModel> _OrderMakeListOver = new ObservableCollection<OrderMakeModel>();

/// <summary>
/// 告警数据
/// </summary>
public ObservableCollection<AlarmMsModel> AlarmList
{
get { return _AlarmList; }
set
{
_AlarmList = value;
OnPropertyChanged();
}
}
private ObservableCollection<AlarmMsModel> _AlarmList = new ObservableCollection<AlarmMsModel>();


#endregion
public ScreenMaxWokControlViewModel()
{
Init();
}

/// <summary>
/// 初始化
/// </summary>
public void Init()
{
ThreadManage.GetInstance().StartLong(new Action(() =>
{
System.Windows.Application.Current?.Dispatcher.Invoke((Action)(() =>
{
RunStatus = RunStatus == DevRunStatus.正常 ? DevRunStatus.异常 : DevRunStatus.正常;
DevIsRun = DevIsRun == DevIsRun.运行 ? DevIsRun.停止 : DevIsRun.运行;
DdCount = new Random().Next(0, 400);
YCDdCount = new Random().Next(0, 400);

List<ORDER_STATUS> oRDER_s = new List<ORDER_STATUS>() { ORDER_STATUS.WAIT, ORDER_STATUS.COOKING };
List<ORDER_STATUS> oRDER_s1 = new List<ORDER_STATUS>() { ORDER_STATUS.COMPLETED_COOK, ORDER_STATUS.COMPLETED_TAKE };

List<string> name_s = new List<string>() { "担担面", "鸡蛋面", "火鸡面", "扬州炒饭", "回锅肉盖饭" };
OrderMakeList = new ObservableCollection<OrderMakeModel>();
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "011", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "012", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "013", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "014", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });

OrderMakeListOver = new ObservableCollection<OrderMakeModel>();
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "001", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "002", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "003", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "005", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "006", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "008", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "009", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "010", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });


AlarmList = new ObservableCollection<AlarmMsModel>();
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
}));
Thread.Sleep(5000);
}), $"{DateTime.Now},线程服务");
}
}
}

+ 396
- 0
BPASmartClient.ScreenLib/炒锅/ScreenMinWokControl.xaml Dosyayı Görüntüle

@@ -0,0 +1,396 @@
<UserControl x:Class="BPASmartClient.ScreenLib.ScreenMinWokControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BPASmartClient.ScreenLib"
xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
xmlns:con="clr-namespace:BPA.CustomResource.UserControls;assembly=BPA.CustomResource"
mc:Ignorable="d"
d:DesignHeight="1080" d:DesignWidth="1920">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/BPA.CustomResource;component/Themes/ProlineStyle.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>

<StackPanel Margin="0,10,0,0">
<GroupBox Grid.Row="0" Margin="10,0,10,0" Height="370" Width="450" Header="2 号炒锅" Style="{DynamicResource from}" Tag="Start">
<StackPanel>
<GroupBox Header="设备运行情况" Margin="20,10,0,0"/>
<Grid Height="100" >
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="100" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding DevIsRun,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="停止">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">设备是否运行</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding RunStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="异常">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">设备当前状态</TextBlock>
</StackPanel>
</Grid>
<GroupBox Header="刷卡信息统计" Margin="20,10,0,0"/>
<Grid Height="100">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="100" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" FontSize="52" Foreground="#FFD2C106" Text="{Binding DdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">今日刷卡数</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" Foreground="#FFEC3107" FontSize="52" Text="{Binding YCDdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">异常刷卡数</TextBlock>
</StackPanel>
</Grid>

</StackPanel>
</GroupBox>
<GroupBox Margin="0,20,10,0" Height="275" Width="450" Header="待制作订单列表" Style="{DynamicResource from}" Tag="Start">
<DataGrid Margin="0,10,0,0" ItemsSource="{Binding OrderMakeList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="60">
<DataGridTemplateColumn.Header>
<TextBlock Text="订单号" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding SortNum,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Foreground="{Binding foreground,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" VerticalAlignment="Bottom" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="120">
<DataGridTemplateColumn.Header>
<TextBlock Text="商品名称" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding GoodName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Foreground="{Binding foreground,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="160">
<DataGridTemplateColumn.Header>
<TextBlock Text="开始时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding StartTime,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Foreground="{Binding foreground,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="80">
<DataGridTemplateColumn.Header>
<TextBlock Text="状态" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding MakeStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Foreground="{Binding foreground,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</GroupBox>
<GroupBox Margin="0,20,10,0" Height="275" Width="450" Header="已制作订单列表" Style="{DynamicResource from}" Tag="Start">
<DataGrid Margin="0,10,0,0" ItemsSource="{Binding OrderMakeListOver,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="50">
<DataGridTemplateColumn.Header>
<TextBlock Text="订单号" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding SortNum,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="80">
<DataGridTemplateColumn.Header>
<TextBlock Text="商品名称" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding GoodName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="145">
<DataGridTemplateColumn.Header>
<TextBlock Text="开始时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding StartTime,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="145">
<DataGridTemplateColumn.Header>
<TextBlock Text="结束时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding StopTime,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</GroupBox>
</StackPanel>

<StackPanel Grid.Column="1" >
<GroupBox Height="600" Width="950" Margin="0,10,0,20" Header="广告区域" HorizontalAlignment="Center" VerticalAlignment="Top" Style="{DynamicResource from}" Tag="Start">
<Grid>
<wv2:WebView2 Name="webView" Source="{Binding GgAdder,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
</GroupBox>

<StackPanel Orientation="Horizontal">
<GroupBox Margin="5,0,0,0" Height="340" Width="470" Header="2号炒锅告警信息" Style="{DynamicResource from}">
<DataGrid Margin="0,10,0,0" ItemsSource="{Binding AlarmList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="160">
<DataGridTemplateColumn.Header>
<TextBlock Text="告警时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding AlarmTime}" Foreground="#FFD86E03" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="300">
<DataGridTemplateColumn.Header>
<TextBlock Text="告警描述" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding AlarmMs}" Foreground="#FFD86E03" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</GroupBox>
<GroupBox Margin="10,0,0,0" Height="340" Width="470" Header="1号炒锅告警信息" Style="{DynamicResource from}">
<DataGrid Margin="0,10,0,0" ItemsSource="{Binding AlarmList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="160">
<DataGridTemplateColumn.Header>
<TextBlock Text="告警时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding AlarmTime}" Foreground="#FFD86E03" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="300">
<DataGridTemplateColumn.Header>
<TextBlock Text="告警描述" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding AlarmMs}" Foreground="#FFD86E03" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</GroupBox>
</StackPanel>
</StackPanel>

<StackPanel Grid.Column="2" Margin="0,10,0,0">
<GroupBox Grid.Row="0" Margin="10,0,10,0" Height="370" Width="450" Header="1 号炒锅" Style="{DynamicResource from}" Tag="Start">
<StackPanel>
<GroupBox Header="设备运行情况" Margin="20,10,0,0"/>
<Grid Height="100" >
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="100" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding DevIsRun,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="停止">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">设备是否运行</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding RunStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="异常">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">设备当前状态</TextBlock>
</StackPanel>
</Grid>
<GroupBox Header="刷卡信息统计" Margin="20,10,0,0"/>
<Grid Height="100">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="100" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" FontSize="52" Foreground="#FFD2C106" Text="{Binding DdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">今日刷卡数</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" Foreground="#FFEC3107" FontSize="52" Text="{Binding YCDdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">异常刷卡数</TextBlock>
</StackPanel>
</Grid>

</StackPanel>
</GroupBox>
<GroupBox Margin="0,20,10,0" Height="275" Width="450" Header="待制作订单列表" Style="{DynamicResource from}" Tag="Start">
<DataGrid Margin="0,10,0,0" ItemsSource="{Binding OrderMakeList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="60">
<DataGridTemplateColumn.Header>
<TextBlock Text="订单号" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding SortNum,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Foreground="{Binding foreground,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" VerticalAlignment="Bottom" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="120">
<DataGridTemplateColumn.Header>
<TextBlock Text="商品名称" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding GoodName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Foreground="{Binding foreground,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="160">
<DataGridTemplateColumn.Header>
<TextBlock Text="开始时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding StartTime,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Foreground="{Binding foreground,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="80">
<DataGridTemplateColumn.Header>
<TextBlock Text="状态" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding MakeStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Foreground="{Binding foreground,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</GroupBox>
<GroupBox Margin="0,20,10,0" Height="275" Width="450" Header="已制作订单列表" Style="{DynamicResource from}" Tag="Start">
<DataGrid Margin="0,10,0,0" ItemsSource="{Binding OrderMakeListOver,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="50">
<DataGridTemplateColumn.Header>
<TextBlock Text="订单号" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding SortNum,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="80">
<DataGridTemplateColumn.Header>
<TextBlock Text="商品名称" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding GoodName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="145">
<DataGridTemplateColumn.Header>
<TextBlock Text="开始时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding StartTime,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="145">
<DataGridTemplateColumn.Header>
<TextBlock Text="结束时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding StopTime,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</GroupBox>
</StackPanel>
</Grid>
</UserControl>

+ 29
- 0
BPASmartClient.ScreenLib/炒锅/ScreenMinWokControl.xaml.cs Dosyayı Görüntüle

@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace BPASmartClient.ScreenLib
{
/// <summary>
/// ScreenMinWokControl.xaml 的交互逻辑
/// </summary>
public partial class ScreenMinWokControl : UserControl
{
public ScreenMinWokControl()
{
InitializeComponent();
this.DataContext = new ScreenMinWokControlViewModel();
}
}
}

+ 191
- 0
BPASmartClient.ScreenLib/炒锅/ScreenMinWokControlViewModel.cs Dosyayı Görüntüle

@@ -0,0 +1,191 @@
using BPA.Helper;
using BPA.Message.Enum;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace BPASmartClient.ScreenLib
{
public class ScreenMinWokControlViewModel : NotifyBase
{
#region 变量
/// <summary>
/// 柱状图显示集合
/// </summary>
public IEnumerable<KeyValuePair<string, double>> Histogram { get { return _Histogram; } set { _Histogram = value; OnPropertyChanged(); } }
private IEnumerable<KeyValuePair<string, double>> _Histogram = new List<KeyValuePair<string, double>>();

/// <summary>
/// 设备是否运行
/// </summary>
public DevIsRun DevIsRun { get { return _DevIsRun; } set { _DevIsRun = value; OnPropertyChanged(); } }
private DevIsRun _DevIsRun = DevIsRun.停止;

/// <summary>
/// 设备状态
/// </summary>
public DevRunStatus RunStatus { get { return _RunStatus; } set { _RunStatus = value; OnPropertyChanged(); } }
private DevRunStatus _RunStatus = DevRunStatus.正常;

/// <summary>
/// 订单数
/// </summary>
public int DdCount { get { return _DdCount; } set { _DdCount = value; OnPropertyChanged(); } }
private int _DdCount = 0;

/// <summary>
/// 异常订单数
/// </summary>
public int YCDdCount { get { return _YCDdCount; } set { _YCDdCount = value; OnPropertyChanged(); } }
private int _YCDdCount = 0;

/// <summary>
/// 广告地址
/// </summary>
public Uri GgAdder { get { return _GgAdder; } set { _GgAdder = value; OnPropertyChanged(); } }
private Uri _GgAdder = new Uri(System.Configuration.ConfigurationManager.AppSettings["GgAdder"].ToString());

/// <summary>
/// 正在制作订单数据
/// </summary>
public ObservableCollection<OrderMakeModel> OrderMakeList
{
get { return _OrderMakeList; }
set
{
_OrderMakeList = value;
OnPropertyChanged();
}
}
private ObservableCollection<OrderMakeModel> _OrderMakeList = new ObservableCollection<OrderMakeModel>();

/// <summary>
/// 制作完成订单数据
/// </summary>
public ObservableCollection<OrderMakeModel> OrderMakeListOver
{
get { return _OrderMakeListOver; }
set
{
_OrderMakeListOver = value;
OnPropertyChanged();
}
}
private ObservableCollection<OrderMakeModel> _OrderMakeListOver = new ObservableCollection<OrderMakeModel>();

/// <summary>
/// 告警数据
/// </summary>
public ObservableCollection<AlarmMsModel> AlarmList
{
get { return _AlarmList; }
set
{
_AlarmList = value;
OnPropertyChanged();
}
}
private ObservableCollection<AlarmMsModel> _AlarmList = new ObservableCollection<AlarmMsModel>();

#endregion
public ScreenMinWokControlViewModel()
{
Init();
}

/// <summary>
/// 初始化
/// </summary>
public void Init()
{
ThreadManage.GetInstance().StartLong(new Action(() =>
{
System.Windows.Application.Current?.Dispatcher.Invoke((Action)(() =>
{
RunStatus = RunStatus == DevRunStatus.正常 ? DevRunStatus.异常 : DevRunStatus.正常;
DevIsRun = DevIsRun == DevIsRun.运行 ? DevIsRun.停止 : DevIsRun.运行;
DdCount = new Random().Next(0, 400);
YCDdCount = new Random().Next(0, 400);

List<ORDER_STATUS> oRDER_s = new List<ORDER_STATUS>() { ORDER_STATUS.WAIT, ORDER_STATUS.COOKING };
List<ORDER_STATUS> oRDER_s1 = new List<ORDER_STATUS>() { ORDER_STATUS.COMPLETED_COOK, ORDER_STATUS.COMPLETED_TAKE };

List<string> name_s = new List<string>() { "担担面", "鸡蛋面", "火鸡面", "扬州炒饭", "回锅肉盖饭" };
OrderMakeList = new ObservableCollection<OrderMakeModel>();
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "011", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "012", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "013", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "014", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });

OrderMakeListOver = new ObservableCollection<OrderMakeModel>();
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "001", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "002", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "003", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "005", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "006", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "008", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "009", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "010", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });


AlarmList = new ObservableCollection<AlarmMsModel>();
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
Histogram = new[] {
new KeyValuePair<string, double>(name_s[0], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[1], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[2], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[3], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[4], new Random().Next(0,400))};
}));
Thread.Sleep(5000);
}), $"{DateTime.Now},线程服务");
}
}
}

+ 222
- 0
BPASmartClient.ScreenLib/煮面机/ScreenMorksControl.xaml Dosyayı Görüntüle

@@ -0,0 +1,222 @@
<UserControl x:Class="BPASmartClient.ScreenLib.ScreenMorksControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BPASmartClient.ScreenLib"
xmlns:wv2="clr-namespace:Microsoft.Web.WebView2.Wpf;assembly=Microsoft.Web.WebView2.Wpf"
xmlns:con="clr-namespace:BPA.CustomResource.UserControls;assembly=BPA.CustomResource"
mc:Ignorable="d"
d:DesignHeight="1080" d:DesignWidth="1920">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/BPA.CustomResource;component/Themes/ProlineStyle.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="2*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>

<StackPanel Margin="0,10,0,0">
<GroupBox Grid.Row="0" Margin="10,0,10,0" Height="160" Width="450" Style="{DynamicResource fromNoTitle}" Tag="Start">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="100" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding DevIsRun,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="停止">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">设备是否运行</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock HorizontalAlignment="Center" FontSize="42" Text="{Binding RunStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Lime"></Setter>
<Style.Triggers>
<Trigger Property="Text" Value="异常">
<Setter Property="Foreground" Value="Red"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">设备当前状态</TextBlock>
</StackPanel>
</Grid>
</GroupBox>
<GroupBox Margin="0,20,10,0" Height="780" Width="450" Header="待制作订单列表" Style="{DynamicResource from}" Tag="Start">
<DataGrid Margin="0,10,0,0" ItemsSource="{Binding OrderMakeList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="60">
<DataGridTemplateColumn.Header>
<TextBlock Text="订单号" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding SortNum,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Foreground="{Binding foreground,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" VerticalAlignment="Bottom" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="120">
<DataGridTemplateColumn.Header>
<TextBlock Text="商品名称" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding GoodName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Foreground="{Binding foreground,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="160">
<DataGridTemplateColumn.Header>
<TextBlock Text="开始时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding StartTime,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Foreground="{Binding foreground,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="80">
<DataGridTemplateColumn.Header>
<TextBlock Text="状态" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding MakeStatus,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Foreground="{Binding foreground,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</GroupBox>
</StackPanel>

<StackPanel Grid.Column="1" >
<GroupBox Height="600" Width="950" Margin="0,10,0,20" Header="广告区域" HorizontalAlignment="Center" VerticalAlignment="Top" Style="{DynamicResource from}" Tag="Start">
<Grid>
<wv2:WebView2 Name="webView" Source="{Binding GgAdder,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
</GroupBox>

<StackPanel Orientation="Horizontal">
<GroupBox Margin="5,0,0,0" Height="340" Width="470" Header="今日商品统计图" Style="{DynamicResource from}">
<StackPanel>
<con:BasicBarChart Margin="30,40,0,0" HorizontalAlignment="Center" VerticalAlignment="Center" SeriesArray="{Binding Histogram,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Width="410" Height="200" ShowSize="50"></con:BasicBarChart>
</StackPanel>
</GroupBox>

<GroupBox Margin="10,0,0,0" Height="340" Width="470" Header="设备告警详情" Style="{DynamicResource from}">
<DataGrid Margin="0,10,0,0" ItemsSource="{Binding AlarmList,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="160">
<DataGridTemplateColumn.Header>
<TextBlock Text="告警时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding AlarmTime}" Foreground="#FFD86E03" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="300">
<DataGridTemplateColumn.Header>
<TextBlock Text="告警描述" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding AlarmMs}" Foreground="#FFD86E03" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</GroupBox>
</StackPanel>
</StackPanel>

<StackPanel Grid.Column="2" Margin="0,10,0,0">
<GroupBox Grid.Column="2" Margin="0,0,10,0" Height="160" HorizontalAlignment="Right" Width="450" Style="{DynamicResource fromNoTitle}" Tag="Start">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.ColumnSpan="2" Background="{DynamicResource 竖线}" Height="100" Width="2"></Border>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" FontSize="52" Foreground="#FFD2C106" Text="{Binding DdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">今日订单数</TextBlock>
</StackPanel>
<StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Style="{DynamicResource 数码管Text}" Foreground="#FFEC3107" FontSize="52" Text="{Binding YCDdCount,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></TextBlock>
<TextBlock Style="{DynamicResource textms}" Margin="0,10,0,0">异常订单数</TextBlock>
</StackPanel>
</Grid>
</GroupBox>
<GroupBox Margin="10,20,0,0" Height="780" Width="450" Header="已制作订单列表" Style="{DynamicResource from}" Tag="Start">
<DataGrid Margin="0,10,0,0" ItemsSource="{Binding OrderMakeListOver,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<DataGrid.Columns>
<DataGridTemplateColumn Width="50">
<DataGridTemplateColumn.Header>
<TextBlock Text="订单号" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding SortNum,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="80">
<DataGridTemplateColumn.Header>
<TextBlock Text="商品名称" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding GoodName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="145">
<DataGridTemplateColumn.Header>
<TextBlock Text="开始时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding StartTime,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Width="145">
<DataGridTemplateColumn.Header>
<TextBlock Text="结束时间" Foreground="White"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Margin="0,5,0,5" Text="{Binding StopTime,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontSize="14" HorizontalAlignment="Center"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</GroupBox>
</StackPanel>
</Grid>
</UserControl>

+ 29
- 0
BPASmartClient.ScreenLib/煮面机/ScreenMorksControl.xaml.cs Dosyayı Görüntüle

@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace BPASmartClient.ScreenLib
{
/// <summary>
/// ScreenMorksControl.xaml 的交互逻辑
/// </summary>
public partial class ScreenMorksControl : UserControl
{
public ScreenMorksControl()
{
InitializeComponent();
this.DataContext = new ScreenMorksControlViewModel();
}
}
}

+ 191
- 0
BPASmartClient.ScreenLib/煮面机/ScreenMorksControlViewModel.cs Dosyayı Görüntüle

@@ -0,0 +1,191 @@
using BPA.Helper;
using BPA.Message.Enum;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace BPASmartClient.ScreenLib
{
public class ScreenMorksControlViewModel : NotifyBase
{
#region 变量
/// <summary>
/// 柱状图显示集合
/// </summary>
public IEnumerable<KeyValuePair<string, double>> Histogram { get { return _Histogram; } set { _Histogram = value; OnPropertyChanged(); } }
private IEnumerable<KeyValuePair<string, double>> _Histogram = new List<KeyValuePair<string, double>>();

/// <summary>
/// 设备是否运行
/// </summary>
public DevIsRun DevIsRun { get { return _DevIsRun; } set { _DevIsRun = value; OnPropertyChanged(); } }
private DevIsRun _DevIsRun = DevIsRun.停止;

/// <summary>
/// 设备状态
/// </summary>
public DevRunStatus RunStatus { get { return _RunStatus; } set { _RunStatus = value; OnPropertyChanged(); } }
private DevRunStatus _RunStatus = DevRunStatus.正常;

/// <summary>
/// 订单数
/// </summary>
public int DdCount { get { return _DdCount; } set { _DdCount = value; OnPropertyChanged(); } }
private int _DdCount = 0;

/// <summary>
/// 异常订单数
/// </summary>
public int YCDdCount { get { return _YCDdCount; } set { _YCDdCount = value; OnPropertyChanged(); } }
private int _YCDdCount = 0;

/// <summary>
/// 广告地址
/// </summary>
public Uri GgAdder { get { return _GgAdder; } set { _GgAdder = value; OnPropertyChanged(); } }
private Uri _GgAdder = new Uri(System.Configuration.ConfigurationManager.AppSettings["GgAdder"].ToString());

/// <summary>
/// 正在制作订单数据
/// </summary>
public ObservableCollection<OrderMakeModel> OrderMakeList
{
get { return _OrderMakeList; }
set
{
_OrderMakeList = value;
OnPropertyChanged();
}
}
private ObservableCollection<OrderMakeModel> _OrderMakeList = new ObservableCollection<OrderMakeModel>();

/// <summary>
/// 制作完成订单数据
/// </summary>
public ObservableCollection<OrderMakeModel> OrderMakeListOver
{
get { return _OrderMakeListOver; }
set
{
_OrderMakeListOver = value;
OnPropertyChanged();
}
}
private ObservableCollection<OrderMakeModel> _OrderMakeListOver = new ObservableCollection<OrderMakeModel>();

/// <summary>
/// 告警数据
/// </summary>
public ObservableCollection<AlarmMsModel> AlarmList
{
get { return _AlarmList; }
set
{
_AlarmList = value;
OnPropertyChanged();
}
}
private ObservableCollection<AlarmMsModel> _AlarmList = new ObservableCollection<AlarmMsModel>();

#endregion
public ScreenMorksControlViewModel()
{
Init();
}

/// <summary>
/// 初始化
/// </summary>
public void Init()
{
ThreadManage.GetInstance().StartLong(new Action(() =>
{
System.Windows.Application.Current?.Dispatcher.Invoke((Action)(() =>
{
RunStatus = RunStatus == DevRunStatus.正常 ? DevRunStatus.异常 : DevRunStatus.正常;
DevIsRun = DevIsRun == DevIsRun.运行 ? DevIsRun.停止 : DevIsRun.运行;
DdCount = new Random().Next(0, 400);
YCDdCount = new Random().Next(0, 400);

List<ORDER_STATUS> oRDER_s = new List<ORDER_STATUS>() { ORDER_STATUS.WAIT, ORDER_STATUS.COOKING };
List<ORDER_STATUS> oRDER_s1 = new List<ORDER_STATUS>() { ORDER_STATUS.COMPLETED_COOK, ORDER_STATUS.COMPLETED_TAKE };

List<string> name_s = new List<string>() { "担担面", "鸡蛋面", "火鸡面", "扬州炒饭", "回锅肉盖饭" };
OrderMakeList = new ObservableCollection<OrderMakeModel>();
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "011", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "012", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "013", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "014", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeList.Add(new OrderMakeModel { Status = oRDER_s[new Random().Next(0, 2)], SortNum = "015", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });

OrderMakeListOver = new ObservableCollection<OrderMakeModel>();
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "001", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "002", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "003", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "005", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "006", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "008", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "009", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "010", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
OrderMakeListOver.Add(new OrderMakeModel { Status = oRDER_s1[new Random().Next(0, 2)], SortNum = "007", GoodName = name_s[new Random().Next(0, 5)], StartTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), StopTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });


AlarmList = new ObservableCollection<AlarmMsModel>();
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
Histogram = new[] {
new KeyValuePair<string, double>(name_s[0], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[1], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[2], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[3], new Random().Next(0,400)),
new KeyValuePair<string, double>(name_s[4], new Random().Next(0,400))};
}));
Thread.Sleep(5000);
}), $"{DateTime.Now},线程服务");
}
}
}

+ 9
- 0
BPASmartClient.ScreenMaxWok/App.config Dosyayı Görüntüle

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<!--Redis配置-->
<add key="RedisConnection" value="10.2.1.254,6379,BapAdmin123456.,1"/>
<add key="DeviceMC" value="1"/>
<add key="GgAdder" value="https://stream7.iqilu.com/10339/upload_transcode/202002/18/20200218114723HDu3hhxqIT.mp4"/>
</appSettings>
</configuration>

+ 8
- 0
BPASmartClient.ScreenMaxWok/App.xaml Dosyayı Görüntüle

@@ -0,0 +1,8 @@
<Application x:Class="BPASmartClient.ScreenMaxWok.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:BPASmartClient.ScreenMaxWok">
<Application.Resources>
</Application.Resources>
</Application>

+ 27
- 0
BPASmartClient.ScreenMaxWok/App.xaml.cs Dosyayı Görüntüle

@@ -0,0 +1,27 @@
using BPASmartClient.ScreenLib;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace BPASmartClient.ScreenMaxWok
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
AppMain appMain = new AppMain(MainWindow, this.GetType());
}
protected override void OnExit(ExitEventArgs e)
{
base.OnExit(e);
}
}
}

+ 10
- 0
BPASmartClient.ScreenMaxWok/AssemblyInfo.cs Dosyayı Görüntüle

@@ -0,0 +1,10 @@
using System.Windows;

[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

+ 23
- 0
BPASmartClient.ScreenMaxWok/BPASmartClient.ScreenMaxWok.csproj Dosyayı Görüntüle

@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<AssemblyName>大炒大屏</AssemblyName>
<ApplicationIcon>hbl.ico</ApplicationIcon>

</PropertyGroup>
<ItemGroup>
<Content Include="hbl.ico" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BPASmartClient.ScreenLib\BPASmartClient.ScreenLib.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="App.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>


+ 9
- 0
BPASmartClient.ScreenMinWok/App.config Dosyayı Görüntüle

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<!--Redis配置-->
<add key="RedisConnection" value="10.2.1.254,6379,BapAdmin123456.,1"/>
<add key="DeviceMC" value="1"/>
<add key="GgAdder" value="https://stream7.iqilu.com/10339/upload_transcode/202002/18/20200218114723HDu3hhxqIT.mp4"/>
</appSettings>
</configuration>

+ 8
- 0
BPASmartClient.ScreenMinWok/App.xaml Dosyayı Görüntüle

@@ -0,0 +1,8 @@
<Application x:Class="BPASmartClient.ScreenMinWok.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:BPASmartClient.ScreenMinWok">
<Application.Resources>
</Application.Resources>
</Application>

+ 27
- 0
BPASmartClient.ScreenMinWok/App.xaml.cs Dosyayı Görüntüle

@@ -0,0 +1,27 @@
using BPASmartClient.ScreenLib;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace BPASmartClient.ScreenMinWok
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
AppMain appMain = new AppMain(MainWindow, this.GetType());
}
protected override void OnExit(ExitEventArgs e)
{
base.OnExit(e);
}
}
}

+ 10
- 0
BPASmartClient.ScreenMinWok/AssemblyInfo.cs Dosyayı Görüntüle

@@ -0,0 +1,10 @@
using System.Windows;

[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

+ 24
- 0
BPASmartClient.ScreenMinWok/BPASmartClient.ScreenMinWok.csproj Dosyayı Görüntüle

@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<AssemblyName>小炒大屏</AssemblyName>
<ApplicationIcon>hbl.ico</ApplicationIcon>

</PropertyGroup>

<ItemGroup>
<Content Include="hbl.ico" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BPASmartClient.ScreenLib\BPASmartClient.ScreenLib.csproj" />
</ItemGroup>
<ItemGroup>
<Resource Include="App.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
</ItemGroup>
</Project>


+ 9
- 0
BPASmartClient.ScreenMorks/App.config Dosyayı Görüntüle

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<!--Redis配置-->
<add key="RedisConnection" value="10.2.1.254,6379,BapAdmin123456.,1"/>
<add key="DeviceMC" value="1"/>
<add key="GgAdder" value="https://stream7.iqilu.com/10339/upload_transcode/202002/18/20200218114723HDu3hhxqIT.mp4"/>
</appSettings>
</configuration>

+ 8
- 0
BPASmartClient.ScreenMorks/App.xaml Dosyayı Görüntüle

@@ -0,0 +1,8 @@
<Application x:Class="BPASmartClient.ScreenMorks.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:BPASmartClient.ScreenMorks">
<Application.Resources>
</Application.Resources>
</Application>

+ 27
- 0
BPASmartClient.ScreenMorks/App.xaml.cs Dosyayı Görüntüle

@@ -0,0 +1,27 @@
using BPASmartClient.ScreenLib;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace BPASmartClient.ScreenMorks
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
AppMain appMain = new AppMain(MainWindow, this.GetType());
}
protected override void OnExit(ExitEventArgs e)
{
base.OnExit(e);
}
}
}

+ 10
- 0
BPASmartClient.ScreenMorks/AssemblyInfo.cs Dosyayı Görüntüle

@@ -0,0 +1,10 @@
using System.Windows;

[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

+ 24
- 0
BPASmartClient.ScreenMorks/BPASmartClient.ScreenMorks.csproj Dosyayı Görüntüle

@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<AssemblyName>煮面机大屏</AssemblyName>
<ApplicationIcon>hbl.ico</ApplicationIcon>

</PropertyGroup>

<ItemGroup>
<Content Include="hbl.ico" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BPASmartClient.ScreenLib\BPASmartClient.ScreenLib.csproj" />
</ItemGroup>
<ItemGroup>
<Resource Include="App.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
</ItemGroup>
</Project>


+ 9
- 0
BPASmartClient.ScreenSplitMeals/App.config Dosyayı Görüntüle

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<!--Redis配置-->
<add key="RedisConnection" value="10.2.1.254,6379,BapAdmin123456.,1"/>
<add key="DeviceMC" value="1"/>
<add key="GgAdder" value="https://stream7.iqilu.com/10339/upload_transcode/202002/18/20200218114723HDu3hhxqIT.mp4"/>
</appSettings>
</configuration>

+ 8
- 0
BPASmartClient.ScreenSplitMeals/App.xaml Dosyayı Görüntüle

@@ -0,0 +1,8 @@
<Application x:Class="BPASmartClient.ScreenSplitMeals.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:BPASmartClient.ScreenSplitMeals">
<Application.Resources>
</Application.Resources>
</Application>

+ 27
- 0
BPASmartClient.ScreenSplitMeals/App.xaml.cs Dosyayı Görüntüle

@@ -0,0 +1,27 @@
using BPASmartClient.ScreenLib;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace BPASmartClient.ScreenSplitMeals
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
AppMain appMain = new AppMain(MainWindow, this.GetType());
}
protected override void OnExit(ExitEventArgs e)
{
base.OnExit(e);
}
}
}

+ 10
- 0
BPASmartClient.ScreenSplitMeals/AssemblyInfo.cs Dosyayı Görüntüle

@@ -0,0 +1,10 @@
using System.Windows;

[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

+ 24
- 0
BPASmartClient.ScreenSplitMeals/BPASmartClient.ScreenSplitMeals.csproj Dosyayı Görüntüle

@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<AssemblyName>分餐机大屏</AssemblyName>
<ApplicationIcon>hbl.ico</ApplicationIcon>

</PropertyGroup>

<ItemGroup>
<Content Include="hbl.ico" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BPASmartClient.ScreenLib\BPASmartClient.ScreenLib.csproj" />
</ItemGroup>
<ItemGroup>
<Resource Include="App.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
</ItemGroup>
</Project>


+ 147
- 1
SmartClient.sln Dosyayı Görüntüle

@@ -172,7 +172,25 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MorkMOC", "B
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmart.MenuLoad", "BPASmart.MenuLoad\BPASmart.MenuLoad.csproj", "{7A7547D3-F2EF-4DA4-AD45-D1B49210082B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BPASmartClient.MorkBF", "BPASmartClient.MorkBF\BPASmartClient.MorkBF.csproj", "{CD0FBCF1-9C49-4032-96AD-B9E25F86F2A7}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.MorkBF", "BPASmartClient.MorkBF\BPASmartClient.MorkBF.csproj", "{CD0FBCF1-9C49-4032-96AD-B9E25F86F2A7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "7.DeviceMotion", "7.DeviceMotion", "{7BE13E55-D8B1-4232-AE63-8BF122633297}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "公共库", "公共库", "{C6984F48-A0FE-47A4-B63B-E4E5BCFCD6D3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "大屏实例", "大屏实例", "{C5968A90-F4CF-4904-88C4-62C77C820A04}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.ScreenALL", "BPASmartClient.ScreenALL\BPASmartClient.ScreenALL.csproj", "{0C3CDAFA-5A4B-4E4B-AB7D-3B4EF0ECB761}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.ScreenMorks", "BPASmartClient.ScreenMorks\BPASmartClient.ScreenMorks.csproj", "{91F3A678-35A1-4779-B802-196C0A9A87A5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.ScreenMaxWok", "BPASmartClient.ScreenMaxWok\BPASmartClient.ScreenMaxWok.csproj", "{95D47D8E-A5DA-446D-A338-9F4564628547}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.ScreenMinWok", "BPASmartClient.ScreenMinWok\BPASmartClient.ScreenMinWok.csproj", "{286A2E28-B04E-4EA6-9017-D6FA6F8B9A48}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.ScreenSplitMeals", "BPASmartClient.ScreenSplitMeals\BPASmartClient.ScreenSplitMeals.csproj", "{135A0978-351F-4727-82CE-2B7A8632AF1B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPASmartClient.ScreenLib", "BPASmartClient.ScreenLib\BPASmartClient.ScreenLib.csproj", "{798BBFFE-3BA2-40BA-BFE1-9502398F1F08}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -1648,6 +1666,126 @@ Global
{CD0FBCF1-9C49-4032-96AD-B9E25F86F2A7}.Release|x64.Build.0 = Release|Any CPU
{CD0FBCF1-9C49-4032-96AD-B9E25F86F2A7}.Release|x86.ActiveCfg = Release|Any CPU
{CD0FBCF1-9C49-4032-96AD-B9E25F86F2A7}.Release|x86.Build.0 = Release|Any CPU
{0C3CDAFA-5A4B-4E4B-AB7D-3B4EF0ECB761}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0C3CDAFA-5A4B-4E4B-AB7D-3B4EF0ECB761}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0C3CDAFA-5A4B-4E4B-AB7D-3B4EF0ECB761}.Debug|ARM.ActiveCfg = Debug|Any CPU
{0C3CDAFA-5A4B-4E4B-AB7D-3B4EF0ECB761}.Debug|ARM.Build.0 = Debug|Any CPU
{0C3CDAFA-5A4B-4E4B-AB7D-3B4EF0ECB761}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{0C3CDAFA-5A4B-4E4B-AB7D-3B4EF0ECB761}.Debug|ARM64.Build.0 = Debug|Any CPU
{0C3CDAFA-5A4B-4E4B-AB7D-3B4EF0ECB761}.Debug|x64.ActiveCfg = Debug|Any CPU
{0C3CDAFA-5A4B-4E4B-AB7D-3B4EF0ECB761}.Debug|x64.Build.0 = Debug|Any CPU
{0C3CDAFA-5A4B-4E4B-AB7D-3B4EF0ECB761}.Debug|x86.ActiveCfg = Debug|Any CPU
{0C3CDAFA-5A4B-4E4B-AB7D-3B4EF0ECB761}.Debug|x86.Build.0 = Debug|Any CPU
{0C3CDAFA-5A4B-4E4B-AB7D-3B4EF0ECB761}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0C3CDAFA-5A4B-4E4B-AB7D-3B4EF0ECB761}.Release|Any CPU.Build.0 = Release|Any CPU
{0C3CDAFA-5A4B-4E4B-AB7D-3B4EF0ECB761}.Release|ARM.ActiveCfg = Release|Any CPU
{0C3CDAFA-5A4B-4E4B-AB7D-3B4EF0ECB761}.Release|ARM.Build.0 = Release|Any CPU
{0C3CDAFA-5A4B-4E4B-AB7D-3B4EF0ECB761}.Release|ARM64.ActiveCfg = Release|Any CPU
{0C3CDAFA-5A4B-4E4B-AB7D-3B4EF0ECB761}.Release|ARM64.Build.0 = Release|Any CPU
{0C3CDAFA-5A4B-4E4B-AB7D-3B4EF0ECB761}.Release|x64.ActiveCfg = Release|Any CPU
{0C3CDAFA-5A4B-4E4B-AB7D-3B4EF0ECB761}.Release|x64.Build.0 = Release|Any CPU
{0C3CDAFA-5A4B-4E4B-AB7D-3B4EF0ECB761}.Release|x86.ActiveCfg = Release|Any CPU
{0C3CDAFA-5A4B-4E4B-AB7D-3B4EF0ECB761}.Release|x86.Build.0 = Release|Any CPU
{91F3A678-35A1-4779-B802-196C0A9A87A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{91F3A678-35A1-4779-B802-196C0A9A87A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{91F3A678-35A1-4779-B802-196C0A9A87A5}.Debug|ARM.ActiveCfg = Debug|Any CPU
{91F3A678-35A1-4779-B802-196C0A9A87A5}.Debug|ARM.Build.0 = Debug|Any CPU
{91F3A678-35A1-4779-B802-196C0A9A87A5}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{91F3A678-35A1-4779-B802-196C0A9A87A5}.Debug|ARM64.Build.0 = Debug|Any CPU
{91F3A678-35A1-4779-B802-196C0A9A87A5}.Debug|x64.ActiveCfg = Debug|Any CPU
{91F3A678-35A1-4779-B802-196C0A9A87A5}.Debug|x64.Build.0 = Debug|Any CPU
{91F3A678-35A1-4779-B802-196C0A9A87A5}.Debug|x86.ActiveCfg = Debug|Any CPU
{91F3A678-35A1-4779-B802-196C0A9A87A5}.Debug|x86.Build.0 = Debug|Any CPU
{91F3A678-35A1-4779-B802-196C0A9A87A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{91F3A678-35A1-4779-B802-196C0A9A87A5}.Release|Any CPU.Build.0 = Release|Any CPU
{91F3A678-35A1-4779-B802-196C0A9A87A5}.Release|ARM.ActiveCfg = Release|Any CPU
{91F3A678-35A1-4779-B802-196C0A9A87A5}.Release|ARM.Build.0 = Release|Any CPU
{91F3A678-35A1-4779-B802-196C0A9A87A5}.Release|ARM64.ActiveCfg = Release|Any CPU
{91F3A678-35A1-4779-B802-196C0A9A87A5}.Release|ARM64.Build.0 = Release|Any CPU
{91F3A678-35A1-4779-B802-196C0A9A87A5}.Release|x64.ActiveCfg = Release|Any CPU
{91F3A678-35A1-4779-B802-196C0A9A87A5}.Release|x64.Build.0 = Release|Any CPU
{91F3A678-35A1-4779-B802-196C0A9A87A5}.Release|x86.ActiveCfg = Release|Any CPU
{91F3A678-35A1-4779-B802-196C0A9A87A5}.Release|x86.Build.0 = Release|Any CPU
{95D47D8E-A5DA-446D-A338-9F4564628547}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{95D47D8E-A5DA-446D-A338-9F4564628547}.Debug|Any CPU.Build.0 = Debug|Any CPU
{95D47D8E-A5DA-446D-A338-9F4564628547}.Debug|ARM.ActiveCfg = Debug|Any CPU
{95D47D8E-A5DA-446D-A338-9F4564628547}.Debug|ARM.Build.0 = Debug|Any CPU
{95D47D8E-A5DA-446D-A338-9F4564628547}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{95D47D8E-A5DA-446D-A338-9F4564628547}.Debug|ARM64.Build.0 = Debug|Any CPU
{95D47D8E-A5DA-446D-A338-9F4564628547}.Debug|x64.ActiveCfg = Debug|Any CPU
{95D47D8E-A5DA-446D-A338-9F4564628547}.Debug|x64.Build.0 = Debug|Any CPU
{95D47D8E-A5DA-446D-A338-9F4564628547}.Debug|x86.ActiveCfg = Debug|Any CPU
{95D47D8E-A5DA-446D-A338-9F4564628547}.Debug|x86.Build.0 = Debug|Any CPU
{95D47D8E-A5DA-446D-A338-9F4564628547}.Release|Any CPU.ActiveCfg = Release|Any CPU
{95D47D8E-A5DA-446D-A338-9F4564628547}.Release|Any CPU.Build.0 = Release|Any CPU
{95D47D8E-A5DA-446D-A338-9F4564628547}.Release|ARM.ActiveCfg = Release|Any CPU
{95D47D8E-A5DA-446D-A338-9F4564628547}.Release|ARM.Build.0 = Release|Any CPU
{95D47D8E-A5DA-446D-A338-9F4564628547}.Release|ARM64.ActiveCfg = Release|Any CPU
{95D47D8E-A5DA-446D-A338-9F4564628547}.Release|ARM64.Build.0 = Release|Any CPU
{95D47D8E-A5DA-446D-A338-9F4564628547}.Release|x64.ActiveCfg = Release|Any CPU
{95D47D8E-A5DA-446D-A338-9F4564628547}.Release|x64.Build.0 = Release|Any CPU
{95D47D8E-A5DA-446D-A338-9F4564628547}.Release|x86.ActiveCfg = Release|Any CPU
{95D47D8E-A5DA-446D-A338-9F4564628547}.Release|x86.Build.0 = Release|Any CPU
{286A2E28-B04E-4EA6-9017-D6FA6F8B9A48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{286A2E28-B04E-4EA6-9017-D6FA6F8B9A48}.Debug|Any CPU.Build.0 = Debug|Any CPU
{286A2E28-B04E-4EA6-9017-D6FA6F8B9A48}.Debug|ARM.ActiveCfg = Debug|Any CPU
{286A2E28-B04E-4EA6-9017-D6FA6F8B9A48}.Debug|ARM.Build.0 = Debug|Any CPU
{286A2E28-B04E-4EA6-9017-D6FA6F8B9A48}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{286A2E28-B04E-4EA6-9017-D6FA6F8B9A48}.Debug|ARM64.Build.0 = Debug|Any CPU
{286A2E28-B04E-4EA6-9017-D6FA6F8B9A48}.Debug|x64.ActiveCfg = Debug|Any CPU
{286A2E28-B04E-4EA6-9017-D6FA6F8B9A48}.Debug|x64.Build.0 = Debug|Any CPU
{286A2E28-B04E-4EA6-9017-D6FA6F8B9A48}.Debug|x86.ActiveCfg = Debug|Any CPU
{286A2E28-B04E-4EA6-9017-D6FA6F8B9A48}.Debug|x86.Build.0 = Debug|Any CPU
{286A2E28-B04E-4EA6-9017-D6FA6F8B9A48}.Release|Any CPU.ActiveCfg = Release|Any CPU
{286A2E28-B04E-4EA6-9017-D6FA6F8B9A48}.Release|Any CPU.Build.0 = Release|Any CPU
{286A2E28-B04E-4EA6-9017-D6FA6F8B9A48}.Release|ARM.ActiveCfg = Release|Any CPU
{286A2E28-B04E-4EA6-9017-D6FA6F8B9A48}.Release|ARM.Build.0 = Release|Any CPU
{286A2E28-B04E-4EA6-9017-D6FA6F8B9A48}.Release|ARM64.ActiveCfg = Release|Any CPU
{286A2E28-B04E-4EA6-9017-D6FA6F8B9A48}.Release|ARM64.Build.0 = Release|Any CPU
{286A2E28-B04E-4EA6-9017-D6FA6F8B9A48}.Release|x64.ActiveCfg = Release|Any CPU
{286A2E28-B04E-4EA6-9017-D6FA6F8B9A48}.Release|x64.Build.0 = Release|Any CPU
{286A2E28-B04E-4EA6-9017-D6FA6F8B9A48}.Release|x86.ActiveCfg = Release|Any CPU
{286A2E28-B04E-4EA6-9017-D6FA6F8B9A48}.Release|x86.Build.0 = Release|Any CPU
{135A0978-351F-4727-82CE-2B7A8632AF1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{135A0978-351F-4727-82CE-2B7A8632AF1B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{135A0978-351F-4727-82CE-2B7A8632AF1B}.Debug|ARM.ActiveCfg = Debug|Any CPU
{135A0978-351F-4727-82CE-2B7A8632AF1B}.Debug|ARM.Build.0 = Debug|Any CPU
{135A0978-351F-4727-82CE-2B7A8632AF1B}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{135A0978-351F-4727-82CE-2B7A8632AF1B}.Debug|ARM64.Build.0 = Debug|Any CPU
{135A0978-351F-4727-82CE-2B7A8632AF1B}.Debug|x64.ActiveCfg = Debug|Any CPU
{135A0978-351F-4727-82CE-2B7A8632AF1B}.Debug|x64.Build.0 = Debug|Any CPU
{135A0978-351F-4727-82CE-2B7A8632AF1B}.Debug|x86.ActiveCfg = Debug|Any CPU
{135A0978-351F-4727-82CE-2B7A8632AF1B}.Debug|x86.Build.0 = Debug|Any CPU
{135A0978-351F-4727-82CE-2B7A8632AF1B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{135A0978-351F-4727-82CE-2B7A8632AF1B}.Release|Any CPU.Build.0 = Release|Any CPU
{135A0978-351F-4727-82CE-2B7A8632AF1B}.Release|ARM.ActiveCfg = Release|Any CPU
{135A0978-351F-4727-82CE-2B7A8632AF1B}.Release|ARM.Build.0 = Release|Any CPU
{135A0978-351F-4727-82CE-2B7A8632AF1B}.Release|ARM64.ActiveCfg = Release|Any CPU
{135A0978-351F-4727-82CE-2B7A8632AF1B}.Release|ARM64.Build.0 = Release|Any CPU
{135A0978-351F-4727-82CE-2B7A8632AF1B}.Release|x64.ActiveCfg = Release|Any CPU
{135A0978-351F-4727-82CE-2B7A8632AF1B}.Release|x64.Build.0 = Release|Any CPU
{135A0978-351F-4727-82CE-2B7A8632AF1B}.Release|x86.ActiveCfg = Release|Any CPU
{135A0978-351F-4727-82CE-2B7A8632AF1B}.Release|x86.Build.0 = Release|Any CPU
{798BBFFE-3BA2-40BA-BFE1-9502398F1F08}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{798BBFFE-3BA2-40BA-BFE1-9502398F1F08}.Debug|Any CPU.Build.0 = Debug|Any CPU
{798BBFFE-3BA2-40BA-BFE1-9502398F1F08}.Debug|ARM.ActiveCfg = Debug|Any CPU
{798BBFFE-3BA2-40BA-BFE1-9502398F1F08}.Debug|ARM.Build.0 = Debug|Any CPU
{798BBFFE-3BA2-40BA-BFE1-9502398F1F08}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{798BBFFE-3BA2-40BA-BFE1-9502398F1F08}.Debug|ARM64.Build.0 = Debug|Any CPU
{798BBFFE-3BA2-40BA-BFE1-9502398F1F08}.Debug|x64.ActiveCfg = Debug|Any CPU
{798BBFFE-3BA2-40BA-BFE1-9502398F1F08}.Debug|x64.Build.0 = Debug|Any CPU
{798BBFFE-3BA2-40BA-BFE1-9502398F1F08}.Debug|x86.ActiveCfg = Debug|Any CPU
{798BBFFE-3BA2-40BA-BFE1-9502398F1F08}.Debug|x86.Build.0 = Debug|Any CPU
{798BBFFE-3BA2-40BA-BFE1-9502398F1F08}.Release|Any CPU.ActiveCfg = Release|Any CPU
{798BBFFE-3BA2-40BA-BFE1-9502398F1F08}.Release|Any CPU.Build.0 = Release|Any CPU
{798BBFFE-3BA2-40BA-BFE1-9502398F1F08}.Release|ARM.ActiveCfg = Release|Any CPU
{798BBFFE-3BA2-40BA-BFE1-9502398F1F08}.Release|ARM.Build.0 = Release|Any CPU
{798BBFFE-3BA2-40BA-BFE1-9502398F1F08}.Release|ARM64.ActiveCfg = Release|Any CPU
{798BBFFE-3BA2-40BA-BFE1-9502398F1F08}.Release|ARM64.Build.0 = Release|Any CPU
{798BBFFE-3BA2-40BA-BFE1-9502398F1F08}.Release|x64.ActiveCfg = Release|Any CPU
{798BBFFE-3BA2-40BA-BFE1-9502398F1F08}.Release|x64.Build.0 = Release|Any CPU
{798BBFFE-3BA2-40BA-BFE1-9502398F1F08}.Release|x86.ActiveCfg = Release|Any CPU
{798BBFFE-3BA2-40BA-BFE1-9502398F1F08}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1728,6 +1866,14 @@ Global
{D5081D7B-3EBB-42C7-8FB9-A889870D08C2} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F}
{7A7547D3-F2EF-4DA4-AD45-D1B49210082B} = {06F0B369-0483-46DD-82D2-70431FB505C1}
{CD0FBCF1-9C49-4032-96AD-B9E25F86F2A7} = {9FB27073-61A0-4FE3-94DB-5FDDE062332F}
{C6984F48-A0FE-47A4-B63B-E4E5BCFCD6D3} = {7BE13E55-D8B1-4232-AE63-8BF122633297}
{C5968A90-F4CF-4904-88C4-62C77C820A04} = {7BE13E55-D8B1-4232-AE63-8BF122633297}
{0C3CDAFA-5A4B-4E4B-AB7D-3B4EF0ECB761} = {C5968A90-F4CF-4904-88C4-62C77C820A04}
{91F3A678-35A1-4779-B802-196C0A9A87A5} = {C5968A90-F4CF-4904-88C4-62C77C820A04}
{95D47D8E-A5DA-446D-A338-9F4564628547} = {C5968A90-F4CF-4904-88C4-62C77C820A04}
{286A2E28-B04E-4EA6-9017-D6FA6F8B9A48} = {C5968A90-F4CF-4904-88C4-62C77C820A04}
{135A0978-351F-4727-82CE-2B7A8632AF1B} = {C5968A90-F4CF-4904-88C4-62C77C820A04}
{798BBFFE-3BA2-40BA-BFE1-9502398F1F08} = {C6984F48-A0FE-47A4-B63B-E4E5BCFCD6D3}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9AEC9B81-0222-4DE9-B642-D915C29222AC}


Yükleniyor…
İptal
Kaydet