diff options
| author | MichaelTheShifter <[email protected]> | 2016-07-19 14:04:41 -0400 |
|---|---|---|
| committer | MichaelTheShifter <[email protected]> | 2016-07-19 14:04:41 -0400 |
| commit | 9322701aa1eae9596a8586ef19a0fe1d1b3ab66b (patch) | |
| tree | 6a7d1d82df076b285c2376ac2e18354dd7416725 /source/WindowsFormsApplication1/SkinEngine | |
| parent | 98fe96c5d3e5ee1bb3b2eaa38c9346977b4ad713 (diff) | |
| download | shiftos-c--9322701aa1eae9596a8586ef19a0fe1d1b3ab66b.tar.gz shiftos-c--9322701aa1eae9596a8586ef19a0fe1d1b3ab66b.tar.bz2 shiftos-c--9322701aa1eae9596a8586ef19a0fe1d1b3ab66b.zip | |
Initial commit.
Diffstat (limited to 'source/WindowsFormsApplication1/SkinEngine')
| -rw-r--r-- | source/WindowsFormsApplication1/SkinEngine/skins.cs | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/source/WindowsFormsApplication1/SkinEngine/skins.cs b/source/WindowsFormsApplication1/SkinEngine/skins.cs index 206646f..8dcaea2 100644 --- a/source/WindowsFormsApplication1/SkinEngine/skins.cs +++ b/source/WindowsFormsApplication1/SkinEngine/skins.cs @@ -10,6 +10,7 @@ using System.Drawing.Imaging; namespace Skinning { + [Obsolete("ShiftOS is moving to the new ShiftUI framework which has a built-in skinning engine. This Skin class is mostly un-needed now.")] public class Skin { //Widget Positions public string ALPosition = "Top"; @@ -561,29 +562,21 @@ namespace Skinning /// </summary> public static void loadskin() { - if(Directory.Exists(Paths.LoadedSkin)) + if (Directory.Exists(Paths.LoadedSkin)) { - try { - string rawData = File.ReadAllText(Paths.LoadedSkin + "data.json"); - loadedSkin = JsonConvert.DeserializeObject<Skin>(rawData); - if (File.Exists(Paths.LoadedSkin + "panels.json")) - { - string panels = File.ReadAllText(Paths.LoadedSkin + "panels.json"); - loadedSkin.DesktopPanels = JsonConvert.DeserializeObject<List<DesktopPanel>>(panels); - LoadPanels(); - } - loadimages(); - LoadEmbeddedNamePack(); - } - catch + string rawData = File.ReadAllText(Paths.LoadedSkin + "data.json"); + loadedSkin = JsonConvert.DeserializeObject<Skin>(rawData); + if (File.Exists(Paths.LoadedSkin + "panels.json")) { - //No skin to load. - loadedSkin = new Skin(); - loadedskin_images = new Images(); - saveskin(); - + string panels = File.ReadAllText(Paths.LoadedSkin + "panels.json"); + loadedSkin.DesktopPanels = JsonConvert.DeserializeObject<List<DesktopPanel>>(panels); + LoadPanels(); } - } else + loadimages(); + LoadEmbeddedNamePack(); + + } + else { loadedSkin = new Skin(); loadedskin_images = new Images(); |
