|
Code to track if a dialog contains modified controls
has been messy, error prone and all over the place. Adding
a control to a dialog required adding multiple fields to
the dialog class and adding new code in multiple places.
This is an approach to create a centralized facility that
would only require adding all controls of a dialog to
the monitor in one place, and then defining a callback
to get informed when the validity or content of the whole
form changes.
The monitor class will also remember the original state
of the dialog, so you can tell if the user undoes their
changes manually.
|