2022-12-08 10:43:10 +01:00
|
|
|
using CommonHelpers;
|
|
|
|
|
|
|
|
|
|
namespace PowerControl
|
|
|
|
|
{
|
|
|
|
|
internal sealed class Settings : BaseSettings
|
|
|
|
|
{
|
|
|
|
|
public static readonly Settings Default = new Settings();
|
|
|
|
|
|
|
|
|
|
public Settings() : base("Settings")
|
|
|
|
|
{
|
|
|
|
|
TouchSettings = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string MenuUpKey
|
|
|
|
|
{
|
|
|
|
|
get { return Get("MenuUpKey", "Ctrl+Win+Numpad8"); }
|
|
|
|
|
set { Set("MenuUpKey", value); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string MenuDownKey
|
|
|
|
|
{
|
|
|
|
|
get { return Get("MenuDownKey", "Ctrl+Win+Numpad2"); }
|
|
|
|
|
set { Set("MenuDownKey", value); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string MenuLeftKey
|
|
|
|
|
{
|
2022-12-19 21:36:58 +01:00
|
|
|
get { return Get("MenuLeftKey", "Ctrl+Win+Numpad4"); }
|
2022-12-08 10:43:10 +01:00
|
|
|
set { Set("MenuLeftKey", value); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string MenuRightKey
|
|
|
|
|
{
|
|
|
|
|
get { return Get("MenuRightKey", "Ctrl+Win+Numpad6"); }
|
|
|
|
|
set { Set("MenuRightKey", value); }
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-19 21:36:58 +01:00
|
|
|
public string MenuToggle
|
|
|
|
|
{
|
|
|
|
|
get { return Get("MenuToggle", "Shift+F11"); }
|
|
|
|
|
set { Set("MenuToggle", value); }
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-08 10:43:10 +01:00
|
|
|
public bool EnableNeptuneController
|
|
|
|
|
{
|
|
|
|
|
get { return Get<bool>("EnableNeptuneController", true); }
|
|
|
|
|
set { Set("EnableNeptuneController", value); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool EnableVolumeControls
|
|
|
|
|
{
|
|
|
|
|
get { return Get<bool>("EnableVolumeControls", true); }
|
|
|
|
|
set { Set("EnableVolumeControls", value); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool EnableExperimentalFeatures
|
|
|
|
|
{
|
2022-12-19 12:33:45 +01:00
|
|
|
get { return Instance.IsDEBUG; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool AckAntiCheat(String title, String name, String message)
|
|
|
|
|
{
|
|
|
|
|
if (Get<bool>("AckAntiCheat" + name, false) && Settings.Default.EnableExperimentalFeatures)
|
|
|
|
|
return true;
|
|
|
|
|
|
2022-12-20 09:40:23 +01:00
|
|
|
Application.DoEvents();
|
|
|
|
|
|
2022-12-19 12:33:45 +01:00
|
|
|
var result = MessageBox.Show(
|
2022-12-20 09:40:23 +01:00
|
|
|
new Form { TopMost = true },
|
2022-12-19 12:33:45 +01:00
|
|
|
String.Join("\n",
|
|
|
|
|
"WARNING!!!!",
|
|
|
|
|
"",
|
|
|
|
|
message,
|
|
|
|
|
"This might result in kicking from the application or even be banned.",
|
|
|
|
|
"",
|
|
|
|
|
"CLICK YES TO ACKNOWLEDGE?",
|
|
|
|
|
"CLICK NO TO LEARN MORE."
|
2022-12-20 09:40:23 +01:00
|
|
|
), title,
|
|
|
|
|
MessageBoxButtons.YesNo,
|
|
|
|
|
MessageBoxIcon.Warning,
|
|
|
|
|
MessageBoxDefaultButton.Button2
|
2022-12-19 12:33:45 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if (result == DialogResult.Yes)
|
|
|
|
|
{
|
|
|
|
|
Set<bool>("AckAntiCheat" + name, true);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try { System.Diagnostics.Process.Start("explorer.exe", "https://steam-deck-tools.ayufan.dev/#anti-cheat-and-antivirus-software"); }
|
|
|
|
|
catch { }
|
|
|
|
|
return false;
|
2022-12-08 10:43:10 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|