Developing User Interfaces
CMSC 498B
Spring 2005
Prof. Ben Bederson
Project #1
Due February 24, 2005


Purpose

The purpose of this program is to gain familiarity with C#, Visual Studio, the VS form designer, standard widgets, and basic event handling and layout.

The Problem

You must create an application that performs the basic features of Windows Explorer, the standard file browser.

The requirements of the project are:

This project will be graded 80% on correctness and 20% on style.  Style includes:

C# Hints

1. Consider using System.Windows.Forms.FolderBrowserDialog to browse files.

2. // Necessary to make all controls use proper visual styles
// Call this on every Form.  And before Application.Run(), call:
//   Application.EnableVisualStyles();
//   Application.DoEvents(); // Workaround for bug with icons in toolbars when visual styles are enabled
static public void SetFlatStyleSystem(Control parent) {
    foreach (Control control in parent.Controls) {
            // Only these controls have a FlatStyle property
        ButtonBase button = control as ButtonBase;
        GroupBox group = control as GroupBox;
        Label label = control as Label;
        if (button != null) {
            button.FlatStyle = FlatStyle.System;
        } else if (group != null) {
            group.FlatStyle = FlatStyle.System;
        } else if (label != null) {
            label.FlatStyle = FlatStyle.System;
        }

        // Set contained controls FlatStyle, too
        SetFlatStyleSystem(control);
    }
}

3. There is a bug in the TreeView control where a non-themed and incorrectly set up horizontal scrollbar appears sometimes.  It turns out that this only happens if the contents of the TreeView is populated before the the control is activated.  The workaround is to delay populating the control until the Form.Load event (rather than in the Form constructor).

Submitting

Submit following the same rules as HW #0, but make the subject line of your email contain "DUI: Proj #1 submission".  As before, any submissions after the deadline will be ignored.  If multiple submissions are made, then only the last one before the deadline will be looked at.

The zip file you submit must contain all files within a directory named "proj1-<name>.zip" where you replace <name> with your last name.