J. Buelna - Houston said:
Hello cashdeskmac,
Here's how I've done it in the past.
Create a class with a static constructor that will hold a Check.IsSaved
property:
public Check
{
static Check() {}
private string _isSaved = "";
public bool IsSaved
{
set { _isSaved = value; }
get { return _isSaved; }
}
// other static check values...
}
Whenever data has changed, change the IsSaved property to false.
Whenever a file is saved, change the IsSaved status to true.
Finally, check the IsSaved property when the application is about to
close and take the appropriate action/inaction.
Handlers on component and application events will make this a snap.
J. Buelna - Houston, TX