예제 #1
0
파일: Slider.cs 프로젝트: AIBrain/ochregui
        // /////////////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// Construct a Slider instance using the specified template
        /// </summary>
        /// <param name="template"></param>
        public Slider(SliderTemplate template)
            : base(template)
        {
            MinimumValue = template.MinimumValue;
            MaximumValue = template.MaximumValue;

            Label = template.Label;
            if (Label == null)
            {
                Label = "";
            }

            CurrentValue = template.StartingValue;
            if (CurrentValue < MinimumValue || CurrentValue > MaximumValue)
            {
                CurrentValue = MinimumValue;
            }

            HasFrame = true;
            CanHaveKeyboardFocus = false;
            HilightWhenMouseOver = false;

            BarPigment = template.BarPigment;
        }
예제 #2
0
파일: Slider.cs 프로젝트: vanattab/ochregui
        // /////////////////////////////////////////////////////////////////////////////////
        #endregion
        #region Constructors
        // /////////////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// Construct a Slider instance using the specified template
        /// </summary>
        /// <param name="template"></param>
        public Slider(SliderTemplate template)
            : base(template)
        {
            MinimumValue = template.MinimumValue;
            MaximumValue = template.MaximumValue;

            Label = template.Label;
            if (Label == null)
            {
                Label = "";
            }

            CurrentValue = template.StartingValue;
            if (CurrentValue < MinimumValue || CurrentValue > MaximumValue)
            {
                CurrentValue = MinimumValue;
            }

            HasFrame             = true;
            CanHaveKeyboardFocus = false;
            HilightWhenMouseOver = false;

            BarPigment = template.BarPigment;
        }