//------------------------------------------------------------------------------
// <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 {
    /// <summary>
    /// Summary description for YesNoRadioButtonList.
    /// </summary>
    public class GenderRadioButtonList : RadioButtonList {

        public GenderRadioButtonList () {
            Items.Add( new ListItem( CommunityServer.Components.ResourceManager.GetString("NotSet"), ((int) Gender.NotSet).ToString() ) );
            Items.Add( new ListItem( CommunityServer.Components.ResourceManager.GetString("Male"), ((int) Gender.Male).ToString() ) );
            Items.Add( new ListItem( CommunityServer.Components.ResourceManager.GetString("Female"), ((int) Gender.Female).ToString() ) );
        }

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

    }
}
