Ejemplo n.º 1
0
        protected override ControlInfo OnCreateConfigUI(PropertyCollection props)
        {
            ControlInfo info = PropertyBasedEffect.CreateDefaultConfigUI(props);

            info.SetPropertyControlValue(
                PropertyNames.RedLevels,
                ControlInfoPropertyNames.DisplayName,
                PdnResources.GetString("PosterizeAdjustment.ConfigDialog.RedLevels.DisplayName"));

            info.SetPropertyControlValue(
                PropertyNames.GreenLevels,
                ControlInfoPropertyNames.DisplayName,
                PdnResources.GetString("PosterizeAdjustment.ConfigDialog.GreenLevels.DisplayName"));

            info.SetPropertyControlValue(
                PropertyNames.BlueLevels,
                ControlInfoPropertyNames.DisplayName,
                PdnResources.GetString("PosterizeAdjustment.ConfigDialog.BlueLevels.DisplayName"));

            info.SetPropertyControlValue(
                PropertyNames.LinkLevels,
                ControlInfoPropertyNames.DisplayName,
                string.Empty);

            info.SetPropertyControlValue(
                PropertyNames.LinkLevels,
                ControlInfoPropertyNames.Description,
                PdnResources.GetString("PosterizeAdjustment.ConfigDialog.LinkLevels.Description"));

            return(info);
        }
Ejemplo n.º 2
0
        protected override ControlInfo OnCreateConfigUI(PropertyCollection props)
        {
            ControlInfo info = PropertyBasedEffect.CreateDefaultConfigUI(props);

            info.SetPropertyControlValue(
                PropertyName.Radius,
                ControlInfoPropertyNames.DisplayName,
                PdnResources.GetString("SurfaceBlurEffect.ConfigDialog.RadiusLabel"));

            info.SetPropertyControlValue(
                PropertyName.Threshold,
                ControlInfoPropertyNames.DisplayName,
                PdnResources.GetString("SurfaceBlurEffect.ConfigDialog.ThresholdLabel"));

            // don't need to add custom increments - the defaults are fine

            return(info);
        }
Ejemplo n.º 3
0
        protected override ControlInfo OnCreateConfigUI(PropertyCollection props)
        {
            ControlInfo info = PropertyBasedEffect.CreateDefaultConfigUI(props);

            info.SetPropertyControlValue(
                PropertyNames.Offset,
                ControlInfoPropertyNames.DisplayName,
                PdnResources.GetString("VignetteEffect.ConfigDialog.CenterLabel"));

            info.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.SliderSmallChangeX, 0.05);
            info.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.SliderLargeChangeX, 0.25);
            info.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.UpDownIncrementX, 0.01);
            info.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.SliderSmallChangeY, 0.05);
            info.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.SliderLargeChangeY, 0.25);
            info.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.UpDownIncrementY, 0.01);

            // thumbnail/preview
            Rectangle     selection     = this.EnvironmentParameters.GetSelection(base.EnvironmentParameters.SourceSurface.Bounds).GetBoundsInt();
            ImageResource propertyValue = ImageResource.FromImage(base.EnvironmentParameters.SourceSurface.CreateAliasedBitmap(selection));

            info.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.StaticImageUnderlay, propertyValue);

            info.SetPropertyControlValue(
                PropertyNames.Radius,
                ControlInfoPropertyNames.DisplayName,
                PdnResources.GetString("VignetteEffect.ConfigDialog.RadiusLabel"));

            info.SetPropertyControlValue(PropertyNames.Radius, ControlInfoPropertyNames.UseExponentialScale, true);
            info.SetPropertyControlValue(PropertyNames.Radius, ControlInfoPropertyNames.SliderLargeChange, 0.25);
            info.SetPropertyControlValue(PropertyNames.Radius, ControlInfoPropertyNames.SliderSmallChange, 0.05);
            info.SetPropertyControlValue(PropertyNames.Radius, ControlInfoPropertyNames.UpDownIncrement, 0.01);

            info.SetPropertyControlValue(
                PropertyNames.Amount,
                ControlInfoPropertyNames.DisplayName,
                PdnResources.GetString("VignetteEffect.ConfigDialog.DensityLabel"));

            info.SetPropertyControlValue(PropertyNames.Amount, ControlInfoPropertyNames.UseExponentialScale, true);
            info.SetPropertyControlValue(PropertyNames.Amount, ControlInfoPropertyNames.SliderLargeChange, 0.25);
            info.SetPropertyControlValue(PropertyNames.Amount, ControlInfoPropertyNames.SliderSmallChange, 0.05);
            info.SetPropertyControlValue(PropertyNames.Amount, ControlInfoPropertyNames.UpDownIncrement, 0.01);

            return(info);
        }
Ejemplo n.º 4
0
        protected override ControlInfo OnCreateConfigUI(PropertyCollection props)
        {
            ControlInfo configUI = PropertyBasedEffect.CreateDefaultConfigUI(props);

            configUI.SetPropertyControlValue(
                PropertyNames.Fragments,
                ControlInfoPropertyNames.DisplayName,
                PdnResources.GetString("FragmentEffect.ConfigDialog.Fragments.DisplayName"));

            configUI.SetPropertyControlValue(
                PropertyNames.Distance,
                ControlInfoPropertyNames.DisplayName,
                PdnResources.GetString("FragmentEffect.ConfigDialog.Distance.DisplayName"));

            configUI.SetPropertyControlValue(
                PropertyNames.Rotation,
                ControlInfoPropertyNames.DisplayName,
                PdnResources.GetString("FragmentEffect.ConfigDialog.Rotation.DisplayName"));

            configUI.SetPropertyControlType(PropertyNames.Rotation, PropertyControlType.AngleChooser);

            return(configUI);
        }