终端一体化运控平台
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.
 
 
 

71 lines
2.6 KiB

  1. using BPA.CustomResource.UserControls;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows;
  8. using System.Windows.Controls;
  9. using System.Windows.Data;
  10. using System.Windows.Documents;
  11. using System.Windows.Input;
  12. using System.Windows.Media;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Navigation;
  15. using System.Windows.Shapes;
  16. namespace BPASmartClient.ScreenLib
  17. {
  18. /// <summary>
  19. /// ScreenSplitMealsControl1.xaml 的交互逻辑
  20. /// </summary>
  21. public partial class ScreenSplitMealsControl1 : UserControl
  22. {
  23. public ScreenSplitMealsControl1()
  24. {
  25. InitializeComponent();
  26. this.DataContext = new ScreenSplitMealsControl1ViewModel();
  27. }
  28. public void Start(string name)
  29. {
  30. WindowShow windowLarge2 = new WindowShow();
  31. windowLarge2.Init("二号" + name, new ScreenSplitMealsControl2());
  32. WindowShow windowLarge3 = new WindowShow();
  33. windowLarge3.Init("三号"+ name, new ScreenSplitMealsControl3());
  34. int i = 0;
  35. foreach (System.Windows.Forms.Screen scr in System.Windows.Forms.Screen.AllScreens)
  36. {
  37. if (!scr.Primary)
  38. {
  39. if (i == 1)
  40. {
  41. windowLarge2.WindowStartupLocation = WindowStartupLocation.Manual;
  42. windowLarge2.Left = scr.WorkingArea.Left;
  43. windowLarge2.Top = scr.WorkingArea.Top;
  44. windowLarge2.Width = scr.Bounds.Width;
  45. windowLarge2.Height = scr.Bounds.Height;
  46. windowLarge2.WindowState = WindowState.Maximized;
  47. windowLarge2.ResizeMode = ResizeMode.NoResize;
  48. windowLarge2.WindowStyle = WindowStyle.None;
  49. windowLarge2.WindowState = WindowState.Normal;
  50. windowLarge2.ShowInTaskbar = false;
  51. }
  52. else if (i == 2)
  53. {
  54. windowLarge3.WindowStartupLocation = WindowStartupLocation.Manual;
  55. windowLarge3.Left = scr.WorkingArea.Left;
  56. windowLarge3.Top = scr.WorkingArea.Top;
  57. windowLarge3.Width = scr.Bounds.Width;
  58. windowLarge3.Height = scr.Bounds.Height;
  59. }
  60. i++;
  61. }
  62. }
  63. windowLarge2.Show(); windowLarge3.Show();
  64. }
  65. }
  66. }