Split Profiles into Profiles/Default and Profiles/Predefined

This commit is contained in:
Kamil Trzciński 2022-12-08 20:57:20 +01:00
parent 86b73001a2
commit bdcb70d685
9 changed files with 19 additions and 26 deletions

View file

@ -1,6 +1,5 @@
using CommonHelpers;
using ExternalHelpers;
using SteamController.Profiles;
using System.ComponentModel;
using System.Diagnostics;
@ -18,10 +17,10 @@ namespace SteamController
Context context = new Context()
{
Profiles = {
new Profiles.DesktopProfile() { Name = "Desktop" },
new Profiles.SteamProfile() { Name = "Steam", Visible = false },
new Profiles.SteamWithShorcutsProfile() { Name = "Steam with Shortcuts", Visible = false },
new Profiles.X360HapticProfile() { Name = "X360" }
new Profiles.Predefined.DesktopProfile() { Name = "Desktop" },
new Profiles.Predefined.SteamProfile() { Name = "Steam", Visible = false },
new Profiles.Predefined.SteamWithShorcutsProfile() { Name = "Steam with Shortcuts", Visible = false },
new Profiles.Predefined.X360HapticProfile() { Name = "X360" }
},
Managers = {
new Managers.ProcessManager(),

View file

@ -1,8 +1,8 @@
using SteamController.ProfilesSettings;
namespace SteamController.Profiles
namespace SteamController.Profiles.Default
{
public abstract class DefaultBackPanelShortcutsProfile : DefaultGuideShortcutsProfile
public abstract class BackPanelShortcutsProfile : GuideShortcutsProfile
{
internal abstract ProfilesSettings.BackPanelSettings BackPanelSettings { get; }

View file

@ -1,12 +1,11 @@
using System.Diagnostics;
using System.Runtime.InteropServices;
using ExternalHelpers;
using PowerControl.Helpers;
using WindowsInput;
namespace SteamController.Profiles
namespace SteamController.Profiles.Default
{
public abstract class DefaultGuideShortcutsProfile : DefaultShortcutsProfile
public abstract class GuideShortcutsProfile : ShortcutsProfile
{
public readonly TimeSpan HoldForKill = TimeSpan.FromSeconds(3);
public readonly TimeSpan HoldForClose = TimeSpan.FromSeconds(1);

View file

@ -1,11 +1,8 @@
using System.Diagnostics;
using System.Runtime.InteropServices;
using ExternalHelpers;
using WindowsInput;
namespace SteamController.Profiles
namespace SteamController.Profiles.Default
{
public abstract class DefaultShortcutsProfile : Profile
public abstract class ShortcutsProfile : Profile
{
public const String ShortcutConsumed = "ShortcutsProfile";
public readonly TimeSpan HoldForShorcuts = TimeSpan.FromMilliseconds(200);

View file

@ -1,8 +1,8 @@
using WindowsInput;
namespace SteamController.Profiles
namespace SteamController.Profiles.Predefined
{
public sealed class DesktopProfile : DefaultBackPanelShortcutsProfile
public sealed class DesktopProfile : Default.BackPanelShortcutsProfile
{
private const String Consumed = "DesktopProfileOwner";

View file

@ -1,8 +1,6 @@
using Nefarius.ViGEm.Client.Targets.Xbox360;
namespace SteamController.Profiles
namespace SteamController.Profiles.Predefined
{
public sealed class SteamProfile : DefaultShortcutsProfile
public sealed class SteamProfile : Default.ShortcutsProfile
{
public SteamProfile()
{

View file

@ -1,8 +1,8 @@
using Nefarius.ViGEm.Client.Targets.Xbox360;
namespace SteamController.Profiles
namespace SteamController.Profiles.Predefined
{
public sealed class SteamWithShorcutsProfile : DefaultGuideShortcutsProfile
public sealed class SteamWithShorcutsProfile : Default.GuideShortcutsProfile
{
public SteamWithShorcutsProfile()
{

View file

@ -1,7 +1,7 @@
using SteamController.ProfilesSettings;
using HapticPad = SteamController.Devices.SteamController.HapticPad;
namespace SteamController.Profiles
namespace SteamController.Profiles.Predefined
{
public class X360HapticProfile : X360Profile
{

View file

@ -1,9 +1,9 @@
using Nefarius.ViGEm.Client.Targets.Xbox360;
using SteamController.ProfilesSettings;
namespace SteamController.Profiles
namespace SteamController.Profiles.Predefined
{
public class X360Profile : DefaultBackPanelShortcutsProfile
public class X360Profile : Default.BackPanelShortcutsProfile
{
public override bool Selected(Context context)
{