diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-06-27 10:24:17 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-06-27 10:24:17 +0300 |
| commit | b4b30b3f031d04ddc89b5b7bc27d4b886b815593 (patch) | |
| tree | 9ec8eb2121035c1cd5c152e9c41832357aa92b2d /Software/Visual_Studio/PPC/Tango.PPC.UI | |
| parent | ab3c5e1324e60c32486e29947e01343fd7c3ea09 (diff) | |
| download | Tango-b4b30b3f031d04ddc89b5b7bc27d4b886b815593.tar.gz Tango-b4b30b3f031d04ddc89b5b7bc27d4b886b815593.zip | |
Fixed several issues with touch.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs | 16 |
1 files changed, 15 insertions, 1 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 ecb37654d..ca26b7761 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs @@ -36,7 +36,21 @@ namespace Tango.PPC.UI { WindowStyle = WindowStyle.None; ResizeMode = ResizeMode.NoResize; - WindowState = WindowState.Maximized; + 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(); + + if (touch_screen != null) + { + Left = touch_screen.Bounds.Left; + Top = touch_screen.Bounds.Top; + Width = touch_screen.Bounds.Width; + Height = touch_screen.Bounds.Height; + } } } } |
