From 07a4bd1d931dea551ef44817d91ee948f96e9a8e Mon Sep 17 00:00:00 2001 From: fyf Date: Mon, 5 Dec 2022 12:29:14 +0800 Subject: [PATCH 1/3] 1 --- BPASmartClient.ScreenALL/App.config | 2 +- BPASmartClient.ScreenMaxWok/App.config | 4 ++-- BPASmartClient.ScreenMinWok/App.config | 4 ++-- BPASmartClient.ScreenMorks/App.config | 4 ++-- BPASmartClient.ScreenSplitMeals/App.config | 8 ++++---- WpfTest/MainWindow.xaml.cs | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) 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.ScreenMaxWok/App.config b/BPASmartClient.ScreenMaxWok/App.config index 217f21bd..5dc40a52 100644 --- a/BPASmartClient.ScreenMaxWok/App.config +++ b/BPASmartClient.ScreenMaxWok/App.config @@ -2,9 +2,9 @@ - + - + diff --git a/BPASmartClient.ScreenMinWok/App.config b/BPASmartClient.ScreenMinWok/App.config index effd5401..9c5519bf 100644 --- a/BPASmartClient.ScreenMinWok/App.config +++ b/BPASmartClient.ScreenMinWok/App.config @@ -3,9 +3,9 @@ - + - + diff --git a/BPASmartClient.ScreenMorks/App.config b/BPASmartClient.ScreenMorks/App.config index 217f21bd..ad297a84 100644 --- a/BPASmartClient.ScreenMorks/App.config +++ b/BPASmartClient.ScreenMorks/App.config @@ -2,9 +2,9 @@ - + - + diff --git a/BPASmartClient.ScreenSplitMeals/App.config b/BPASmartClient.ScreenSplitMeals/App.config index 6a091a57..87aa80b6 100644 --- a/BPASmartClient.ScreenSplitMeals/App.config +++ b/BPASmartClient.ScreenSplitMeals/App.config @@ -2,15 +2,15 @@ - + - + - - + + \ No newline at end of file diff --git a/WpfTest/MainWindow.xaml.cs b/WpfTest/MainWindow.xaml.cs index e436d4a4..f14383d8 100644 --- a/WpfTest/MainWindow.xaml.cs +++ b/WpfTest/MainWindow.xaml.cs @@ -29,7 +29,7 @@ namespace WpfTest /// /// MQTT连接信息 /// - public string MQTTConnection { get; set; } = "10.2.1.254,1883,admin,public"; + public string MQTTConnection { get; set; } = "171.221.208.23,11883,admin,public1"; /// /// Mqtt是否运行 From a642cada613de8d30ae1026b524159415a5c8bbf Mon Sep 17 00:00:00 2001 From: fyf Date: Mon, 5 Dec 2022 12:32:01 +0800 Subject: [PATCH 2/3] 1 --- .../分餐机/ScreenSplitMealsControl3.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3.xaml b/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3.xaml index 14cd17f9..774e8404 100644 --- a/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3.xaml +++ b/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3.xaml @@ -23,7 +23,7 @@ - + From 11ebf43b59a79d8853b3993cbbfcc35b2b5260bb Mon Sep 17 00:00:00 2001 From: fyf Date: Mon, 5 Dec 2022 12:53:32 +0800 Subject: [PATCH 3/3] 1 --- BPASmartClient.ScreenLib/AppMain.cs | 85 ++++++++++++++----- .../分餐机/ScreenSplitMealsControl1.xaml | 24 +++--- .../分餐机/ScreenSplitMealsControl2.xaml | 24 +++--- .../分餐机/ScreenSplitMealsControl3.xaml | 24 +++--- .../ScreenSplitMealsControl3.xaml.cs | 1 + BPASmartClient.ScreenSplitMeals/App.config | 8 +- 6 files changed, 107 insertions(+), 59 deletions(-) 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 @@ - +