终端一体化运控平台
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
2 лет назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. using BPA.CustomResource.UserControls;
  2. using BPASmartClient.ScreenLib.炒锅;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Windows;
  9. using System.Windows.Forms;
  10. namespace BPASmartClient.ScreenLib
  11. {
  12. public partial class AppMain
  13. {
  14. public AppMain(Window window, Type type)
  15. {
  16. //启动Redis数据读取
  17. AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
  18. FSystemHelper.GetInstance.CreateDesktopShortcut();
  19. //FSystemHelper.GetInstance.AutoStart(true);
  20. WindowLargeScreen windowLarge = new WindowLargeScreen();
  21. #region 设置显示页面与标题
  22. string TitleName = $"{type.Assembly.ManifestModule.Name.Replace(".dll", "")}";
  23. string name = type.FullName.Split('.')[2];
  24. string sbmc = string.Empty;
  25. switch (type.FullName)
  26. {
  27. case "BPASmartClient.ScreenALL.App":
  28. windowLarge.Init(TitleName, new ScreenALLControl()); windowLarge.Show();
  29. Main.GetInstance.Start();
  30. break;
  31. case "BPASmartClient.ScreenMaxWok.App":
  32. windowLarge.Init(TitleName, new ScreenMaxWokControl()); windowLarge.Show();
  33. Main.GetInstance.Start();
  34. break;
  35. case "BPASmartClient.ScreenMinWok.App":
  36. windowLarge.Init(TitleName, new ScreenMinWokControl()); windowLarge.Show();
  37. Main.GetInstance.Start();
  38. break;
  39. case "BPASmartClient.ScreenMorks.App":
  40. windowLarge.Init(TitleName, new ScreenMorksControl()); windowLarge.Show();
  41. Main.GetInstance.Start();
  42. break;
  43. case "BPASmartClient.ScreenSplitMeals.App":
  44. ScreenSplitMealsControl1 ScreenSplit = new ScreenSplitMealsControl1();
  45. windowLarge.Init("一号" + TitleName, ScreenSplit);
  46. WindowLargeScreen windowLarge2 = new WindowLargeScreen();
  47. windowLarge2.Init("二号" + TitleName, new ScreenSplitMealsControl2());
  48. WindowLargeScreen windowLarge3 = new WindowLargeScreen();
  49. windowLarge3.Init("三号" + TitleName, new ScreenSplitMealsControl3());
  50. for (int i = 0; i < 3; i++)
  51. {
  52. if (i==0)
  53. {
  54. windowLarge.WindowStartupLocation = WindowStartupLocation.Manual;
  55. windowLarge.Left = i * 1920;
  56. windowLarge.Top = 0;
  57. windowLarge.Height = 1080;
  58. windowLarge.Width = 1920;
  59. windowLarge.WindowState = WindowState.Maximized;
  60. windowLarge.ResizeMode = ResizeMode.NoResize;
  61. windowLarge.WindowStyle = WindowStyle.None;
  62. windowLarge.WindowState = WindowState.Normal;
  63. windowLarge.ShowInTaskbar = false;
  64. }
  65. else if (i == 1)
  66. {
  67. windowLarge2.WindowStartupLocation = WindowStartupLocation.Manual;
  68. windowLarge2.Left = i * 1920;
  69. windowLarge2.Top = 0;
  70. windowLarge2.Height = 1080;
  71. windowLarge2.Width = 1920;
  72. windowLarge2.WindowState = WindowState.Maximized;
  73. windowLarge2.ResizeMode = ResizeMode.NoResize;
  74. windowLarge2.WindowStyle = WindowStyle.None;
  75. windowLarge2.WindowState = WindowState.Normal;
  76. windowLarge2.ShowInTaskbar = false;
  77. }
  78. else if (i == 2)
  79. {
  80. windowLarge3.WindowStartupLocation = WindowStartupLocation.Manual;
  81. windowLarge3.Left = i * 1920;
  82. windowLarge3.Top = 0;
  83. windowLarge3.Height = 1080;
  84. windowLarge3.Width = 1920;
  85. windowLarge3.WindowState = WindowState.Maximized;
  86. windowLarge3.ResizeMode = ResizeMode.NoResize;
  87. windowLarge3.WindowStyle = WindowStyle.None;
  88. windowLarge3.WindowState = WindowState.Normal;
  89. windowLarge3.ShowInTaskbar = false;
  90. }
  91. }
  92. Main.GetInstance.StartServer();
  93. #region 不需要代码
  94. //foreach (System.Windows.Forms.Screen scr in System.Windows.Forms.Screen.AllScreens)
  95. //{
  96. // if (i.ToString() == System.Configuration.ConfigurationManager.AppSettings["一号屏"].ToString())
  97. // {
  98. // windowLarge.WindowStartupLocation = WindowStartupLocation.Manual;
  99. // windowLarge.Left = scr.WorkingArea.Left;
  100. // windowLarge.Top = scr.WorkingArea.Top;
  101. // windowLarge.Width = scr.Bounds.Width;
  102. // windowLarge.Height = scr.Bounds.Height;
  103. // windowLarge.WindowState = WindowState.Maximized;
  104. // windowLarge.ResizeMode = ResizeMode.NoResize;
  105. // windowLarge.WindowStyle = WindowStyle.None;
  106. // windowLarge.WindowState = WindowState.Normal;
  107. // windowLarge.ShowInTaskbar = false;
  108. // windowLarge.Topmost = true;
  109. // }
  110. // else if (i.ToString() == System.Configuration.ConfigurationManager.AppSettings["二号屏"].ToString())
  111. // {
  112. // windowLarge2.WindowStartupLocation = WindowStartupLocation.Manual;
  113. // windowLarge2.Left = scr.WorkingArea.Left;
  114. // windowLarge2.Top = scr.WorkingArea.Top;
  115. // windowLarge2.Width = scr.Bounds.Width;
  116. // windowLarge2.Height = scr.Bounds.Height;
  117. // windowLarge2.WindowState = WindowState.Maximized;
  118. // windowLarge2.ResizeMode = ResizeMode.NoResize;
  119. // windowLarge2.WindowStyle = WindowStyle.None;
  120. // windowLarge2.WindowState = WindowState.Normal;
  121. // windowLarge2.ShowInTaskbar = false;
  122. // windowLarge2.Topmost = true;
  123. // }
  124. // else if (i.ToString() == System.Configuration.ConfigurationManager.AppSettings["三号屏"].ToString())
  125. // {
  126. // windowLarge3.WindowStartupLocation = WindowStartupLocation.Manual;
  127. // windowLarge3.Left = scr.WorkingArea.Left;
  128. // windowLarge3.Top = scr.WorkingArea.Top;
  129. // windowLarge3.Width = scr.Bounds.Width;
  130. // windowLarge3.Height = scr.Bounds.Height;
  131. // windowLarge3.WindowState = WindowState.Maximized;
  132. // windowLarge3.ResizeMode = ResizeMode.NoResize;
  133. // windowLarge3.WindowStyle = WindowStyle.None;
  134. // windowLarge3.WindowState = WindowState.Normal;
  135. // windowLarge3.ShowInTaskbar = false;
  136. // windowLarge3.Topmost = true;
  137. // }
  138. // i++;
  139. //}
  140. #endregion
  141. windowLarge.Show();windowLarge2.Show(); windowLarge3.Show();
  142. Main.GetInstance.Start();
  143. break;
  144. case "BPASmartClient.MaxWokControl.App":
  145. windowLarge.Init(TitleName, new MaxWokMonitorControl()); windowLarge.Show();
  146. break;
  147. }
  148. #endregion
  149. window = windowLarge;
  150. }
  151. private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
  152. {
  153. }
  154. }
  155. }