diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2020-01-12 15:56:50 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2020-01-12 15:56:50 +0200 |
| commit | 9949e351e152a929da696ef2f0a1f8b1668e83fa (patch) | |
| tree | 40212bc488ea64cbaf137455c6a2280333c997dc /Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs | |
| parent | 9016d57f876a70952dda4419d68b568b586ef0ec (diff) | |
| download | Tango-9949e351e152a929da696ef2f0a1f8b1668e83fa.tar.gz Tango-9949e351e152a929da696ef2f0a1f8b1668e83fa.zip | |
Merged Beta+ fixes to master.
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 | 20 |
1 files changed, 19 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 b90a1afff..dec58f336 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs @@ -61,6 +61,12 @@ namespace Tango.PPC.UI has_touch = true; } } + +#if !DEBUG + ForceTouch(); + has_touch = true; +#endif + #endif if (!has_touch) @@ -72,7 +78,7 @@ namespace Tango.PPC.UI gridMain.Height = 1280; viewBox.Child = gridMain; LockAspectRatio(); - this.SizeChanged += (x, y) => + this.SizeChanged += (x, y) => { LockAspectRatio(); }; @@ -81,6 +87,18 @@ namespace Tango.PPC.UI Closing += MainWindow_Closing; } + private void ForceTouch() + { + WindowStyle = WindowStyle.None; + ResizeMode = ResizeMode.NoResize; + WindowStartupLocation = WindowStartupLocation.Manual; + Topmost = false; // sure? + Left = 0; + Top = 0; + Width = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width; + Height = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height; + } + protected override void OnSourceInitialized(EventArgs e) { //var hwndSource = PresentationSource.FromVisual(this) as HwndSource; |
