Skip to content

Commit

Permalink
Aurora: Duplicate Same Wallpaper Supported
Browse files Browse the repository at this point in the history
#81 The 'Duplicate Same Wallpaper' display preference of themes of 'Application' type is now supported for the 'Aurora' engine.
  • Loading branch information
Taiizor committed Apr 4, 2024
1 parent 2492358 commit a2996bf
Show file tree
Hide file tree
Showing 39 changed files with 233 additions and 110 deletions.
4 changes: 2 additions & 2 deletions src/Launcher/Sucrose.Launcher/Sucrose.Launcher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Skylark.Wing" Version="3.1.3.8" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.8" />
<PackageReference Include="Skylark.Wing" Version="3.1.4.1" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.9" />
<PackageReference Include="DiscordRichPresence" Version="1.2.1.24" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Library/Sucrose.Manager/Sucrose.Manager.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Skylark" Version="3.1.3.5" />
<PackageReference Include="Skylark" Version="3.1.3.7" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/Library/Sucrose.Resources/Sucrose.Resources.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Skylark" Version="3.1.3.5" />
<PackageReference Include="Skylark" Version="3.1.3.7" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Live/Sucrose.Live.Aurora/Sucrose.Live.Aurora.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Skylark.Wing" Version="3.1.3.8" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.8" />
<PackageReference Include="Skylark.Wing" Version="3.1.4.1" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.9" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net48'))">
Expand Down
4 changes: 2 additions & 2 deletions src/Live/Sucrose.Live.CefSharp/Sucrose.Live.CefSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Skylark.Wing" Version="3.1.3.8" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.8" />
<PackageReference Include="Skylark.Wing" Version="3.1.4.1" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.9" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net48'))">
Expand Down
4 changes: 2 additions & 2 deletions src/Live/Sucrose.Live.MpvPlayer/Sucrose.Live.MpvPlayer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Skylark.Wing" Version="3.1.3.8" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.8" />
<PackageReference Include="Skylark.Wing" Version="3.1.4.1" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.9" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Live/Sucrose.Live.Nebula/Sucrose.Live.Nebula.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Skylark.Wing" Version="3.1.3.8" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.8" />
<PackageReference Include="Skylark.Wing" Version="3.1.4.1" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.9" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net48'))">
Expand Down
4 changes: 2 additions & 2 deletions src/Live/Sucrose.Live.Vexana/Sucrose.Live.Vexana.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Skylark.Wing" Version="3.1.3.8" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.8" />
<PackageReference Include="Skylark.Wing" Version="3.1.4.1" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.9" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net48'))">
Expand Down
4 changes: 2 additions & 2 deletions src/Live/Sucrose.Live.WebView/Sucrose.Live.WebView.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Skylark.Wing" Version="3.1.3.8" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.8" />
<PackageReference Include="Skylark.Wing" Version="3.1.4.1" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.9" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2470-prerelease" />
</ItemGroup>

Expand Down
6 changes: 3 additions & 3 deletions src/Portal/Sucrose.Portal/Sucrose.Portal.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Skylark.Wing" Version="3.1.3.8" />
<PackageReference Include="Skylark.Wing" Version="3.1.4.1" />
<PackageReference Include="XamlFlair.WPF" Version="1.2.13" />
<PackageReference Include="XamlAnimatedGif" Version="2.2.3" />
<PackageReference Include="WPF-UI" Version="3.0.0-preview.7" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.8" />
<PackageReference Include="Skylark.Clipboard" Version="3.1.2.8" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.9" />
<PackageReference Include="Skylark.Clipboard" Version="3.1.2.9" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="WindowsAPICodePackShell" Version="8.0.2" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/Project/Sucrose.Backgroundog/Sucrose.Backgroundog.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@
<ItemGroup>
<PackageReference Include="NAudio" Version="2.2.1" />
<PackageReference Include="NPSMLib" Version="0.9.14" />
<PackageReference Include="Skylark.Wing" Version="3.1.3.8" />
<PackageReference Include="Skylark.Wing" Version="3.1.4.1" />
<PackageReference Include="MathNet.Numerics" Version="5.0.0" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.8" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.9" />
<PackageReference Include="LibreHardwareMonitorLib" Version="0.9.4-pre276" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions src/Project/Sucrose.Commandog/Sucrose.Commandog.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@

