diff options
| author | Roy <Roy.mail.net@gmail.com> | 2023-04-26 16:23:07 +0300 |
|---|---|---|
| committer | Roy <Roy.mail.net@gmail.com> | 2023-04-26 16:23:07 +0300 |
| commit | 07a75244fe05eb4b2b0b628ec8f038cced238579 (patch) | |
| tree | 77c9d16c2632e2f0f36a533cf6e0bff2ffac0de9 /Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs | |
| parent | f86efbca4aac00a1a4e6d290feca1a0236c2d828 (diff) | |
| download | Tango-07a75244fe05eb4b2b0b628ec8f038cced238579.tar.gz Tango-07a75244fe05eb4b2b0b628ec8f038cced238579.zip | |
Eureka UI Screen.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs | 38 |
1 files changed, 27 insertions, 11 deletions
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"]; } |
