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

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

namespace CommunityServer.Controls
{
	public class DisplayLevelDropDownList: DropDownList
	{
		public DisplayLevelDropDownList()
		{
			Items.Add(new ListItem(ResourceManager.GetString("Utility_DisplayLevel_None"), ((int)DisplayLevel.None).ToString()));
			Items.Add(new ListItem(ResourceManager.GetString("Utility_DisplayLevel_Everyone"), ((int)DisplayLevel.Everyone).ToString()));
			Items.Add(new ListItem(ResourceManager.GetString("Utility_DisplayLevel_AdminsAndMods"), ((int)DisplayLevel.AdministratorsAndModerators).ToString()));
		}

		public new DisplayLevel SelectedValue
		{
			get { return (DisplayLevel) int.Parse(base.SelectedValue); }
			set { base.SelectedValue = ((int)value).ToString(); }
		}
	}
}
