aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs
diff options
context:
space:
mode:
authorRoy <Roy.mail.net@gmail.com>2023-02-26 14:09:42 +0200
committerRoy <Roy.mail.net@gmail.com>2023-02-26 14:09:42 +0200
commitc256fc124a867707c787074c9076227341766794 (patch)
treeb3105881412a06219a6f0e0d9af7dd0e662bf4e8 /Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs
parent795f3ab6ea36551281ec6442aa16b9547af96adc (diff)
downloadTango-c256fc124a867707c787074c9076227341766794.tar.gz
Tango-c256fc124a867707c787074c9076227341766794.zip
eureka_ppc
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.cs46
1 files changed, 44 insertions, 2 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 bf621ff2e..53d0d7e91 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs
@@ -19,6 +19,8 @@ using System.Windows.Navigation;
using System.Windows.Shapes;
using Tango.Core.DI;
using Tango.PPC.Common.Application;
+using Tango.PPC.Common.Build;
+using Tango.PPC.UI.Build;
using Tango.Touch.Helpers;
namespace Tango.PPC.UI
@@ -28,16 +30,58 @@ namespace Tango.PPC.UI
/// </summary>
public partial class MainWindow : Window
{
+ private DefaultBuildProvider _buildProvider;
public static MainWindow Instance { get; private set; }
public MainWindow()
{
Instance = this;
+ TangoIOC.Default.Unregister<IBuildProvider>();
+
+ _buildProvider = new DefaultBuildProvider();
+ TangoIOC.Default.Register<IBuildProvider, DefaultBuildProvider>(_buildProvider);
+
//Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline),new FrameworkPropertyMetadata { DefaultValue = 30 });
InitializeComponent();
+ if (_buildProvider.BuildType == BuildType.Eureka)
+ {
+ InitEureka();
+ }
+ else
+ {
+ InitTS1800();
+ }
+
+ Closing += MainWindow_Closing;
+ }
+
+ private void InitEureka()
+ {
+ this.Content = new Views.MainEurekaView();
+
+ var screens = System.Windows.Forms.Screen.AllScreens;
+ var touch_screen = screens.Last();
+
+ WindowStyle = WindowStyle.None;
+ ResizeMode = ResizeMode.NoResize;
+ Width = 1280;
+ Height = 720;
+ WindowStartupLocation = WindowStartupLocation.CenterScreen;
+ WindowState = WindowState.Maximized;
+ Topmost = false; // sure?
+ //Left = touch_screen.Bounds.Left;
+ //Top = touch_screen.Bounds.Top;
+ //Width = touch_screen.Bounds.Width;
+ //Height = touch_screen.Bounds.Height;
+ }
+
+ private void InitTS1800()
+ {
+ this.Content = new Views.MainView();
+
bool has_touch = false;
#if !DESKTOP
@@ -83,8 +127,6 @@ namespace Tango.PPC.UI
LockAspectRatio();
};
}
-
- Closing += MainWindow_Closing;
}
private void ForceTouch()