diff --git a/src/Live/Sucrose.Live.Aurora/App.xaml.cs b/src/Live/Sucrose.Live.Aurora/App.xaml.cs index 14b67c99b..8e485ad3e 100644 --- a/src/Live/Sucrose.Live.Aurora/App.xaml.cs +++ b/src/Live/Sucrose.Live.Aurora/App.xaml.cs @@ -155,10 +155,12 @@ protected void Configure() SSEHC.Start(); + SSEMI.Host = $"{Path.Combine(SSEMI.LibraryLocation, SSEMI.LibrarySelected)}/"; + switch (SSEMI.Info.Type) { case SSDEWT.Application: - SSEAVA Application = new(Source, SSEMI.Info.Arguments); + SSEAVA Application = new(); Application.Show(); break; default: diff --git a/src/Live/Sucrose.Live.MpvPlayer/App.xaml.cs b/src/Live/Sucrose.Live.MpvPlayer/App.xaml.cs index a34e2696e..543e4c3d5 100644 --- a/src/Live/Sucrose.Live.MpvPlayer/App.xaml.cs +++ b/src/Live/Sucrose.Live.MpvPlayer/App.xaml.cs @@ -153,14 +153,16 @@ protected void Configure() SSEHC.Start(); + SSEMI.Host = $"{Path.Combine(SSEMI.LibraryLocation, SSEMI.LibrarySelected)}/"; + switch (SSEMI.Info.Type) { case SSDEWT.Gif: - SSEMPVG Gif = new(Source); + SSEMPVG Gif = new(); Gif.Show(); break; case SSDEWT.Video: - SSEMPVV Video = new(Source); + SSEMPVV Video = new(); Video.Show(); break; default: diff --git a/src/Live/Sucrose.Live.Nebula/App.xaml.cs b/src/Live/Sucrose.Live.Nebula/App.xaml.cs index 6bac6b8ca..39cf63578 100644 --- a/src/Live/Sucrose.Live.Nebula/App.xaml.cs +++ b/src/Live/Sucrose.Live.Nebula/App.xaml.cs @@ -152,10 +152,12 @@ protected void Configure() SSEHC.Start(); + SSEMI.Host = $"{Path.Combine(SSEMI.LibraryLocation, SSEMI.LibrarySelected)}/"; + switch (SSEMI.Info.Type) { case SSDEWT.Video: - SSENVV Video = new(Source); + SSENVV Video = new(); Video.Show(); break; default: diff --git a/src/Live/Sucrose.Live.Vexana/App.xaml.cs b/src/Live/Sucrose.Live.Vexana/App.xaml.cs index 256e8132d..73c74309c 100644 --- a/src/Live/Sucrose.Live.Vexana/App.xaml.cs +++ b/src/Live/Sucrose.Live.Vexana/App.xaml.cs @@ -152,10 +152,12 @@ protected void Configure() SSEHC.Start(); + SSEMI.Host = $"{Path.Combine(SSEMI.LibraryLocation, SSEMI.LibrarySelected)}/"; + switch (SSEMI.Info.Type) { case SSDEWT.Gif: - SSEVVG Gif = new(Source); + SSEVVG Gif = new(); Gif.Show(); break; default: diff --git a/src/Live/Sucrose.Live.Xavier/App.xaml.cs b/src/Live/Sucrose.Live.Xavier/App.xaml.cs index 070057851..ddbab12b6 100644 --- a/src/Live/Sucrose.Live.Xavier/App.xaml.cs +++ b/src/Live/Sucrose.Live.Xavier/App.xaml.cs @@ -152,10 +152,12 @@ protected void Configure() SSEHC.Start(); + SSEMI.Host = $"{Path.Combine(SSEMI.LibraryLocation, SSEMI.LibrarySelected)}/"; + switch (SSEMI.Info.Type) { case SSDEWT.Gif: - SSEXVG Gif = new(Source); + SSEXVG Gif = new(); Gif.Show(); break; default: diff --git a/src/Shared/Engine/Sucrose.Shared.Engine.Aurora/Manage/Internal.cs b/src/Shared/Engine/Sucrose.Shared.Engine.Aurora/Manage/Internal.cs index 69f0588dc..50dc9a851 100644 --- a/src/Shared/Engine/Sucrose.Shared.Engine.Aurora/Manage/Internal.cs +++ b/src/Shared/Engine/Sucrose.Shared.Engine.Aurora/Manage/Internal.cs @@ -5,7 +5,5 @@ internal static class Internal public static string Application = string.Empty; public static string ApplicationName = string.Empty; - - public static string ApplicationArguments = string.Empty; } } \ No newline at end of file diff --git a/src/Shared/Engine/Sucrose.Shared.Engine.Aurora/View/Application.xaml.cs b/src/Shared/Engine/Sucrose.Shared.Engine.Aurora/View/Application.xaml.cs index f5de49e0d..be51cc734 100644 --- a/src/Shared/Engine/Sucrose.Shared.Engine.Aurora/View/Application.xaml.cs +++ b/src/Shared/Engine/Sucrose.Shared.Engine.Aurora/View/Application.xaml.cs @@ -1,6 +1,5 @@ using Microsoft.Win32; using System.Diagnostics; -using System.IO; using System.Windows; using SMMCA = Sucrose.Memory.Manage.Constant.Aurora; using SMMI = Sucrose.Manager.Manage.Internal; @@ -11,6 +10,7 @@ using SSEEH = Sucrose.Shared.Engine.Event.Handler; using SSEHD = Sucrose.Shared.Engine.Helper.Data; using SSEHR = Sucrose.Shared.Engine.Helper.Run; +using SSEHS = Sucrose.Shared.Engine.Helper.Source; using SSEHV = Sucrose.Shared.Engine.Helper.Volume; using SSEMI = Sucrose.Shared.Engine.Manage.Internal; using SSSHP = Sucrose.Shared.Space.Helper.Processor; @@ -24,13 +24,13 @@ namespace Sucrose.Shared.Engine.Aurora.View /// public sealed partial class Application : Window, IDisposable { - public Application(string Application, string Arguments) + public Application() { InitializeComponent(); - SSEAMI.Application = Application; - SSEAMI.ApplicationArguments = Arguments; - SSEAMI.ApplicationName = Path.GetFileName(Application); + SSEAMI.ApplicationName = SSEMI.Info.Source; + SSEAMI.Application = SSEHS.GetSource(SSEMI.Info.Source, SSEMI.Host).ToString(); + SMMI.AuroraSettingManager.SetSetting(SMMCA.AppProcessName, SSEAMI.ApplicationName); SourceInitialized += (s, e) => @@ -50,7 +50,7 @@ public Application(string Application, string Arguments) for (int Count = 0; Count < ScreenCount; Count++) { - SSEMI.Applications.Add(SSSHP.Run(SSEAMI.Application, SSEAMI.ApplicationArguments, ProcessWindowStyle.Normal)); + SSEMI.Applications.Add(SSSHP.Run(SSEAMI.Application, SSEMI.Info.Arguments, ProcessWindowStyle.Normal)); } do diff --git a/src/Shared/Engine/Sucrose.Shared.Engine.MpvPlayer/View/Gif.xaml.cs b/src/Shared/Engine/Sucrose.Shared.Engine.MpvPlayer/View/Gif.xaml.cs index 033be4273..d8c2c56dc 100644 --- a/src/Shared/Engine/Sucrose.Shared.Engine.MpvPlayer/View/Gif.xaml.cs +++ b/src/Shared/Engine/Sucrose.Shared.Engine.MpvPlayer/View/Gif.xaml.cs @@ -17,13 +17,13 @@ namespace Sucrose.Shared.Engine.MpvPlayer.View /// public sealed partial class Gif : Window, IDisposable { - public Gif(string Gif) + public Gif() { InitializeComponent(); SystemEvents.DisplaySettingsChanged += (s, e) => SSEEH.DisplaySettingsChanged(this); - SSEMPMI.Source = SSEHS.GetSource(Gif).ToString(); + SSEMPMI.Source = SSEHS.GetSource(SSEMI.Info.Source, SSEMI.Host).ToString(); ContentRendered += (s, e) => SSEEH.ContentRendered(this); diff --git a/src/Shared/Engine/Sucrose.Shared.Engine.MpvPlayer/View/Video.xaml.cs b/src/Shared/Engine/Sucrose.Shared.Engine.MpvPlayer/View/Video.xaml.cs index 8c79e6ed7..c8fa12fcb 100644 --- a/src/Shared/Engine/Sucrose.Shared.Engine.MpvPlayer/View/Video.xaml.cs +++ b/src/Shared/Engine/Sucrose.Shared.Engine.MpvPlayer/View/Video.xaml.cs @@ -18,13 +18,13 @@ namespace Sucrose.Shared.Engine.MpvPlayer.View /// public sealed partial class Video : Window, IDisposable { - public Video(string Video) + public Video() { InitializeComponent(); SystemEvents.DisplaySettingsChanged += (s, e) => SSEEH.DisplaySettingsChanged(this); - SSEMPMI.Source = SSEHS.GetSource(Video).ToString(); + SSEMPMI.Source = SSEHS.GetSource(SSEMI.Info.Source, SSEMI.Host).ToString(); ContentRendered += (s, e) => SSEEH.ContentRendered(this); diff --git a/src/Shared/Engine/Sucrose.Shared.Engine.Nebula/View/Video.xaml.cs b/src/Shared/Engine/Sucrose.Shared.Engine.Nebula/View/Video.xaml.cs index ef11afd26..d7c64419d 100644 --- a/src/Shared/Engine/Sucrose.Shared.Engine.Nebula/View/Video.xaml.cs +++ b/src/Shared/Engine/Sucrose.Shared.Engine.Nebula/View/Video.xaml.cs @@ -19,7 +19,7 @@ namespace Sucrose.Shared.Engine.Nebula.View /// public sealed partial class Video : Window, IDisposable { - public Video(string Video) + public Video() { InitializeComponent(); @@ -29,7 +29,7 @@ public Video(string Video) Content = SSENMI.MediaEngine; - SSENMI.MediaEngine.Source = SSEHS.GetSource(Video); + SSENMI.MediaEngine.Source = SSEHS.GetSource(SSEMI.Info.Source, SSEMI.Host); SSEMI.GeneralTimer.Tick += new EventHandler(GeneralTimer_Tick); SSEMI.GeneralTimer.Interval = new TimeSpan(0, 0, 1); diff --git a/src/Shared/Engine/Sucrose.Shared.Engine.Vexana/View/Gif.xaml.cs b/src/Shared/Engine/Sucrose.Shared.Engine.Vexana/View/Gif.xaml.cs index e415e32cb..5a1018aa5 100644 --- a/src/Shared/Engine/Sucrose.Shared.Engine.Vexana/View/Gif.xaml.cs +++ b/src/Shared/Engine/Sucrose.Shared.Engine.Vexana/View/Gif.xaml.cs @@ -19,7 +19,7 @@ namespace Sucrose.Shared.Engine.Vexana.View /// public sealed partial class Gif : Window, IDisposable { - public Gif(string Gif) + public Gif() { InitializeComponent(); @@ -29,7 +29,7 @@ public Gif(string Gif) Content = SSEVMI.ImageEngine; - SSEVMI.ImageResult = SSEVHP.Gif(SSEHS.GetSource(Gif).ToString()); + SSEVMI.ImageResult = SSEVHP.Gif(SSEHS.GetSource(SSEMI.Info.Source, SSEMI.Host).ToString()); SSEMI.GeneralTimer.Tick += new EventHandler(GeneralTimer_Tick); SSEMI.GeneralTimer.Interval = new TimeSpan(0, 0, 1); diff --git a/src/Shared/Engine/Sucrose.Shared.Engine.Xavier/View/Gif.xaml.cs b/src/Shared/Engine/Sucrose.Shared.Engine.Xavier/View/Gif.xaml.cs index 3cb80569c..dc31b2cb6 100644 --- a/src/Shared/Engine/Sucrose.Shared.Engine.Xavier/View/Gif.xaml.cs +++ b/src/Shared/Engine/Sucrose.Shared.Engine.Xavier/View/Gif.xaml.cs @@ -19,7 +19,7 @@ namespace Sucrose.Shared.Engine.Xavier.View /// public sealed partial class Gif : Window, IDisposable { - public Gif(string Gif) + public Gif() { InitializeComponent(); @@ -29,8 +29,8 @@ public Gif(string Gif) Content = SSEXMI.ImageEngine; + SXAGAB.SetSourceUri(SSEXMI.ImageEngine, SSEHS.GetSource(SSEMI.Info.Source, SSEMI.Host)); SXAGAB.SetRepeatBehavior(SSEXMI.ImageEngine, RepeatBehavior.Forever); - SXAGAB.SetSourceUri(SSEXMI.ImageEngine, SSEHS.GetSource(Gif)); SXAGAB.SetCacheFramesInMemory(SSEXMI.ImageEngine, false); SXAGAB.SetAnimateInDesignMode(SSEXMI.ImageEngine, false); SXAGAB.SetAutoStart(SSEXMI.ImageEngine, true);