diff --git a/Saviour Backup System/setup.cs b/Saviour Backup System/setup.cs index a9b4521..a56ac0e 100644 --- a/Saviour Backup System/setup.cs +++ b/Saviour Backup System/setup.cs @@ -4,7 +4,7 @@ using System.ComponentModel; using System.Data; using System.Linq; using System.Text; -using System.Threading.Tasks; +using System.Threading; using System.IO; using System.Windows.Forms; @@ -13,15 +13,21 @@ namespace Saviour_Backup_System { class setup { - static string databaseName = databaseTools.databaseName; internal static string[] runtimeArguements = null; internal static mainWindow MW; internal static notificationIcon icon; + internal static splashScreen SS; internal static string username = Environment.UserName; //snapshots the username internal static void initProgram(string[] args) { runtimeArguements = args; + SS = new splashScreen(); + try { SS.display((args[0] == "STARTUP")); } + catch { SS.display(false); } //if it errors, run it as false + Thread.Sleep(2000); //add in other code here, just for placeholder! + SS.Close(); + SS.Dispose(); icon = new notificationIcon(); MW = new mainWindow(); //databaseTools.init(); @@ -33,7 +39,7 @@ namespace Saviour_Backup_System internal static void closeProgram() { - string exitMessage = "Are you sure you want to close Saviour Backup System? \n All copying backups and backup scanning will cease."; + string exitMessage = "Are you sure you want to close Saviour Backup System?\nAll copying backups and backup scanning will cease."; DialogResult result = MessageBox.Show(exitMessage, "Saviour Backup System Exiting...", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (result == System.Windows.Forms.DialogResult.Yes) { icon.notifyIcon.Dispose();