aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs11
1 files changed, 5 insertions, 6 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 4c844657d..219c25f45 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs
@@ -35,18 +35,17 @@ namespace Tango.PPC.UI
#if !DESKTOP
if (TouchHelper.IsTouchEnabled())
{
- WindowStyle = WindowStyle.None;
- ResizeMode = ResizeMode.NoResize;
- WindowStartupLocation = WindowStartupLocation.Manual;
- Topmost = true; // sure?
-
var screens = System.Windows.Forms.Screen.AllScreens;
//Search for the vertical touch monitor.
- var touch_screen = screens.Where(x => x.Bounds.Height > x.Bounds.Width).Last();
+ var touch_screen = screens.Where(x => x.Bounds.Height > x.Bounds.Width).LastOrDefault();
if (touch_screen != null)
{
+ WindowStyle = WindowStyle.None;
+ ResizeMode = ResizeMode.NoResize;
+ WindowStartupLocation = WindowStartupLocation.Manual;
+ Topmost = true; // sure?
Left = touch_screen.Bounds.Left;
Top = touch_screen.Bounds.Top;
Width = touch_screen.Bounds.Width;