⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 skinoptions.aspx.cs

📁 community server 源码
💻 CS
字号:
//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using CommunityServer.ControlPanel.Controls.Galleries;
using CommunityServer.ControlPanel.UI;
using CommunityServer.Controls;
using CommunityServer.Galleries.Components;
using ResourceLinkButton = CommunityServer.ControlPanel.Controls.ResourceLinkButton;
using ResourceControl = CommunityServer.ControlPanel.Controls.ResourceControl;
using StatusMessage = CommunityServer.ControlPanel.Controls.StatusMessage;

namespace CommunityServer.ControlPanel.Photos.Options
{
	/// <summary>
	/// Summary description for SkinsOptionsPage.
	/// </summary>
	public class SkinsOptionsPage : BaseGalleryPage
	{

		#region Child Controls

		protected SkinOptionsControl Skin1;
		protected SkinOptionsCSSControl CSS1;
		protected MPContent DescriptionRegion;
		protected MPContent TaskRegion;
		protected MPContainer MPContainer;
		protected Script Script1;
		protected Script Script2;
		protected ResourceLinkButton SaveButton;
		protected ResourceControl Resourcecontrol1;
		protected ResourceControl Resourcecontrol2;
		protected StatusMessage Status;
		protected SkinOptionsLayoutControl Layout1;

		#endregion

		private void Page_Load(object sender, EventArgs e)
		{
			if(!IsPostBack)
			{
				Skin1.Gallery = CSS1.Gallery = Layout1.Gallery = CurrentGallery;
			}
		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
			this.SaveButton.Click += new EventHandler(SaveButton_Click);
		}
		
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{    
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion

        private void SaveButton_Click(object sender, EventArgs e)
        {
            if(Page.IsValid && GalleryConfiguration.Instance().EnableThemes)
            {
				Skin1.GetFormValues(CurrentGallery); 
				CSS1.GetFormValues(CurrentGallery); 
				Layout1.GetFormValues(CurrentGallery); 
				
            	CommunityServer.Galleries.Galleries.Update(CurrentGallery);

				Skin1.SetSelectedTheme(CurrentGallery) ;

				Status.Success = true;
				Status.Text = "Your changes have been saved successfully";
				Status.Visible = true;
			}
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -