|
- 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();
- }
- }
- }
|