From af4e99d71390d050e321e4de3530b2774f84ba0c Mon Sep 17 00:00:00 2001 From: Roy Date: Tue, 9 May 2023 16:10:17 +0300 Subject: Added loading video on Eureka. --- .../PPC/Tango.PPC.UI/Views/LoadingView.xaml | 43 +++------------------- .../PPC/Tango.PPC.UI/Views/LoadingView.xaml.cs | 16 ++++++++ 2 files changed, 22 insertions(+), 37 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Views') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml index 146d4b50d..3ed91e5db 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml @@ -9,47 +9,16 @@ xmlns:global="clr-namespace:Tango.PPC.UI" xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" xmlns:local="clr-namespace:Tango.PPC.UI.Views" + xmlns:mediaKit="clr-namespace:WPFMediaKit.DirectShow.Controls;assembly=WPFMediaKit" mc:Ignorable="d" d:DesignHeight="1280" d:DesignWidth="800" Background="{StaticResource TangoPrimaryBackgroundBrush}" d:DataContext="{d:DesignInstance Type=vm:LoadingViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.LoadingView}"> - - - + + + + + - diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml.cs index a1214a0df..4616ea438 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml.cs @@ -12,6 +12,9 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; +using Tango.Core.DI; +using Tango.PPC.Common.Application; +using Tango.PPC.Common.Build; namespace Tango.PPC.UI.Views { @@ -20,9 +23,22 @@ namespace Tango.PPC.UI.Views /// public partial class LoadingView : UserControl { + public static DateTime VideoStartTime { get; set; } + public LoadingView() { InitializeComponent(); + + var buildProvider = TangoIOC.Default.GetInstance(); + var appManager = TangoIOC.Default.GetInstance(); + + if (buildProvider.IsEureka) + { + VideoStartTime = DateTime.Now; + videoPlayer.Source = new Uri(appManager.StartPath + "\\Intro.wmv", UriKind.Absolute); + videoPlayer.MediaOpened += (_, __) => VideoStartTime = DateTime.Now; + videoPlayer.Play(); + } } } } -- cgit v1.3.1