<ItemGroup>
<PackageReference Include="TaskScheduler" Version="2.10.1" />
<PackageReference Include="Skylark.Wing" Version="3.1.3.8" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.8" />
<PackageReference Include="Skylark.Wing" Version="3.1.4.1" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.9" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net48'))">
Expand Down
4 changes: 2 additions & 2 deletions src/Project/Sucrose.WPF.CS/Sucrose.WPF.CS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Skylark.Wing" Version="3.1.3.8" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.8" />
<PackageReference Include="Skylark.Wing" Version="3.1.4.1" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.9" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net48'))">
Expand Down
4 changes: 2 additions & 2 deletions src/Project/Sucrose.Watchdog/Sucrose.Watchdog.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Skylark.Wing" Version="3.1.3.8" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.8" />
<PackageReference Include="Skylark.Wing" Version="3.1.4.1" />
<PackageReference Include="Skylark.Standard" Version="3.1.4.9" />
</ItemGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net48'))">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using SSEAMI = Sucrose.Shared.Engine.Aurora.Manage.Internal;
using SSDSHS = Sucrose.Shared.Dependency.Struct.HandleStruct;
using SSEMI = Sucrose.Shared.Engine.Manage.Internal;
using SWEACAM = Skylark.Wing.Extension.AudioController.AudioManager;
using SWEVPCAM = Skylark.Wing.Extension.VideoPlayerController.AudioManager;

