Skip to content

Commit

Permalink
Show Top-Most Anti-Cheat ackonwledge
Browse files Browse the repository at this point in the history
  • Loading branch information
ayufan committed Dec 20, 2022
1 parent 99066eb commit aa6c979
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
8 changes: 7 additions & 1 deletion FanControl/FanControlForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ private bool AckAntiCheat()
if (Settings.Default.AckAntiCheat && Settings.Default.EnableExperimentalFeatures)
return true;

Application.DoEvents();

var result = MessageBox.Show(
new Form { TopMost = true },
String.Join("\n",
"WARNING!!!!",
"",
Expand All @@ -93,7 +96,10 @@ private bool AckAntiCheat()
"",
"CLICK YES TO ACKNOWLEDGE?",
"CLICK NO TO LEARN MORE."
), Text, MessageBoxButtons.YesNo
), Text,
MessageBoxButtons.YesNo,
MessageBoxIcon.Warning,
MessageBoxDefaultButton.Button2
);

if (result == DialogResult.Yes)
Expand Down
8 changes: 7 additions & 1 deletion PerformanceOverlay/Controller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,10 @@ private bool AckAntiCheat()
if (Settings.Default.AckAntiCheat && Settings.Default.EnableExperimentalFeatures)
return true;

Application.DoEvents();

var result = MessageBox.Show(
new Form { TopMost = true },
String.Join("\n",
"WARNING!!!!",
"",
Expand All @@ -179,7 +182,10 @@ private bool AckAntiCheat()
"",
"CLICK YES TO ACKNOWLEDGE?",
"CLICK NO TO LEARN MORE."
), TitleWithVersion, MessageBoxButtons.YesNo
), TitleWithVersion,
MessageBoxButtons.YesNo,
MessageBoxIcon.Warning,
MessageBoxDefaultButton.Button2
);

if (result == DialogResult.Yes)
Expand Down
8 changes: 7 additions & 1 deletion PowerControl/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ public bool AckAntiCheat(String title, String name, String message)
if (Get<bool>("AckAntiCheat" + name, false) && Settings.Default.EnableExperimentalFeatures)
return true;

Application.DoEvents();

var result = MessageBox.Show(
new Form { TopMost = true },
String.Join("\n",
"WARNING!!!!",
"",
Expand All @@ -66,7 +69,10 @@ public bool AckAntiCheat(String title, String name, String message)
"",
"CLICK YES TO ACKNOWLEDGE?",
"CLICK NO TO LEARN MORE."
), title, MessageBoxButtons.YesNo
), title,
MessageBoxButtons.YesNo,
MessageBoxIcon.Warning,
MessageBoxDefaultButton.Button2
);

if (result == DialogResult.Yes)
Expand Down
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
- Use `Sentry.io` for error tracking
- Make `Updater.exe` to be able to update from `.zip` to `setup.exe`
- Bug fixing to handle all known exceptions
- Require to acknowledge when using function that might trigger `Anti-Cheat` protection
- Require to acknowledge when using function that might trigger `Anti-Cheat` protection via top-most window

0 comments on commit aa6c979

Please sign in to comment.