Skip to content

Commit

Permalink
Set Progressbar to 0 if Used = SIZE_W
Browse files Browse the repository at this point in the history
  • Loading branch information
eloaders committed Aug 1, 2014
1 parent 12f4e53 commit bfa53bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion I-Nex/i-nex/.src/Disk_Drives.module
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ Public Sub get_informations()
Try FREE_SPACE = CalculateFreeSpace(Dfree(mount_point), True)
Finfosys.Label248.Text = "Free: " & FREE_SPACE
Finfosys.ProgressBar2.Value = 0
'Begins calculations of used space on device/partition
Used = 0
SIZE_W = 0
SIZE_W_FREE = 0
Expand All @@ -139,10 +140,12 @@ Public Sub get_informations()
Try Used = (SIZE_W - SIZE_W_FREE)
If Used = 1 Or SIZE_W = 1 Then
Try Finfosys.ProgressBar2.Value = 0
Else If Used = SIZE_W Then
Try Finfosys.ProgressBar2.Value = 0
Else
Try Finfosys.ProgressBar2.Value = Used / SIZE_W
Endif

End

Function CalculateFreeSpace(Size As Float, Optional ReturnIn As Boolean) As String
Expand Down

0 comments on commit bfa53bb

Please sign in to comment.