diff --git a/BPASmartClient.ScreenALL/App.config b/BPASmartClient.ScreenALL/App.config index 217f21bd..c3b080f6 100644 --- a/BPASmartClient.ScreenALL/App.config +++ b/BPASmartClient.ScreenALL/App.config @@ -2,7 +2,7 @@ - + diff --git a/BPASmartClient.ScreenLib/AppMain.cs b/BPASmartClient.ScreenLib/AppMain.cs index 51710b03..6f69db8d 100644 --- a/BPASmartClient.ScreenLib/AppMain.cs +++ b/BPASmartClient.ScreenLib/AppMain.cs @@ -7,6 +7,7 @@ using System.Threading.Tasks; using System.Windows; using System.Windows.Forms; + namespace BPASmartClient.ScreenLib { public partial class AppMain @@ -44,17 +45,15 @@ namespace BPASmartClient.ScreenLib windowLarge2.Init("二号" + TitleName, new ScreenSplitMealsControl2()); WindowLargeScreen windowLarge3 = new WindowLargeScreen(); windowLarge3.Init("三号" + TitleName, new ScreenSplitMealsControl3()); - - int i = 0; - foreach (System.Windows.Forms.Screen scr in System.Windows.Forms.Screen.AllScreens) + for (int i = 0; i < 3; i++) { - if (i.ToString() == System.Configuration.ConfigurationManager.AppSettings["一号屏"].ToString()) + if (i==0) { windowLarge.WindowStartupLocation = WindowStartupLocation.Manual; - windowLarge.Left = scr.WorkingArea.Left; - windowLarge.Top = scr.WorkingArea.Top; - windowLarge.Width = scr.Bounds.Width; - windowLarge.Height = scr.Bounds.Height; + windowLarge.Left = i * 1920; + windowLarge.Top = 0; + windowLarge.Height = 1080; + windowLarge.Width = 1920; windowLarge.WindowState = WindowState.Maximized; windowLarge.ResizeMode = ResizeMode.NoResize; windowLarge.WindowStyle = WindowStyle.None; @@ -62,13 +61,13 @@ namespace BPASmartClient.ScreenLib windowLarge.ShowInTaskbar = false; windowLarge.Topmost = true; } - else if (i.ToString() == System.Configuration.ConfigurationManager.AppSettings["二号屏"].ToString()) + else 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.Left = i * 1920; + windowLarge2.Top = 0; + windowLarge2.Height = 1080; + windowLarge2.Width = 1920; windowLarge2.WindowState = WindowState.Maximized; windowLarge2.ResizeMode = ResizeMode.NoResize; windowLarge2.WindowStyle = WindowStyle.None; @@ -76,13 +75,13 @@ namespace BPASmartClient.ScreenLib windowLarge2.ShowInTaskbar = false; windowLarge2.Topmost = true; } - else if (i.ToString() == System.Configuration.ConfigurationManager.AppSettings["三号屏"].ToString()) + 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; + windowLarge3.Left = i * 1920; + windowLarge3.Top = 0; + windowLarge3.Height = 1080; + windowLarge3.Width = 1920; windowLarge3.WindowState = WindowState.Maximized; windowLarge3.ResizeMode = ResizeMode.NoResize; windowLarge3.WindowStyle = WindowStyle.None; @@ -91,8 +90,56 @@ namespace BPASmartClient.ScreenLib windowLarge3.Topmost = true; } - i++; } + #region 不需要代码 + //foreach (System.Windows.Forms.Screen scr in System.Windows.Forms.Screen.AllScreens) + //{ + // if (i.ToString() == System.Configuration.ConfigurationManager.AppSettings["一号屏"].ToString()) + // { + // windowLarge.WindowStartupLocation = WindowStartupLocation.Manual; + // windowLarge.Left = scr.WorkingArea.Left; + // windowLarge.Top = scr.WorkingArea.Top; + // windowLarge.Width = scr.Bounds.Width; + // windowLarge.Height = scr.Bounds.Height; + // windowLarge.WindowState = WindowState.Maximized; + // windowLarge.ResizeMode = ResizeMode.NoResize; + // windowLarge.WindowStyle = WindowStyle.None; + // windowLarge.WindowState = WindowState.Normal; + // windowLarge.ShowInTaskbar = false; + // windowLarge.Topmost = true; + // } + // else if (i.ToString() == System.Configuration.ConfigurationManager.AppSettings["二号屏"].ToString()) + // { + // 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; + // windowLarge2.Topmost = true; + // } + // else if (i.ToString() == System.Configuration.ConfigurationManager.AppSettings["三号屏"].ToString()) + // { + // windowLarge3.WindowStartupLocation = WindowStartupLocation.Manual; + // windowLarge3.Left = scr.WorkingArea.Left; + // windowLarge3.Top = scr.WorkingArea.Top; + // windowLarge3.Width = scr.Bounds.Width; + // windowLarge3.Height = scr.Bounds.Height; + // windowLarge3.WindowState = WindowState.Maximized; + // windowLarge3.ResizeMode = ResizeMode.NoResize; + // windowLarge3.WindowStyle = WindowStyle.None; + // windowLarge3.WindowState = WindowState.Normal; + // windowLarge3.ShowInTaskbar = false; + // windowLarge3.Topmost = true; + + // } + // i++; + //} + #endregion windowLarge.Show(); windowLarge2.Show(); windowLarge3.Show(); break; } diff --git a/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl1.xaml b/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl1.xaml index ef44de59..5340572e 100644 --- a/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl1.xaml +++ b/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl1.xaml @@ -23,7 +23,7 @@ - + @@ -33,7 +33,7 @@ - +