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

📄 aboutoptions.aspx.cs

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

using System;
using System.Web.UI.WebControls;
using CommunityServer.Blogs.Components;
using CommunityServer.ControlPanel.Components;
using CommunityServer.ControlPanel.Controls;
using CommunityServer.ControlPanel.UI;
using CommunityServer.Controls;
using FormLabel = CommunityServer.ControlPanel.Controls.FormLabel;
using HelpIcon = CommunityServer.ControlPanel.Controls.HelpIcon;
using ResourceControl = CommunityServer.ControlPanel.Controls.ResourceControl;
using ResourceLinkButton = CommunityServer.ControlPanel.Controls.ResourceLinkButton;

namespace CommunityServer.ControlPanel.Blogs
{
	/// <summary>
	/// Summary description for PostEditorPage.
	/// </summary>
	public class AboutOptionsPage : BaseBlogPage
	{

		#region Child Controls

        protected TextBox AboutTitle;
        protected Editor AboutDescription;
		protected ConfigOKStatusMessage Status;
		protected ResourceLinkButton SaveButton;
		protected ControlPanelSelectedNavigation SelectedNavigation1;
		protected ResourceControl Resourcecontrol1;
		protected MPContent DescriptionRegion;
		protected ResourceControl Resourcecontrol2;
		protected HelpIcon Helpicon1;
		protected FormLabel FormLabel1;
		protected HelpIcon Helpicon2;
		protected FormLabel FormLabel2;
		protected MPContent TaskRegion;
		protected MPContainer MPContainer;
		protected YesNoRadioButtonList ynEnableAbout;
	
		#endregion

		private void Page_Load(object sender, EventArgs e)
		{
            
			SaveButton.Text = ResourceManager.GetString("Save");

			if(!IsPostBack)
			{
				ynEnableAbout.SelectedValue = this.CurrentWeblog.EnableAbout;
				AboutTitle.Text = this.CurrentWeblog.AboutTitle;
                AboutDescription.Text = this.CurrentWeblog.AboutDescription;
			}
		}

		override protected void OnInit(EventArgs e)
		{
			this.Load += new EventHandler(this.Page_Load);
			base.OnInit(e);
			this.SaveButton.Click += new EventHandler(this.SaveButton_Click);
		}

		private void InitializeComponent()
		{
		
		}
		
        private void SaveButton_Click(object sender, EventArgs e)
        {
            if(Page.IsValid)
            {
				CurrentWeblog.AboutTitle = AboutTitle.Text;
                CurrentWeblog.AboutDescription = AboutDescription.Text;
				CurrentWeblog.EnableAbout = ynEnableAbout.SelectedValue;

            	Weblogs.Update(CurrentWeblog);
				
				Status.Success = true;
				Status.Visible = true;
            }
        }
	}
}

⌨️ 快捷键说明

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