albumcategorizationvalidator.cs

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

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

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

namespace CommunityServer.ControlPanel.Photos
{
	/// <summary>
	/// Summary description for AlbumCategorizationValidator.
	/// </summary>
	public class AlbumCategorizationValidator : IMenuItem
	{
		public bool IsValid(HttpContext context)
		{
			CommunityServer.ControlPanel.UI.BaseGalleryPage page = HttpContext.Current.Handler as CommunityServer.ControlPanel.UI.BaseGalleryPage;
			if (page != null && page.CurrentGallery != null)
				return page.CurrentGallery.CategorizationType == CategorizationType.Album;
			else
				return false;
		}
	}
}

⌨️ 快捷键说明

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