aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/Applications/Skin Loader.cs
diff options
context:
space:
mode:
authorMichael VanOverbeek <[email protected]>2017-05-05 11:54:14 -0400
committerGitHub <[email protected]>2017-05-05 11:54:14 -0400
commit9a2373ec42faeef719cff1c7076af87ef44179a7 (patch)
tree2afba9246adeca69cffc98b77eb4183f680c6165 /ShiftOS.WinForms/Applications/Skin Loader.cs
parentbbc5a738b1b3d86d2a71c1188fad89b533f251ce (diff)
parent2fede89938014129cf50d66d5ff62af1bde4a477 (diff)
downloadshiftos_thereturn-9a2373ec42faeef719cff1c7076af87ef44179a7.tar.gz
shiftos_thereturn-9a2373ec42faeef719cff1c7076af87ef44179a7.tar.bz2
shiftos_thereturn-9a2373ec42faeef719cff1c7076af87ef44179a7.zip
Merge pull request #119 from AShifter/master
fix advanced fs
Diffstat (limited to 'ShiftOS.WinForms/Applications/Skin Loader.cs')
-rw-r--r--ShiftOS.WinForms/Applications/Skin Loader.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/ShiftOS.WinForms/Applications/Skin Loader.cs b/ShiftOS.WinForms/Applications/Skin Loader.cs
index 1f09e4a..f9857b7 100644
--- a/ShiftOS.WinForms/Applications/Skin Loader.cs
+++ b/ShiftOS.WinForms/Applications/Skin Loader.cs
@@ -313,7 +313,15 @@ namespace ShiftOS.WinForms.Applications
{
AppearanceManager.SetupDialog(new FileDialog(new[] { ".skn" }, FileOpenerStyle.Open, new Action<string>((filename) =>
{
- LoadedSkin = JsonConvert.DeserializeObject<Skin>(ShiftOS.Objects.ShiftFS.Utils.ReadAllText(filename));
+ try
+ {
+ LoadedSkin = JsonConvert.DeserializeObject<Skin>(ShiftOS.Objects.ShiftFS.Utils.ReadAllText(filename));
+ }
+ catch
+ {
+ Infobox.Show("Invalid Skin", "This skin is not compatible with this version of ShiftOS.");
+ }
+
SetupUI();
})));
}