2014-07-25 19:07:08 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2014-08-02 10:48:14 +01:00
|
|
|
|
using System.ComponentModel;
|
2014-07-27 20:58:49 +01:00
|
|
|
|
using System.Data;
|
2014-07-25 19:07:08 +01:00
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.IO;
|
2014-08-02 10:48:14 +01:00
|
|
|
|
using System.Windows.Forms;
|
2014-07-25 19:07:08 +01:00
|
|
|
|
|
2014-07-27 20:58:49 +01:00
|
|
|
|
|
2014-07-25 19:07:08 +01:00
|
|
|
|
namespace Saviour_Backup_System
|
|
|
|
|
{
|
|
|
|
|
class setup
|
|
|
|
|
{
|
2014-11-07 00:39:59 +00:00
|
|
|
|
static string databaseName = database.databaseName;
|
2014-08-05 16:44:49 +01:00
|
|
|
|
internal static string[] runtimeArguements = null;
|
2014-11-04 15:55:18 +00:00
|
|
|
|
internal static mainWindow MW;
|
2014-11-04 17:25:00 +00:00
|
|
|
|
internal static notificationIcon icon;
|
2014-11-07 00:39:59 +00:00
|
|
|
|
|
2014-08-04 18:31:19 +01:00
|
|
|
|
internal static void initProgram(string[] args)
|
2014-08-02 10:48:14 +01:00
|
|
|
|
{
|
2014-11-04 15:55:18 +00:00
|
|
|
|
runtimeArguements = args;
|
|
|
|
|
|
2014-11-04 17:25:00 +00:00
|
|
|
|
icon = new notificationIcon();
|
|
|
|
|
MW = new mainWindow();
|
|
|
|
|
Application.Run(MW);
|
|
|
|
|
|
2014-08-02 10:48:14 +01:00
|
|
|
|
//if (!File.Exists(databaseName)) { setupDatabase(); } // If the program has been run before, then the database will exist, so use that to test it.
|
|
|
|
|
}
|
|
|
|
|
|
2014-11-07 00:39:59 +00:00
|
|
|
|
|
2014-08-02 10:48:14 +01:00
|
|
|
|
|
2014-11-04 17:25:00 +00:00
|
|
|
|
internal static void closeProgram()
|
2014-08-02 10:48:14 +01:00
|
|
|
|
{
|
2014-11-06 10:22:28 +00:00
|
|
|
|
string exitMessage = "Are you sure you want to close Saviour Backup System? \n All 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)
|
|
|
|
|
{
|
|
|
|
|
Application.Exit();
|
|
|
|
|
}
|
2014-08-02 10:48:14 +01:00
|
|
|
|
}
|
2014-07-25 19:07:08 +01:00
|
|
|
|
}
|
|
|
|
|
}
|