📄 gallerygroupadmin.cs
字号:
//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
// Copyright (c) Telligent Systems Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
using System.Collections;
using CommunityServer.Components;
using CommunityServer.Controls;
using CommunityServer.Galleries.Components;
namespace CommunityServer.Galleries.Controls
{
/// <summary>
/// Provides custom gallery implementation of GroupAdmin
/// </summary>
public class GalleryGroupAdmin : GroupAdmin
{
public GalleryGroupAdmin()
{
}
/// <summary>
/// Returns the curretn gallery group
/// </summary>
/// <returns></returns>
protected override Group CurrentSectionGroup()
{
if(CSContext.Current.User.IsGalleryAdministrator)
return Galleries.GetGalleryGroup( CSContext.Current.ForumGroupID, false, true);
else
throw new CSException( CSExceptionType.AdministrationAccessDenied );
}
protected override ArrayList GetGroups()
{
return Galleries.GetGalleryGroups(false, true, this.IsEdit);
}
/// <summary>
/// Returns the ResourceName/Title for the control
/// </summary>
protected override string ResourceName
{
get
{
return "Gallery_Group_Group";
}
}
protected override string DeleteResourceName
{
get
{
return "GalleryGroup_DeleteGroupVerify";
}
}
/// <summary>
/// Returns the redirect Url
/// </summary>
/// <returns></returns>
protected override string RedirectUrl()
{
return GalleryUrls.Instance().Admin_ManageGalleries;
}
/// <summary>
/// Returns true if the Group has Sections
/// </summary>
protected override bool HasChildSections
{
get
{
return Galleries.GetGalleriesByGroupID(CurrentSectionGroup().GroupID,true,true,false).Count > 0;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -