终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

192 lines
20 KiB

  1. using BPA.Helper;
  2. using BPA.Message.Enum;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Collections.ObjectModel;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading;
  9. using System.Threading.Tasks;
  10. namespace BPASmartClient.ScreenLib
  11. {
  12. public class ScreenMorksControlViewModel : NotifyBase
  13. {
  14. #region 变量
  15. /// <summary>
  16. /// 柱状图显示集合
  17. /// </summary>
  18. public IEnumerable<KeyValuePair<string, double>> Histogram { get { return _Histogram; } set { _Histogram = value; OnPropertyChanged(); } }
  19. private IEnumerable<KeyValuePair<string, double>> _Histogram = new List<KeyValuePair<string, double>>();
  20. /// <summary>
  21. /// 设备是否运行
  22. /// </summary>
  23. public DevIsRun DevIsRun { get { return _DevIsRun; } set { _DevIsRun = value; OnPropertyChanged(); } }
  24. private DevIsRun _DevIsRun = DevIsRun.停止;
  25. /// <summary>
  26. /// 设备状态
  27. /// </summary>
  28. public DevRunStatus RunStatus { get { return _RunStatus; } set { _RunStatus = value; OnPropertyChanged(); } }
  29. private DevRunStatus _RunStatus = DevRunStatus.正常;
  30. /// <summary>
  31. /// 订单数
  32. /// </summary>
  33. public int DdCount { get { return _DdCount; } set { _DdCount = value; OnPropertyChanged(); } }
  34. private int _DdCount = 0;
  35. /// <summary>
  36. /// 异常订单数
  37. /// </summary>
  38. public int YCDdCount { get { return _YCDdCount; } set { _YCDdCount = value; OnPropertyChanged(); } }
  39. private int _YCDdCount = 0;
  40. /// <summary>
  41. /// 广告地址
  42. /// </summary>
  43. public Uri GgAdder { get { return _GgAdder; } set { _GgAdder = value; OnPropertyChanged(); } }
  44. private Uri _GgAdder = new Uri(System.Configuration.ConfigurationManager.AppSettings["GgAdder"].ToString());
  45. /// <summary>
  46. /// 正在制作订单数据
  47. /// </summary>
  48. public ObservableCollection<OrderMakeModel> OrderMakeList
  49. {
  50. get { return _OrderMakeList; }
  51. set
  52. {
  53. _OrderMakeList = value;
  54. OnPropertyChanged();
  55. }
  56. }
  57. private ObservableCollection<OrderMakeModel> _OrderMakeList = new ObservableCollection<OrderMakeModel>();
  58. /// <summary>
  59. /// 制作完成订单数据
  60. /// </summary>
  61. public ObservableCollection<OrderMakeModel> OrderMakeListOver
  62. {
  63. get { return _OrderMakeListOver; }
  64. set
  65. {
  66. _OrderMakeListOver = value;
  67. OnPropertyChanged();
  68. }
  69. }
  70. private ObservableCollection<OrderMakeModel> _OrderMakeListOver = new ObservableCollection<OrderMakeModel>();
  71. /// <summary>
  72. /// 告警数据
  73. /// </summary>
  74. public ObservableCollection<AlarmMsModel> AlarmList
  75. {
  76. get { return _AlarmList; }
  77. set
  78. {
  79. _AlarmList = value;
  80. OnPropertyChanged();
  81. }
  82. }
  83. private ObservableCollection<AlarmMsModel> _AlarmList = new ObservableCollection<AlarmMsModel>();
  84. #endregion
  85. public ScreenMorksControlViewModel()
  86. {
  87. Init();
  88. }
  89. /// <summary>
  90. /// 初始化
  91. /// </summary>
  92. public void Init()
  93. {
  94. ThreadManage.GetInstance().StartLong(new Action(() =>
  95. {
  96. System.Windows.Application.Current?.Dispatcher.Invoke((Action)(() =>
  97. {
  98. RunStatus = RunStatus == DevRunStatus.正常 ? DevRunStatus.异常 : DevRunStatus.正常;
  99. DevIsRun = DevIsRun == DevIsRun.运行 ? DevIsRun.停止 : DevIsRun.运行;
  100. DdCount = new Random().Next(0, 400);
  101. YCDdCount = new Random().Next(0, 400);
  102. List<ORDER_STATUS> oRDER_s = new List<ORDER_STATUS>() { ORDER_STATUS.WAIT, ORDER_STATUS.COOKING };
  103. List<ORDER_STATUS> oRDER_s1 = new List<ORDER_STATUS>() { ORDER_STATUS.COMPLETED_COOK, ORDER_STATUS.COMPLETED_TAKE };
  104. List<string> name_s = new List<string>() { "担担面", "鸡蛋面", "火鸡面", "扬州炒饭", "回锅肉盖饭" };
  105. OrderMakeList = new ObservableCollection<OrderMakeModel>();
  106. 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") });
  107. 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") });
  108. 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") });
  109. 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") });
  110. 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") });
  111. 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") });
  112. 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") });
  113. 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") });
  114. 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") });
  115. 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") });
  116. 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") });
  117. 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") });
  118. 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") });
  119. 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") });
  120. 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") });
  121. 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") });
  122. 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") });
  123. 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") });
  124. 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") });
  125. 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") });
  126. 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") });
  127. 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") });
  128. 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") });
  129. 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") });
  130. 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") });
  131. OrderMakeListOver = new ObservableCollection<OrderMakeModel>();
  132. 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") });
  133. 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") });
  134. 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") });
  135. 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") });
  136. 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") });
  137. 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") });
  138. 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") });
  139. 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") });
  140. 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") });
  141. 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") });
  142. 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") });
  143. 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") });
  144. 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") });
  145. 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") });
  146. 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") });
  147. 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") });
  148. 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") });
  149. 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") });
  150. 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") });
  151. 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") });
  152. 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") });
  153. 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") });
  154. 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") });
  155. 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") });
  156. 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") });
  157. AlarmList = new ObservableCollection<AlarmMsModel>();
  158. AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
  159. AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
  160. AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
  161. AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
  162. AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
  163. AlarmList.Add(new AlarmMsModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" });
  164. Histogram = new[] {
  165. new KeyValuePair<string, double>(name_s[0], new Random().Next(0,400)),
  166. new KeyValuePair<string, double>(name_s[1], new Random().Next(0,400)),
  167. new KeyValuePair<string, double>(name_s[2], new Random().Next(0,400)),
  168. new KeyValuePair<string, double>(name_s[3], new Random().Next(0,400)),
  169. new KeyValuePair<string, double>(name_s[4], new Random().Next(0,400))};
  170. }));
  171. Thread.Sleep(5000);
  172. }), $"{DateTime.Now},线程服务");
  173. }
  174. }
  175. }