home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 September / Chip_2002-09_cd1.bin / zkuste / vbasic / Data / Utils / XZipNet.msi / Data1.cab / ZipContentsItem.vb < prev    next >
Encoding:
Text File  |  2002-02-04  |  1.2 KB  |  41 lines

  1. 'Xceed Zip for .NET - ZipManager Sample Application
  2. 'Copyright (c) 2000-2002 - Xceed Software Inc.
  3. '
  4. '[ZipContentsItem.vb]
  5. '
  6. 'This application demonstrates how to use Xceed Zip for .NET.
  7. '
  8. 'This file is part of Xceed Zip for .NET. The source code in this file 
  9. 'is only intended as a supplement to the documentation, and is provided 
  10. ' "as is", without warranty of any kind, either expressed or implied.
  11.  
  12. Imports Xceed.FileSystem
  13. Imports Xceed.Zip
  14.  
  15. Public Class ZipContentsItem
  16.   Inherits System.Windows.Forms.ListViewItem
  17.  
  18.   Public Sub New(ByVal File As ZippedFile)
  19.     Call MyBase.New(File.FullName)
  20.     MyBase.SubItems.Add(File.LastWriteDateTime.ToString())
  21.     MyBase.SubItems.Add(File.Size.ToString())
  22.     MyBase.SubItems.Add(File.CompressedSize.ToString())
  23.     MyBase.SubItems.Add(System.Math.Round(100 - File.CompressedSize / File.Size * 100).ToString() + "%")
  24.     MyBase.SubItems.Add(File.Attributes.ToString())
  25.  
  26.     If File.Encrypted Then
  27.       MyBase.ForeColor = Color.Red
  28.     End If
  29.  
  30.     m_file = File
  31.   End Sub
  32.  
  33.   Public ReadOnly Property File() As ZippedFile
  34.     Get
  35.       Return m_file
  36.     End Get
  37.   End Property
  38.  
  39.   Private m_file As ZippedFile
  40. End Class
  41.