Skip to content

Commit

Permalink
修正容量显示
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyangwx committed Oct 27, 2023
1 parent b95faed commit 9c4a429
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 27 deletions.
4 changes: 2 additions & 2 deletions LTFSCopyGUI/LTFSWriter.resx
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADu
CQAAAk1TRnQBSQFMAgEBAwEAAbABBwGwAQcBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CQAAAk1TRnQBSQFMAgEBAwEAAbgBBwG4AQcBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
Expand Down Expand Up @@ -1265,7 +1265,7 @@
<value> </value>
</data>
<data name="ToolStripStatusLabel4.Size" type="System.Drawing.Size, System.Drawing">
<value>1079, 21</value>
<value>1048, 21</value>
</data>
<data name="ToolStripStatusLabel4.Text" xml:space="preserve">
<value> </value>
Expand Down
26 changes: 1 addition & 25 deletions LTFSCopyGUI/LTFSWriter.vb
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ Public Class LTFSWriter
Public Sub RefreshCapacity()
Invoke(Sub()
Try
Dim cap0 As Long '= TapeUtils.MAMAttribute.FromTapeDrive(TapeDrive, 0, 0, 0).AsNumeric
Dim cap0 As Long = TapeUtils.MAMAttribute.FromTapeDrive(TapeDrive, 0, 0, 0).AsNumeric
Dim cap1 As Long
Dim loss As Long
Dim CMInfo As New TapeUtils.CMParser(TapeDrive)
Expand Down Expand Up @@ -645,30 +645,6 @@ Public Class LTFSWriter
End If
End If
Next
DataSize.Add(CurrSize)
Dim DataWrapList As New List(Of Integer)
Dim DataWrapNum As Integer = 0
For Each l As Double In CMInfo.TapeDirectoryData.CapacityLoss
If l = -3 Then
If DataWrapNum > 0 Then
DataWrapList.Add(DataWrapNum)
DataWrapNum = 0
End If
Else
DataWrapNum += 1
End If
Next
If DataWrapNum > 0 Then DataWrapList.Add(DataWrapNum)
For i As Integer = 0 To DataWrapList.Count - 1
Dim nWrap As Long = DataWrapList(i)
Dim len As Long = nWrap * CMInfo.CartridgeMfgData.MB_PER_WRAP

Dim WrittenSize As String = ""
If DataSize.Count = DataWrapList.Count Then
WrittenSize = $"{IOManager.FormatSize(DataSize(i) * CMInfo.CartridgeMfgData.KB_PER_DATASET * 1024, True)} / "
End If
If i = 0 Then cap0 = len Else cap1 = len
Next
loss = nLossDS * CMInfo.CartridgeMfgData.KB_PER_DATASET * 1000
If ExtraPartitionCount > 0 Then
cap1 = TapeUtils.MAMAttribute.FromTapeDrive(TapeDrive, 0, 0, 1).AsNumeric
Expand Down

0 comments on commit 9c4a429

Please sign in to comment.