Expand All @@ -10,11 +11,37 @@ public static void SetVolume(int Volume)
{
try
{
SWEVPCAM.SetApplicationVolume(SSEAMI.ApplicationProcess.Id, Volume);
if (SSEMI.Applications.Any())
{
SWEVPCAM.SetApplicationVolume(SSEMI.Applications.FirstOrDefault().Process.Id, Volume);

if (SSEMI.Applications.Count > 1)
{
foreach (SSDSHS Application in SSEMI.Applications.Skip(1))
{
SWEVPCAM.SetApplicationVolume(Application.Process.Id, 0);
}
}
}
}
catch
{
SWEACAM.SetApplicationVolume(SSEAMI.ApplicationProcess.Id, Volume);
try
{
if (SSEMI.Applications.Any())
{
SWEACAM.SetApplicationVolume(SSEMI.Applications.FirstOrDefault().Process.Id, Volume);

if (SSEMI.Applications.Count > 1)
{
foreach (SSDSHS Application in SSEMI.Applications.Skip(1))
{
SWEACAM.SetApplicationVolume(Application.Process.Id, 0);
}
}
}
}
catch { }
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
using SSEAMI = Sucrose.Shared.Engine.Aurora.Manage.Internal;
using SSEMI = Sucrose.Shared.Engine.Manage.Internal;
using SSSHP = Sucrose.Shared.Space.Helper.Processor;

namespace Sucrose.Shared.Engine.Aurora.Helper
{
internal static class Ready
{
public static bool Check()
public static bool Check(int Count)
{
return SSEAMI.ApplicationHandle == IntPtr.Zero || SSEAMI.ApplicationProcess == null;
return !SSEMI.Applications.Any() && SSEMI.Applications.Count < Count && SSSHP.WorkCount(SSEAMI.Application) < Count;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
using System.Diagnostics;

namespace Sucrose.Shared.Engine.Aurora.Manage
namespace Sucrose.Shared.Engine.Aurora.Manage
{
internal static class Internal
{
public static string Application = string.Empty;

public static Process ApplicationProcess = null;

public static string ApplicationName = string.Empty;

public static IntPtr ApplicationHandle = IntPtr.Zero;

public static string ApplicationArguments = string.Empty;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
</ItemGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)Event\Application.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Helper\Application.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Helper\Ready.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Helper\Application.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Manage\Internal.cs" />
<Compile Include="$(MSBuildThisFileDirectory)View\Application.xaml.cs" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using SSEHR = Sucrose.Shared.Engine.Helper.Run;
using SSEMI = Sucrose.Shared.Engine.Manage.Internal;
using SSSHP = Sucrose.Shared.Space.Helper.Processor;
using SWHPI = Skylark.Wing.Helper.ProcessInterop;
using SWUS = Skylark.Wing.Utility.Screene;

namespace Sucrose.Shared.Engine.Aurora.View
{
Expand All @@ -34,27 +34,31 @@ public Application(string Application, string Arguments)
Closed += (s, e) => SSSHP.Kill(SSEAMI.Application);
Loaded += (s, e) => SSEEH.WindowLoaded(this);

SSSHP.Run(SSEAMI.Application, SSEAMI.ApplicationArguments, ProcessWindowStyle.Normal);
SWUS.Initialize();

do
{
if (SSSHP.Work(SSEAMI.Application))
{
SSEAMI.ApplicationProcess = SSSHP.Get(SSEAMI.Application);
int ScreenCount = SWUS.Screens.Count();

SSEAMI.ApplicationHandle = SWHPI.MainWindowHandle(SSEAMI.ApplicationProcess);
}
for (int Count = 0; Count < ScreenCount; Count++)
{
SSEMI.Applications.Add(SSSHP.Run(SSEAMI.Application, SSEAMI.ApplicationArguments, ProcessWindowStyle.Normal));
}

Task.Delay(100).Wait();
} while (SSEAHR.Check());
do
{
Task.Delay(250).Wait();
} while (SSEAHR.Check(ScreenCount));

SSEMI.GeneralTimer.Tick += new EventHandler(GeneralTimer_Tick);
SSEMI.GeneralTimer.Interval = new TimeSpan(0, 0, 1);
SSEMI.GeneralTimer.Start();

SSEEH.ApplicationLoaded(SSEAMI.ApplicationProcess);
SSEEH.ApplicationRendered(SSEAMI.ApplicationProcess);
SystemEvents.DisplaySettingsChanged += (s, e) => SSEEH.DisplaySettingsChanged(SSEAMI.ApplicationProcess, SSEAMI.ApplicationHandle);
SSEMI.Applications.ForEach(Application =>
{
SSEEH.ApplicationLoaded(Application);
SSEEH.ApplicationRendered(Application);
});

SystemEvents.DisplaySettingsChanged += (s, e) => SSEMI.Applications.ForEach(Application => SSEEH.DisplaySettingsChanged(Application, DateTime.Now));

SSEAHA.SetVolume(SSEHD.GetVolume());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public Gif(string Gif)
{
InitializeComponent();

SystemEvents.DisplaySettingsChanged += (s, e) => SSEEH.DisplaySettingsChanged(this);
SystemEvents.DisplaySettingsChanged += (s, e) => SSEEH.DisplaySettingsChanged(this, DateTime.Now);

ContentRendered += (s, e) => SSEEH.ContentRendered(this);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public Url(string Url)
{
InitializeComponent();

SystemEvents.DisplaySettingsChanged += (s, e) => SSEEH.DisplaySettingsChanged(this);
SystemEvents.DisplaySettingsChanged += (s, e) => SSEEH.DisplaySettingsChanged(this, DateTime.Now);

ContentRendered += (s, e) => SSEEH.ContentRendered(this);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public Video(string Video)
{
InitializeComponent();

SystemEvents.DisplaySettingsChanged += (s, e) => SSEEH.DisplaySettingsChanged(this);
SystemEvents.DisplaySettingsChanged += (s, e) => SSEEH.DisplaySettingsChanged(this, DateTime.Now);

ContentRendered += (s, e) => SSEEH.ContentRendered(this);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public Web(string Web)
{
InitializeComponent();

SystemEvents.DisplaySettingsChanged += (s, e) => SSEEH.DisplaySettingsChanged(this);
SystemEvents.DisplaySettingsChanged += (s, e) => SSEEH.DisplaySettingsChanged(this, DateTime.Now);

ContentRendered += (s, e) => SSEEH.ContentRendered(this);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public YouTube(string YouTube)
{
InitializeComponent();

SystemEvents.DisplaySettingsChanged += (s, e) => SSEEH.DisplaySettingsChanged(this);
SystemEvents.DisplaySettingsChanged += (s, e) => SSEEH.DisplaySettingsChanged(this, DateTime.Now);

ContentRendered += (s, e) => SSEEH.ContentRendered(this);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public Video(string Video)
{
InitializeComponent();

SystemEvents.DisplaySettingsChanged += (s, e) => SSEEH.DisplaySettingsChanged(this);
SystemEvents.DisplaySettingsChanged += (s, e) => SSEEH.DisplaySettingsChanged(this, DateTime.Now);

SSEMPMI.Source = SSEHS.GetSource(Video).ToString();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public Video(string Video)
{
InitializeComponent();

SystemEvents.DisplaySettingsChanged += (s, e) => SSEEH.DisplaySettingsChanged(this);
SystemEvents.DisplaySettingsChanged += (s, e) => SSEEH.DisplaySettingsChanged(this, DateTime.Now);

ContentRendered += (s, e) => SSEEH.ContentRendered(this);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public Gif(string Gif)
{
InitializeComponent();

SystemEvents.DisplaySettingsChanged += (s, e) => SSEEH.DisplaySettingsChanged(this);
SystemEvents.DisplaySettingsChanged += (s, e) => SSEEH.DisplaySettingsChanged(this, DateTime.Now);

ContentRendered += (s, e) => SSEEH.ContentRendered(this);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public Gif(string Gif)
{
InitializeComponent();

SystemEvents.DisplaySettingsChanged += (s, e) => SSEEH.DisplaySettingsChanged(this);
SystemEvents.DisplaySettingsChanged += (s, e) => SSEEH.DisplaySettingsChanged(this, DateTime.Now);

ContentRendered += (s, e) => SSEEH.ContentRendered(this);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public Url(string Url)
{
InitializeComponent();

SystemEvents.DisplaySettingsChanged += (s, e) => SSEEH.DisplaySettingsChanged(this);
SystemEvents.DisplaySettingsChanged += (s, e) => SSEEH.DisplaySettingsChanged(this, DateTime.Now);

ContentRendered += (s, e) => SSEEH.ContentRendered(this);

Expand Down
Loading

0 comments on commit a2996bf

Please sign in to comment.