#if FRAMEWORK20
using System;
using System.Windows.Forms.Design;
using System.Text;
using DevComponents.DotNetBar;
using DevComponents.Editors;
namespace DevComponents.DotNetBar.Design
{
    /// 
    /// Represents the base designer for the NumericInputBase controls.
    /// 
    public class NumericInputBaseDesigner : VisualControlBaseDesigner
    {
        #region Private Variables
        #endregion
        #region Constructor
        /// 
        /// Initializes a new instance of the NumericInputBaseDesigner class.
        /// 
        public NumericInputBaseDesigner()
        {
            this.AutoResizeHandles = true;
        }
        #endregion
        #region Internal Implementation
        public override void InitializeNewComponent(System.Collections.IDictionary defaultValues)
        {
            NumericInputBase c = this.Control as NumericInputBase;
            if (c != null)
            {
                c.ShowUpDown = true;
                c.AutoOverwrite = false;
                c.ButtonFreeText.Shortcut = eShortcut.F2;
            }
            base.InitializeNewComponent(defaultValues);
        }
        public override System.Windows.Forms.Design.SelectionRules SelectionRules
        {
            get
            {
                SelectionRules rules = base.SelectionRules;
                if (!this.Control.AutoSize)
                {
                    rules &= ~(SelectionRules.BottomSizeable | SelectionRules.TopSizeable);
                }
                return rules;
            }
        }
        #endregion
    }
}
#endif