mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2025-12-06 07:12:01 +01:00
- This looks into `UserProfiles/` and compiles user profiles - This exposes a very minimal scripting interface as defined by `Dynamic.Globals`
35 lines
940 B
C#
35 lines
940 B
C#
namespace SteamController.Profiles
|
|
{
|
|
public abstract class Profile
|
|
{
|
|
public struct Status
|
|
{
|
|
public static readonly Status Continue = new Status() { IsDone = false };
|
|
public static readonly Status Done = new Status() { IsDone = true };
|
|
|
|
public bool IsDone { get; set; }
|
|
}
|
|
|
|
public event Action<string[]> ErrorsChanged;
|
|
|
|
public virtual String Name { get; set; } = "";
|
|
public virtual bool Visible { get; set; } = true;
|
|
public virtual bool IsDesktop { get; set; }
|
|
public virtual string[]? Errors { get; set; }
|
|
|
|
public abstract bool Selected(Context context);
|
|
|
|
public abstract Status Run(Context context);
|
|
|
|
public Profile()
|
|
{
|
|
ErrorsChanged += delegate { };
|
|
}
|
|
|
|
protected void OnErrorsChanged()
|
|
{
|
|
ErrorsChanged(this.Errors ?? new string[0]);
|
|
}
|
|
}
|
|
}
|