fix skin loader preview

This commit is contained in:
Michael 2017-04-15 09:13:08 -04:00
parent 0bc8eef195
commit 1a3a9b4a4c

View file

@ -47,12 +47,20 @@ namespace ShiftOS.WinForms.Applications
public Skin_Loader()
{
InitializeComponent();
SetupControls(pnlborder);
SetupControls(pnldesktop);
LoadedSkin = JsonConvert.DeserializeObject<Skin>(JsonConvert.SerializeObject(SkinEngine.LoadedSkin));
this.Load += (o, a) => { SetupUI(); };
}
public void SetupControls(Control ctrl)
{
ctrl.Tag = "keepbg keepfg keepfont";
foreach (Control c in ctrl.Controls)
SetupControls(c);
}
public Skin LoadedSkin { get; set; }
public void SetupUI()
@ -318,6 +326,7 @@ namespace ShiftOS.WinForms.Applications
public void OnSkinLoad()
{
SetupUI();
}
public bool OnUnload()
@ -327,6 +336,7 @@ namespace ShiftOS.WinForms.Applications
public void OnUpgrade()
{
SetupUI();
}
}
}