diff --git a/DSHMC/MainWindow.xaml.cs b/DSHMC/MainWindow.xaml.cs
index 3a942540..cf74f06b 100644
--- a/DSHMC/MainWindow.xaml.cs
+++ b/DSHMC/MainWindow.xaml.cs
@@ -1,11 +1,17 @@
using System;
using System.ComponentModel;
+using System.Diagnostics;
+using System.Linq;
using System.Windows;
using System.Windows.Controls;
using AdonisUI.Controls;
using Nefarius.DsHidMini.Drivers;
using Nefarius.DsHidMini.MVVM;
using Nefarius.DsHidMini.Util;
+using Nefarius.DsHidMini.Util.App;
+using MessageBox = AdonisUI.Controls.MessageBox;
+using MessageBoxImage = AdonisUI.Controls.MessageBoxImage;
+using MessageBoxResult = AdonisUI.Controls.MessageBoxResult;
namespace Nefarius.DsHidMini
{
@@ -28,6 +34,44 @@ public MainWindow()
InitializeComponent();
DataContext = _vm;
+
+ if (ApplicationConfiguration.Instance.HasAcknowledgedDonationDialog) return;
+
+ var messageBox = new MessageBoxModel
+ {
+ Text =
+ "Hello, Gamer! \r\n\r\nDid you know this project was only possible with years of dedication and enthusiasm? " +
+ "You're receiving this work for absolutely free. If it brings you joy please consider giving back to the "
+ + "author's efforts and show your appreciation through a donation. \r\n\r\nThanks for your attention ❤️",
+ Caption = "May I have your attention",
+ Icon = MessageBoxImage.Question,
+ Buttons = new[]
+ {
+ MessageBoxButtons.Cancel("Acknowledged"),
+ MessageBoxButtons.Yes("Sure, show me how!")
+ },
+ CheckBoxes = new[]
+ {
+ new MessageBoxCheckBoxModel("I've already donated or will consider it")
+ {
+ IsChecked = false,
+ Placement = MessageBoxCheckBoxPlacement.BelowText
+ }
+ },
+ IsSoundEnabled = false
+ };
+
+ MessageBox.Show(messageBox);
+
+ switch (messageBox.Result)
+ {
+ case MessageBoxResult.Yes:
+ Process.Start("https://vigem.org/Donations/");
+ break;
+ }
+
+ ApplicationConfiguration.Instance.HasAcknowledgedDonationDialog =
+ messageBox.CheckBoxes.First().IsChecked;
}
protected override void OnSourceInitialized(EventArgs e)
diff --git a/DSHMC/Util/App/ApplicationConfiguration.cs b/DSHMC/Util/App/ApplicationConfiguration.cs
index 29bc7f31..d037550c 100644
--- a/DSHMC/Util/App/ApplicationConfiguration.cs
+++ b/DSHMC/Util/App/ApplicationConfiguration.cs
@@ -37,6 +37,11 @@ public class ApplicationConfiguration
///
public bool IsGenuineCheckEnabled { get; set; } = true;
+ ///
+ /// Whether user has acknowledged the donation dialog.
+ ///
+ public bool HasAcknowledgedDonationDialog { get; set; } = false;
+
///
/// Singleton instance of app configuration.
///