protected void Page_Load(object sender, EventArgs e) { if (User.GetCurrent().GetApplications().Find(t => string.Equals(t.alias, Constants.Applications.Settings, StringComparison.OrdinalIgnoreCase)) == null) { throw new Exception("The current user can't edit skins as the user doesn't have access to the Settings section!"); } NodeFactory.Node n = NodeFactory.Node.GetCurrent(); ActiveSkin = Skin.CreateFromAlias(Skinning.GetCurrentSkinAlias(n.template)); pnl_connectionerror.Visible = false; //load dependencies if (ActiveSkin != null && ActiveSkin.Dependencies.Count > 0) { LoadDependencies(); } else { //show skin selection pCustomizeSkin.Visible = false; ltCustomizeSkinStyle.Text = ltChangeSkinStyle.Text; ltChangeSkinStyle.Text = string.Empty; } LoadSkins(); }
protected void Page_Load(object sender, EventArgs e) { if (User.GetCurrent().GetApplications().Find(t => string.Equals(t.alias, Constants.Applications.Settings, StringComparison.OrdinalIgnoreCase)) == null) { throw new Exception("The current user can't edit skins as the user doesn't have access to the Settings section!"); } NodeFactory.Node n = NodeFactory.Node.GetCurrent(); ActiveSkin = Skin.CreateFromAlias( Skinning.GetCurrentSkinAlias(n.template) ); pnl_connectionerror.Visible = false; //load dependencies if (ActiveSkin != null && ActiveSkin.Dependencies.Count > 0) LoadDependencies(); else { //show skin selection pCustomizeSkin.Visible = false; ltCustomizeSkinStyle.Text = ltChangeSkinStyle.Text; ltChangeSkinStyle.Text = string.Empty; } LoadSkins(); }