1
Fork 0

added more comments to the file

This commit is contained in:
Jake Howard 2014-09-14 15:19:00 +01:00
parent b3bb578cc7
commit ba812a868c

View file

@ -14,12 +14,16 @@ namespace Saviour_Backup_System
{
private DriveInfo selectedDrive;
public mainWindow()
{
public mainWindow() {
InitializeComponent();
//populates the drive list
refreshDriveList();
connectedDrivesList.Items[0].Selected = true; //Selects the first item in the list of drives
displayDriveDetails(connectedDrivesList.SelectedItems[0].Text.Substring(0, 3)); //displays the info for the drive
//selects the first item in the list of drives
connectedDrivesList.Items[0].Selected = true;
//Displays the details for the selected drive
displayDriveDetails(connectedDrivesList.SelectedItems[0].Text.Substring(0, 3));
//Starts the thread for displaying the capacity of a drive
formatDriveCapacityTimer.Start();
@ -31,7 +35,7 @@ namespace Saviour_Backup_System
internal void refreshDriveList() {
DriveInfo[] drives = USBTools.getConnectedDrives();
if (connectedDrivesList.Items.Count == USBTools.countDrives()) { return; }
if (connectedDrivesList.Items.Count == USBTools.countDrives()) { return; } //f there is no change in the numer
connectedDrivesList.Items.Clear();
bool deviceStillConnected = false;
foreach (DriveInfo drive in drives){
@ -131,7 +135,7 @@ namespace Saviour_Backup_System
private void driveRefreshTimer_Tick(object sender, EventArgs e) { refreshDriveList(); }
private void formatDriveCapacityTimer_Tick(object sender, EventArgs e) { try { formatDriveCapacity(); } catch { } } //Because background workers cant interact with the GUI (very quickly)
private void formatDriveCapacityTimer_Tick(object sender, EventArgs e) { try { formatDriveCapacity(); } catch { } } //Because background workers cant interact with the GUI (very quickly), so a timer has to
private void populateDeviceTab() {
// put stuff in here!!