diff options
Diffstat (limited to 'source/WindowsFormsApplication1/SkinEngine')
3 files changed, 15 insertions, 8 deletions
diff --git a/source/WindowsFormsApplication1/SkinEngine/ShiftOSColorTable.cs b/source/WindowsFormsApplication1/SkinEngine/ShiftOSColorTable.cs index f74b7c2..fdf840b 100644 --- a/source/WindowsFormsApplication1/SkinEngine/ShiftOSColorTable.cs +++ b/source/WindowsFormsApplication1/SkinEngine/ShiftOSColorTable.cs @@ -4,7 +4,7 @@ // </auto-generated> using System.Drawing; -using System.Windows.Forms; +using ShiftUI; namespace ShiftOS { diff --git a/source/WindowsFormsApplication1/SkinEngine/WindowComposition.cs b/source/WindowsFormsApplication1/SkinEngine/WindowComposition.cs index 18fe2d1..99fd813 100644 --- a/source/WindowsFormsApplication1/SkinEngine/WindowComposition.cs +++ b/source/WindowsFormsApplication1/SkinEngine/WindowComposition.cs @@ -5,7 +5,7 @@ using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; -using System.Windows.Forms; +using ShiftUI; namespace ShiftOS { @@ -13,7 +13,7 @@ namespace ShiftOS { private static bool _CanClose = true; public static bool ShuttingDown = false; - public static bool SafeToAddControls = true; + public static bool SafeToAddWidgets = true; public static bool CanClose { @@ -57,7 +57,7 @@ namespace ShiftOS t.Start(); } - public static void ScaleWidget(Control ctrl, int width, int height) + public static void ScaleWidget(Widget ctrl, int width, int height) { ctrl.Size = new Size(0, 0); var t = new Timer(); diff --git a/source/WindowsFormsApplication1/SkinEngine/skins.cs b/source/WindowsFormsApplication1/SkinEngine/skins.cs index 8dcaea2..72f5021 100644 --- a/source/WindowsFormsApplication1/SkinEngine/skins.cs +++ b/source/WindowsFormsApplication1/SkinEngine/skins.cs @@ -4,7 +4,7 @@ using Newtonsoft.Json; using System; using ShiftOS; using System.IO.Compression; -using System.Windows.Forms; +using ShiftUI; using System.Collections.Generic; using System.Drawing.Imaging; @@ -568,9 +568,16 @@ namespace Skinning 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(); + try + { + string panels = File.ReadAllText(Paths.LoadedSkin + "panels.json"); + loadedSkin.DesktopPanels = JsonConvert.DeserializeObject<List<DesktopPanel>>(panels); + LoadPanels(); + } + catch + { + + } } loadimages(); LoadEmbeddedNamePack(); |
