private bool PromptToSaveIfRequired()
{
if (this.State == ThemeManagerWindowState.UserThemeEdited)
{
MessageBoxResult result = MessageBox.Show(
this /* owner */,
Properties.Resources.ThemeManagerWindowSavePrompt,
Properties.Resources.MessageBoxTitle,
MessageBoxButton.YesNoCancel,
MessageBoxImage.Question);
switch (result)
{
case MessageBoxResult.Yes:
this.SaveChanges();
return true;
case MessageBoxResult.No:
return true;
case MessageBoxResult.Cancel:
return false;
}
}
return true;
}