Introduction

This application is a clone of Windows Explorer. Unlike other Windows Explorer code available in .NET, I have tried to make it closed to Microsoft Windows Explorer.

 

Design

The design of the program is Object Oriented. Following are the key elements of the design:

  • The FrazIO class; providing the core functionality of file managing tasks like copy, paste, renaming, deleting, formatting the file/folder size, etc
  • The Library class; providing the general functionality for making interface like filling/updating treeview and listview controls and sorting the files and folders as required.
  • An ESort enumeration which encapsulates the types by which file/folders can be sorted.
  • SecondExplorer class; the main class of the program for handling events, using controls and the supporting libraries.

User Interface

The interface consists of:

  • Main Menu bar very much similar to the one in Microsoft Windows Explorer providing all the functionality at one place.
  • Toolbar having buttons for options like cut, copy, paste, delete, up one level, etc
  • Address Bar showing the path of currently open folder
  • Status bar on the bottom displaying the type of file selected, number of files/folders selected, the size of currently opened folder and things like that
  • TreeView on the left of working area showing disks and folders
  • ListView on the right side showing the files & folders of currently opened folder.

Functionality

Following functionality have been included in the Program

  • Complete navigation between folders of all the drives on the system with distinguishable icons for files, folders and disks.
  • User can easily create new files and folder in any folder and disk
  • User can rename any file and folder
  • User can delete files and folders
  • User can cut, copy, paste any file and/or folder from any location to other.
  • Select All option is also available to select all the files and folders in the current folder.
  • User can hide/unhide toolbar, status bar and address bar.
  • User can change the view of ListView control like Large Icons, Small Icons, List (Detail view is not implemented in the current version)
  • User can arrange icons in the ListView control by name, type, size and date just like they do in Microsoft Windows Explorer.
  • User can refresh the contents of screen from view menu

Limitations

Well, nothing is perfect in this world (except for her smile), so the program is no exception and has some limitations like

  • Cut, Copy, Paste can only be done within the program or some other instance of same program and not with any Windows program.
  •  The program does use Clipboard but it copies and retrieves an ArrayList containing the paths of target files and folders. I do not know the format windows use to copy paste files!
  • The program does not use standard icons for files and folders. Infact, it uses the same icon for any kind of file. I do not know how to retrieve and use the standard icons of Windows system.
  • It does not have any context menu (menu that pops up on right click). It is not included to keep program simple.
  • It does not provide the detail view. It is not included because the author was tired.
  • You can not delete any read only or system file.
  • The address bar is read only, i.e., you can not type in any address and go there directly. This is not provided because the text in the address bar has been used to synchronize the treeview and listview controls.
  • The program does not provide the properties option. The current option only shows the selected files and folders in the message box. The reason is same as for detail view.
  • The program does not show distinguishable drive icons and also the labels of disks. If any one can add the missing functionality, I would be extremely thankful; to say the least.

Plus Points

  • Although it presents most of the functionality of famous Windows Explorer, the coding is extremely simple and clean for any one taking a look.
  • The program does not fill the treeview with all the folders in the drives at startup, but only fills when needed (contrary to what is done in most of the code available in famous books and sites). Infact, some intelligent work has been done to achieve this. Each tree node is filled when it gets expanded and all the folders in the node containing sub folders are filled with a dummy node. This makes it updated during the execution of program.
  • Object Oriented design makes it extremely easy to make other software requiring the same functionality, e.g., classes FrazIO and Library can together be used to make My Computer like utility containing only ListView Control.
  • Finally and more importantly, by understanding the code, any programmer can learn how the windows form controls are used, how file/folders are managed, event handling is done and code is managed in C-Sharp.

Next Recommended Readings