DialogResultresult=MessageBox.Show("There is a patch loaded. Do you want to apply this patch before exit?","Close",MessageBoxButtons.YesNoCancel);
if(result==DialogResult.Yes)
{
patchManager.SavePatch();
MessageBox.Show("Patch applied!");
Clear();
}
else
if(result==DialogResult.Cancel)
{
e.Cancel=true;
}
}
//if (patchManager.patches.Count > 0)
//{
// DialogResult result = MessageBox.Show("There is a patch loaded. Do you want to apply this patch before exit?", "Close", MessageBoxButtons.YesNoCancel);
if(MessageBox.Show("You are in the middle of a patch apply. You need to resolve, skip or abort this patch.\nAre you sure to exit now?","Exit",MessageBoxButtons.YesNo)==DialogResult.Yes)