143: Add a simple nag message box for Beta builds
This commit is contained in:
@@ -17,12 +17,20 @@ namespace EveOPreview
|
|||||||
[STAThread]
|
[STAThread]
|
||||||
static void Main()
|
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
|
// The very usual Mutex-based single-instance screening
|
||||||
// 'token' variable is used to store reference to the instance Mutex
|
// 'token' variable is used to store reference to the instance Mutex
|
||||||
// during the app lifetime
|
// during the app lifetime
|
||||||
object token = Program.GetInstanceToken();
|
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
|
// Nothing to do here
|
||||||
if (token == null)
|
if (token == null)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user