From 07a75244fe05eb4b2b0b628ec8f038cced238579 Mon Sep 17 00:00:00 2001 From: Roy Date: Wed, 26 Apr 2023 16:23:07 +0300 Subject: Eureka UI Screen. --- .../PPC/Tango.PPC.UI/MainWindow.xaml.cs | 38 +++++++++++++++------- 1 file changed, 27 insertions(+), 11 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs index b7f6c40ae..1cfa60f92 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs @@ -21,6 +21,7 @@ using Tango.Core.DI; using Tango.PPC.Common.Application; using Tango.PPC.Common.Build; using Tango.PPC.UI.Build; +using Tango.PPC.UI.Helpers; using Tango.Touch.Helpers; namespace Tango.PPC.UI @@ -68,17 +69,32 @@ namespace Tango.PPC.UI var screens = System.Windows.Forms.Screen.AllScreens; var touch_screen = screens.Last(); - WindowStyle = WindowStyle.SingleBorderWindow; - ResizeMode = ResizeMode.CanResize; - Width = 1280; - Height = 720; - WindowStartupLocation = WindowStartupLocation.CenterScreen; - WindowState = WindowState.Normal; - Topmost = false; // sure? - //Left = touch_screen.Bounds.Left; - //Top = touch_screen.Bounds.Top; - //Width = touch_screen.Bounds.Width; - //Height = touch_screen.Bounds.Height; + + bool hasTouch = TouchHelper.IsTouchEnabled(); + + if (!hasTouch) + { + WindowStyle = WindowStyle.SingleBorderWindow; + ResizeMode = ResizeMode.CanResize; + Width = 1280; + Height = 720; + WindowStartupLocation = WindowStartupLocation.CenterScreen; + WindowState = WindowState.Normal; + Topmost = false; // sure? + } + else + { + WindowState = WindowState.Normal; + WindowStyle = WindowStyle.None; + ResizeMode = ResizeMode.NoResize; + Left = screens.Length == 2 ? screens[0].Bounds.Width : 0; + Top = 0; + Width = 1920; + Height = 1080; + WindowStartupLocation = WindowStartupLocation.Manual; + Topmost = false; // sure? + } + //App.Current.Resources["TangoPanelMaskColor"] = App.Current.Resources["TangoPanelMaskColorLight"]; } -- cgit v1.3.1