Browse Source

Handle NotSupportedException on invalid icon format

pull/30/head
Daniel Grunwald 13 years ago
parent
commit
6f61f7981d
  1. 5
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ApplicationSettings.xaml.cs

5
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/ProjectOptions/ApplicationSettings.xaml.cs

@ -14,6 +14,7 @@ using System.Windows; @@ -14,6 +14,7 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Editor;
@ -245,6 +246,10 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -245,6 +246,10 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
Image = null;
MessageService.ShowErrorFormatted("${res:Dialog.ProjectOptions.ApplicationSettings.InvalidIconFile}",
FileUtility.NormalizePath(appIconPath));
} catch (NotSupportedException) {
Image = null;
MessageService.ShowErrorFormatted("${res:Dialog.ProjectOptions.ApplicationSettings.InvalidIconFile}",
FileUtility.NormalizePath(appIconPath));
}
} else {
Image = null;

Loading…
Cancel
Save