Habanero.Faces.Base.DateTimePickerMapper.InitialiseWithAttributes C# (CSharp) Method

InitialiseWithAttributes() protected method

Initialises the control using the attributes already provided, using ControlMapper.SetPropertyAttributes.
protected InitialiseWithAttributes ( ) : void
return void
        protected override void InitialiseWithAttributes()
        {
            if (_attributes.Contains("dateFormat"))
            {
                String dateFormat = Convert.ToString(_attributes["dateFormat"]);
                if (dateFormat.ToLower()=="d")
                {
                    _picker.Format = DateTimePickerFormat.Short;
                }
                else
                {
                    _picker.Format = DateTimePickerFormat.Custom;
                    _picker.CustomFormat = dateFormat;
                }
                //DateTimePickerUtil.SetCustomFormat(_dateTimePicker, dateFormat);
			}
			if (_attributes.Contains("showUpDown"))
			{
				bool showUpDown = Convert.ToBoolean(_attributes["showUpDown"]);
				_picker.ShowUpDown = showUpDown;
				//DateTimePickerUtil.SetShowUpDown(_dateTimePicker, showUpDown);
			}
			if (_attributes.Contains("showCheckBox"))
			{
				bool showCheckBox = Convert.ToBoolean(_attributes["showCheckBox"]);
				_picker.ShowCheckBox = showCheckBox;
			}
            base.InitialiseWithAttributes();
        }