In Chapter 15, we greatly improved the usefulness of the SRS application by providing a means for persisting the state of Student objects—in particular, their enrollment status in various classes—from one SRS invocation to the next. However, we still haven't provided a means by which a student user can interact with the SRS. As it's currently implemented, we launch the application from the command line by running the SRS executable, and from then on the application runs to completion without any further user input, relying solely on ASCII files and/or hard-coded information as its "fuel" (data).
In this chapter, we're going to enhance our latest version of the SRS application once again by retrofitting a graphical user interface (GUI) front-end. With the GUI that we add, we'll provide hypothetical student users with the capability to
Log on to the SRS.
View the schedule of sections available for registration in the current semester.
View and modify their individual course load by dropping and adding sections of courses that they are eligible to attend.
Save these changes to a file before logging off again.
In this chapter, you'll learn
The basics of C# GUI composition and event handling
What the GUI classes in the System.Windows.Forms and System.Drawing namespaces have to offer
Details about a number of FCL GUI classes
A recommended architecture for C# GUI applications
The importance of developing a concept of operations of how the GUI is to look, operate, and "flow" before any code is written
How to retrofit a GUI to an existing application, using our SRS application from Chapter 15 as an example
Note?/td> |
It's important to remember when reading this chapter that it's only meant to provide an introduction to C# GUIs. Our goal is to teach you how to create a simple, yet completely functional, GUI front-end for our SRS application. With this goal in mind, we're only going to cover that subset of available GUI classes that we'll need for building the SRS; furthermore, we'll only cover those features of these classes that we'll be taking advantage of in building the SRS. Nonetheless, you'll gain valuable insights into the fundamentals of C# GUI building and event handling. After you've finished reading this chapter and mastering the basics of C# GUI development, we suggest that you pay a visit to the .NET Framework SDK documentation and look specifically at the contents of the GUI-related namespaces. |