CPS613

Module 02-ControlCenter

Toronto Metropolitan University University

Learning Objectives

In this module you will learn how to
  • implement a control center for prototypes that can be used to launch seemingly asynchronous events
  • learn how to use DataGridView controls
  • implement Random components

Module Description:

Summary

In this module you will be modifying a control center to make it launch three windows: one straignt away, one with a set delay, and one at an unexpected time within a time range.

User Interface and Interaction

The application will behave like ModuleControlCenter.zip.

In particular

  1. The Now and Go buttons will launch windows named Window1, Window2, and so on. The windows are numbered in the order in which the buttons are pressed even if the windows are not immediately visible.

    • Now button - shows new window immediately.
    • First Go button - will show a new window in the specified number of minutes.
    • Second Go buttom - will calculate a random number of seconds in the range specified on the same line, and show a new window after that calculated delay. For example, if a period of 1 to 4 minutes (i.e. 60 seconds to 240 seconds) is specified, a random number between 60 and 240 is generated and a new window is shown after that number of seconds.

  2. The table at the bottom shows the lineup of windows as they are being requested. Each window is described on its own row which displays the window number and the time at which it will be shown. The colour of the row indicates the status of the window:
    • Blue if the window has not been shown yet,
    • Black if the window is now visible,
    • Grey if the window was shown and closed.
  3. Note that the table is scrollable but selecting a row in that table has no effect.

Implementation Details

Note that this module is already partially implemented for you. You can download the code from the Handouts section below. The forms that you need have already been designed, and some of the code has also been written. The remaining challenges are to implement the delays specified by the users and to manage the table which lists all the windows. This table is implemented using a DataGridView control.

Handouts

In the Handouts directory you will find:

References

References for this module are in the Miscellaneous Information Reference and in the Microsoft page for the DataGridView Control
Explanations of all VB features needed for all the modules can be found at the General Assignment References page


This page is maintained by Sophie Quigley (cps613@cs.torontomu.ca)
Last modified Thursday, 20-Oct-2022 00:43:35 EDT