From 9e5738b74a308a1ca996e0491adaf15d48bfa6dd Mon Sep 17 00:00:00 2001 From: Anton Kasyanov Date: Mon, 4 Mar 2019 21:50:25 +0200 Subject: [PATCH] 143: Add a simple nag message box for Beta builds --- Eve-O-Preview/Program.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Eve-O-Preview/Program.cs b/Eve-O-Preview/Program.cs index f681020..430e490 100644 --- a/Eve-O-Preview/Program.cs +++ b/Eve-O-Preview/Program.cs @@ -17,12 +17,20 @@ namespace EveOPreview [STAThread] static void Main() { +#if DEBUG + var expirationDate = new DateTime(2019, 5, 1); + if (DateTime.Today >= expirationDate) + { + MessageBox.Show(@"This Beta version is expired. Please download a new build at https://github.com/Phrynohyas/eve-o-preview/releases", @"EVE-O Preview", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + } +#endif + // The very usual Mutex-based single-instance screening // 'token' variable is used to store reference to the instance Mutex // during the app lifetime object token = Program.GetInstanceToken(); - // If it was not possible to aquire the app token then another app instance is already running + // If it was not possible to acquire the app token then another app instance is already running // Nothing to do here if (token == null) {