📄 accountstatusdropdownlist.cs
字号:
//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
// Copyright (c) Telligent Systems Corporation. All rights reserved.
// </copyright>
//------------------------------------------------------------------------------
using System.Web.UI.WebControls;
using CommunityServer.Components;
namespace CommunityServer.Controls
{
public class AccountStatusDropDownList : DropDownList
{
public AccountStatusDropDownList()
{
// Add countries
//
}
public override void DataBind()
{
base.DataBind ();
if(!Page.IsPostBack)
{
if (EnableShowAll)
Items.Add(new ListItem(ResourceManager.GetString("AccountStatus_NotFiltered"), ((int) UserAccountStatus.All).ToString()));
Items.Add(new ListItem(ResourceManager.GetString("AccountStatus_Approved"), ((int) UserAccountStatus.Approved).ToString()));
Items.Add(new ListItem(ResourceManager.GetString("AccountStatus_ApprovalPending"), ((int) UserAccountStatus.ApprovalPending).ToString()));
Items.Add(new ListItem(ResourceManager.GetString("AccountStatus_Banned"), ((int) UserAccountStatus.Banned).ToString()));
Items.Add(new ListItem(ResourceManager.GetString("AccountStatus_Disapproved"), ((int) UserAccountStatus.Disapproved).ToString()));
}
}
public new UserAccountStatus SelectedValue
{
get { return (UserAccountStatus) int.Parse(base.SelectedValue); }
set { base.SelectedValue = ((int) value).ToString(); }
}
private bool _enableShowAll;
public bool EnableShowAll
{
get { return _enableShowAll; }
set { _enableShowAll = value; }
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -