From 2f0e303bff1293c126727fe78ae4a5f661dc5cf5 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 31 Jul 2014 15:32:08 +0100 Subject: [PATCH] updated access modifiers --- Saviour Backup System/USBTools.cs | 16 ++++++++-------- Saviour Backup System/databaseTools.cs | 2 +- Saviour Backup System/setup.cs | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Saviour Backup System/USBTools.cs b/Saviour Backup System/USBTools.cs index b19fd7c..1731ac8 100644 --- a/Saviour Backup System/USBTools.cs +++ b/Saviour Backup System/USBTools.cs @@ -9,9 +9,9 @@ using System.Data.SqlClient; namespace Saviour_Backup_System { - public class USBTools + class USBTools { - public static void initDriveScan(){ + internal static void initDriveScan(){ Timer scanTimer = new Timer(); scanTimer.Elapsed += new ElapsedEventHandler(driveScanTick); scanTimer.Interval = 1000 * 7; //seconds to check for new drives @@ -33,7 +33,7 @@ namespace Saviour_Backup_System //check if record exists in database } } - public static DriveInfo[] getConnectedDrives() + internal static DriveInfo[] getConnectedDrives() { List drivesList = new List(); DriveInfo[] drives = DriveInfo.GetDrives(); @@ -48,21 +48,21 @@ namespace Saviour_Backup_System } - public static void safelyEjectDrive(string driveChar) + internal static void safelyEjectDrive(string driveChar) { driveChar = driveChar.Remove(driveChar.Length - 1); RemoveDriveTools.RemoveDrive(driveChar); } - public static void displayDriveDetails(string driveName) + internal static void displayDriveDetails(string driveName) { DriveInfo selectedDrive; foreach (DriveInfo drive in getConnectedDrives()) { if (drive.Name == driveName) { selectedDrive = drive; break; } } } - public static string getDriveType(DriveInfo selectedDrive) + internal static string getDriveType(DriveInfo selectedDrive) { string driveTypeDecoded = "Error decoding drive details!"; switch (selectedDrive.DriveType) @@ -93,7 +93,7 @@ namespace Saviour_Backup_System } - public static int countDrives() + internal static int countDrives() { int numberofDrives = 0; foreach (DriveInfo drive in getConnectedDrives()) { numberofDrives++; } @@ -101,7 +101,7 @@ namespace Saviour_Backup_System } - public static int spacePercentage(DriveInfo drive) + internal static int spacePercentage(DriveInfo drive) { double capacity = (double)(drive.TotalSize / (1024 * 1024)); double free = (double)(drive.AvailableFreeSpace / (1024 * 1024)); diff --git a/Saviour Backup System/databaseTools.cs b/Saviour Backup System/databaseTools.cs index 2bf71b4..a2d49cf 100644 --- a/Saviour Backup System/databaseTools.cs +++ b/Saviour Backup System/databaseTools.cs @@ -24,7 +24,7 @@ namespace Saviour_Backup_System } - public static void clearBackups(string tableName) + internal static void clearBackups(string tableName) { executeSQL("DELETE FROM Rules;"); } diff --git a/Saviour Backup System/setup.cs b/Saviour Backup System/setup.cs index c5edee7..6973b7c 100644 --- a/Saviour Backup System/setup.cs +++ b/Saviour Backup System/setup.cs @@ -12,7 +12,7 @@ namespace Saviour_Backup_System { class setup { - public static void initProgram(){ + internal static void initProgram(){ string databaseName = databaseTools.databaseName; if (File.Exists(databaseName)) { return; } // If the program has been run before, then the database will exist, so use that to test it.