public static void CompareLauncherVersions() { int launcherVersion = GetInfo.GetFrontEndLauncherVersion(); int currentLauncherVersion = GetInfo.GetCurrentLauncherVersion(); if (currentLauncherVersion != launcherVersion) { Console.WriteLine("Updating launcher version..."); FrontEndUpdater.UpdateLauncher(); } }
//This will lock the console window from being closed and notify the user Access is running. //It will also change the console color to blue... for funzies. private void disableConsoleClose() { Console.BackgroundColor = ConsoleColor.DarkBlue; Console.ForegroundColor = ConsoleColor.White; Console.Title = "P&B Database Launcher - This window must stay open."; IntPtr hMenu = Process.GetCurrentProcess().MainWindowHandle; IntPtr hSystemMenu = GetSystemMenu(hMenu, false); EnableMenuItem(hSystemMenu, SC_CLOSE, MF_GRAYED); RemoveMenu(hSystemMenu, SC_CLOSE, MF_BYCOMMAND); Console.Clear(); Console.WriteLine("The P&B Access Database is now running. Please leave this window open. \n"); Console.WriteLine("Current user: {0} \nCurrent UserType: {1} \nCurrent RolloutVersion: {2} \nCurrent Launcher Version {3}", _user.Name, _user.UserType, GetDataFromXml.GetFrontEndSettings().RolloutVersionString, GetInfo.GetCurrentLauncherVersion()); MinimizeConsoleWindow(hMenu); }