home *** CD-ROM | disk | FTP | other *** search
- /*
- * Xceed Zip for .NET - MiniExplorer Sample Application
- * Copyright (c) 2000-2002 - Xceed Software Inc.
- *
- * [FileListItem.cs]
- *
- * This application demonstrates how to use the Xceed FileSystem object model
- * in a generic way.
- *
- * This file is part of Xceed Zip for .NET. The source code in this file
- * is only intended as a supplement to the documentation, and is provided
- * "as is", without warranty of any kind, either expressed or implied.
- */
-
- using System;
- using System.Windows.Forms;
- using System.Drawing;
- using Xceed.FileSystem;
- using Xceed.Zip;
-
- namespace Xceed.FileSystem.Samples.MiniExplorer
- {
- /// <summary>
- /// Summary description for FileListItem.
- /// </summary>
- internal class FileListItem : ListViewItem
- {
- public FileListItem( AbstractFile file )
- : base( file.Name, 0 )
- {
- try { SubItems.Add( file.Size.ToString() ); }
- catch { SubItems.Add( "NA" ); }
-
- try { SubItems.Add( file.Attributes.ToString() ); }
- catch { SubItems.Add( "NA" ); }
-
- if( ( file is ZippedFile ) && ( ( ZippedFile )file ).Encrypted )
- {
- base.ForeColor = Color.Red;
- }
-
- m_file = file;
- }
-
- public FileListItem( string fileName )
- : base( fileName, 0 )
- {
- }
-
- public AbstractFile File
- {
- get { return m_file; }
- }
-
- private AbstractFile m_file = null;
- }
- }
-