Skip to content

Commit

Permalink
Minor Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiizor committed Nov 7, 2024
1 parent c22d272 commit d52b84e
Show file tree
Hide file tree
Showing 11 changed files with 672 additions and 382 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
using SSDSHS = Sucrose.Shared.Dependency.Struct.HandleStruct;
using SSEMI = Sucrose.Shared.Engine.Manage.Internal;
using SSWEW = Sucrose.Shared.Watchdog.Extension.Watch;
using SWEACAM = Skylark.Wing.Extension.AudioController.AudioManager;
using SWEVPCAM = Skylark.Wing.Extension.VideoPlayerController.AudioManager;

namespace Sucrose.Shared.Engine.Aurora.Helper
{
internal static class Application
{
public static void SetVolume(int Volume)
public static async void SetVolume(int Volume)
{
try
{
Expand Down Expand Up @@ -41,7 +42,10 @@ public static void SetVolume(int Volume)
}
}
}
catch { }
catch (Exception Exception)
{
await SSWEW.Watch_CatchException(Exception);
}
}
}
}
Expand Down
110 changes: 66 additions & 44 deletions src/Shared/Engine/Sucrose.Shared.Engine.CefSharp/Helper/Url.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using SSECSHM = Sucrose.Shared.Engine.CefSharp.Helper.Management;
using SSECSMI = Sucrose.Shared.Engine.CefSharp.Manage.Internal;
using SSEMI = Sucrose.Shared.Engine.Manage.Internal;
using SSWEW = Sucrose.Shared.Watchdog.Extension.Watch;
using SWEACAM = Skylark.Wing.Extension.AudioController.AudioManager;
using SWEVPCAM = Skylark.Wing.Extension.VideoPlayerController.AudioManager;
using SWNM = Skylark.Wing.Native.Methods;
Expand All @@ -9,84 +10,105 @@ namespace Sucrose.Shared.Engine.CefSharp.Helper
{
internal static class Url
{
public static void Play()
public static async void Play()
{
if (!SSECSMI.State)
try
{
SSECSMI.State = true;
if (!SSECSMI.State)
{
SSECSMI.State = true;

//SSECSMI.CefEngine.Address = SSECSMI.Url;
//SSECSMI.CefEngine.Address = SSECSMI.Url;

if (SSEMI.Processes.Any())
{
foreach (int Process in SSEMI.Processes.ToList())
if (SSEMI.Processes.Any())
{
_ = SWNM.DebugActiveProcessStop((uint)Process);
foreach (int Process in SSEMI.Processes.ToList())
{
_ = SWNM.DebugActiveProcessStop((uint)Process);
}
}
}

//if (SSEMI.IntermediateD3DWindow > 0)
//{
// _ = SWNM.DebugActiveProcessStop((uint)SSEMI.IntermediateD3DWindow);
//}
//if (SSEMI.IntermediateD3DWindow > 0)
//{
// _ = SWNM.DebugActiveProcessStop((uint)SSEMI.IntermediateD3DWindow);
//}
}
}
catch (Exception Exception)
{
await SSWEW.Watch_CatchException(Exception);
}
}

public static void Pause()
public static async void Pause()
{
if (SSECSMI.State)
try
{
SSECSMI.State = false;
if (SSECSMI.State)
{
SSECSMI.State = false;

//string Path = SSEHS.GetImageContentPath();
//string Path = SSEHS.GetImageContentPath();

//SSEHS.WriteImageContent(Path, SSECSES.Capture());
//SSEHS.WriteImageContent(Path, SSECSES.Capture());

//SSECSMI.CefEngine.Address = SSEHS.GetSource(Path).ToString();
//SSECSMI.CefEngine.Address = SSEHS.GetSource(Path).ToString();

if (SSEMI.Processes.Any())
{
foreach (int Process in SSEMI.Processes.ToList())
if (SSEMI.Processes.Any())
{
_ = SWNM.DebugActiveProcess((uint)Process);
foreach (int Process in SSEMI.Processes.ToList())
{
_ = SWNM.DebugActiveProcess((uint)Process);
}
}
}

//if (SSEMI.IntermediateD3DWindow > 0)
//{
// _ = SWNM.DebugActiveProcess((uint)SSEMI.IntermediateD3DWindow);
//}
//if (SSEMI.IntermediateD3DWindow > 0)
//{
// _ = SWNM.DebugActiveProcess((uint)SSEMI.IntermediateD3DWindow);
//}
}
}
catch (Exception Exception)
{
await SSWEW.Watch_CatchException(Exception);
}
}

public static async void SetVolume(int Volume)
{
if (SSEMI.Processes.Any())
try
{
foreach (int Process in SSEMI.Processes.ToList())
if (SSEMI.Processes.Any())
{
try
{
SWEVPCAM.SetApplicationVolume(Process, Volume);
}
catch
foreach (int Process in SSEMI.Processes.ToList())
{
try
{
SWEACAM.SetApplicationVolume(Process, Volume);
SWEVPCAM.SetApplicationVolume(Process, Volume);
}
catch
{
try
{
SWEACAM.SetApplicationVolume(Process, Volume);
}
catch { }
}
catch { }
}
}
}

if (SSECSMI.Try < 3)
{
await Task.Run(() =>
if (SSECSMI.Try < 3)
{
SSECSMI.Try++;
SSECSHM.SetProcesses();
});
await Task.Run(() =>
{
SSECSMI.Try++;
SSECSHM.SetProcesses();
});
}
}
catch (Exception Exception)
{
await SSWEW.Watch_CatchException(Exception);
}
}
}
Expand Down
Loading

0 comments on commit d52b84e

Please sign in to comment.