added more comments to the file
This commit is contained in:
parent
b3bb578cc7
commit
ba812a868c
1 changed files with 11 additions and 7 deletions
|
@ -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!!
|
||||
|
|
Reference in a new issue