コード例 #1
0
        public Factory.SliderPropHandlerFactory.SliderProperties GetSliderProperties(StyleOption option)
        {
            Factory.SliderPropHandlerFactory.SliderProperties sliderProperties = new Factory.SliderPropHandlerFactory.SliderProperties();
            System.Type type = option.GetType();
            System.Reflection.PropertyInfo prop = type.GetProperty(PropName);
            sliderProperties.Value         = (int)prop.GetValue(option, null);
            sliderProperties.Maximum       = 100;
            sliderProperties.TickFrequency = 1;

            return(sliderProperties);
        }
コード例 #2
0
        public Factory.SliderPropHandlerFactory.SliderProperties GetSliderProperties(StyleOption option)
        {
            Factory.SliderPropHandlerFactory.SliderProperties sliderProperties = new Factory.SliderPropHandlerFactory.SliderProperties();
            int optValue = option.BlurDegree;

            sliderProperties.Value         = (optValue == 0) ? 0 : (optValue - 50) * 2;
            sliderProperties.Maximum       = 100;
            sliderProperties.TickFrequency = 2;

            return(sliderProperties);
        }
コード例 #3
0
        public Factory.SliderPropHandlerFactory.SliderProperties GetSliderProperties(StyleOption option)
        {
            var sliderProperties = new Factory.SliderPropHandlerFactory.SliderProperties();
            var colorValue       = option.OverlayColor;
            var optValue         = option.OverlayTransparency;

            sliderProperties.Value         = (colorValue == "#FFFFFF") ? 200 - optValue : optValue;
            sliderProperties.Maximum       = 200;
            sliderProperties.TickFrequency = 1;

            return(sliderProperties);
        }
        public void BindStyleToSlider()
        {
            if (!IsAbleToBindProperty())
            {
                return;
            }

            Model.StyleOption styleOption     = _styleOptions[StylesVariationListSelectedId.Number];
            string            currentCategory = CurrentVariantCategory.Text;
            string            propName        = GetPropertyName(currentCategory);

            SliderPropHandler.Interface.ISliderPropHandler propHandler = PropHandlerFactory.GetSliderPropHandler(propName);
            SliderPropHandler.Factory.SliderPropHandlerFactory.SliderProperties sliderProperties = propHandler.GetSliderProperties(styleOption);
            SelectedSliderValue.Number         = sliderProperties.Value;
            SelectedSliderMaximum.Number       = sliderProperties.Maximum;
            SelectedSliderTickFrequency.Number = sliderProperties.TickFrequency;
        }