Hi ALL I'm having trouble figuring out..
I have one BTNCANCEL here and cmb1,cmb2,cm3, tb1,tb2.
How do i program so that it detect changes in cmb1,cmb2,cm3, tb1,tb2 and then when i click BTN cancel it will PROMPT to save yes/no [which i have already programed] if there is a change in either one of this[cmb1,cmb2,cm3, tb1,tb2] in runtime. and the program will close if there is no changes.
with reference to stored value in text file data.
[when I debug, the value stored in text file is displayed in cmb1,cmb2,cmb3,tb1,tb2]
So i would like to know how to do a program to BTNCANCEL_Click
that when it detected changes:
if (detect change)
{
using (SaveSetting settings = new SaveSetting())
{
//read properties from dialogue
//when dialogue is yes it will run save and exit application
if (settings.ShowDialog() == DialogResult.Yes)
{
save();
Application.Exit();
}
}
}
else
{
Close();
}
}