You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.3 KiB
29 lines
1.3 KiB
1 year ago
|
using StabilityMatrix.Core.Models.Update;
|
||
2 years ago
|
|
||
1 year ago
|
namespace StabilityMatrix.Core.Helper;
|
||
2 years ago
|
|
||
|
public class EventManager
|
||
|
{
|
||
|
public static EventManager Instance { get; } = new();
|
||
|
|
||
|
private EventManager()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
public event EventHandler<int>? GlobalProgressChanged;
|
||
2 years ago
|
public event EventHandler<Type>? PageChangeRequested;
|
||
1 year ago
|
public event EventHandler? InstalledPackagesChanged;
|
||
1 year ago
|
public event EventHandler<bool>? OneClickInstallFinished;
|
||
1 year ago
|
public event EventHandler? TeachingTooltipNeeded;
|
||
1 year ago
|
public event EventHandler<bool>? DevModeSettingChanged;
|
||
1 year ago
|
public event EventHandler<UpdateInfo>? UpdateAvailable;
|
||
2 years ago
|
public void OnGlobalProgressChanged(int progress) => GlobalProgressChanged?.Invoke(this, progress);
|
||
2 years ago
|
public void RequestPageChange(Type pageType) => PageChangeRequested?.Invoke(this, pageType);
|
||
1 year ago
|
public void OnInstalledPackagesChanged() => InstalledPackagesChanged?.Invoke(this, EventArgs.Empty);
|
||
1 year ago
|
public void OnOneClickInstallFinished(bool skipped) => OneClickInstallFinished?.Invoke(this, skipped);
|
||
1 year ago
|
public void OnTeachingTooltipNeeded() => TeachingTooltipNeeded?.Invoke(this, EventArgs.Empty);
|
||
1 year ago
|
public void OnDevModeSettingChanged(bool value) => DevModeSettingChanged?.Invoke(this, value);
|
||
1 year ago
|
public void OnUpdateAvailable(UpdateInfo args) => UpdateAvailable?.Invoke(this, args);
|
||
2 years ago
|
}
|