Introduction
DiskSize is a program to scan a local drive and display the results in a treeview and on a 3D pie chart. It uses only the .NET Framework and Windows API functions, no third party products.
After scanning your local drive, the results are both displayed and cached in an XML file. Refreshing the entire drive or a single subdirectory will result in updating the cache. Subsequent loads will load from the cache.
The Explorer interface provides drill down functionality using either the treeview or the pie chart. A context menu is displayed which allows rescanning, exploring and opening directories and drives. This application uses a string resource file so it can be easily internationalized.
Points of interest
Demonstrated in this application are the following:
- Iterating through the file system and storing the results in XML.
- Saving and loading XML.
- Binding a
TreeView
to XML.
- Creating a 3D Pie chart with pie slice highlighting and selection.
- Custom sorting by implementing the
IComparable
interface.
- Implementing a drop-down list in a toolbar.
- Binding lists to custom name-value pairs.
- Internationalizing an application.
Background
I've wanted an application like this for some time. It is very helpful if disk space is limited and you want to quickly find out where your disk space has gone. I find myself now cheating and using the pie chart to navigate around my machine and then selecting open when I am at the directory I am looking for.