private void ConfirmExitApplication(object sender, EventArgs eventArgs)
{
if (Settings.ConfirmExit)
{
var dialog =
new YesNoDialog(
"Are you sure you want to exit? SDownload requires this application to be running in order to download any songs!",
"Close", "Cancel", CheckBoxState.NotChecked)
{
ResponseCallback = result =>
{
if (result)
Exit();
},
CheckBoxSettingCallback = result => Settings.ConfirmExit = !result
};
dialog.Show();
}
else
Exit();
}