forumlinkbar.cs

来自「community server 源码」· CS 代码 · 共 42 行

CS
42
字号
//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System.Web.UI;
using CommunityServer.Components;
using CommunityServer.Controls;

namespace CommunityServer.Discussions.Controls
{
	/// <summary>
	/// Summary description for ForumLinkBar.
	/// </summary>
	public class ForumLinkBar : TemplatedWebControl
	{
		public ForumLinkBar()
		{
		}

	    /// <summary>
	    /// Override this method to attach templated or external skin controls to local references.
	    /// </summary>
	    /// <remarks>
	    /// This will only be called if the non-default skin is used.
	    /// </remarks>
	    protected override void AttachChildControls()
	    {
			CSContext csContext = CSContext.Current;

	        Control cntrl =   FindControl("AuthUserOnly");
            if(cntrl != null) 
                cntrl.Visible = !csContext.User.IsAnonymous;

			Control cntrl2 =   FindControl("TaggingOnly");
			if(cntrl2 != null) 
				cntrl2.Visible = CommunityServer.Discussions.Components.ForumConfiguration.Instance().EnableTagging;
	    }
	}
}

⌨️ 快捷键说明

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