public override ControlInfo OnCreateSaveConfigUI(PropertyCollection props) { ControlInfo info = CreateDefaultSaveConfigUI(props); PropertyControlInfo presetPCI = info.FindControlForPropertyName(PropertyNames.Preset); presetPCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = GetString("Preset_DisplayName"); presetPCI.SetValueDisplayName(WebPPreset.Default, GetString("Preset_Default_DisplayName")); presetPCI.SetValueDisplayName(WebPPreset.Drawing, GetString("Preset_Drawing_DisplayName")); presetPCI.SetValueDisplayName(WebPPreset.Icon, GetString("Preset_Icon_DisplayName")); presetPCI.SetValueDisplayName(WebPPreset.Photo, GetString("Preset_Photo_DisplayName")); presetPCI.SetValueDisplayName(WebPPreset.Picture, GetString("Preset_Picture_DisplayName")); presetPCI.SetValueDisplayName(WebPPreset.Text, GetString("Preset_Text_DisplayName")); info.SetPropertyControlValue(PropertyNames.Quality, ControlInfoPropertyNames.DisplayName, GetString("Quality_DisplayName")); #if !PDN_3_5_X PropertyControlInfo forumLinkPCI = info.FindControlForPropertyName(PropertyNames.ForumLink); forumLinkPCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = GetString("ForumLink_DisplayName"); forumLinkPCI.ControlProperties[ControlInfoPropertyNames.Description].Value = GetString("ForumLink_Description"); PropertyControlInfo githubLinkPCI = info.FindControlForPropertyName(PropertyNames.GitHubLink); githubLinkPCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = string.Empty; githubLinkPCI.ControlProperties[ControlInfoPropertyNames.Description].Value = "GitHub"; // GitHub is a brand name that should not be localized. #endif return(info); }
protected override ControlInfo OnCreateConfigUI(PropertyCollection props) { ControlInfo configUI = CreateDefaultConfigUI(props); configUI.SetPropertyControlValue(PropertyNames.MaxScatterRadius, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("FrostedGlassEffect.ConfigDialog.MaxScatterRadius.DisplayName")); configUI.FindControlForPropertyName(PropertyNames.MaxScatterRadius).ControlProperties["UseExponentialScale"].Value = true; configUI.SetPropertyControlValue(PropertyNames.MinScatterRadius, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("FrostedGlassEffect.ConfigDialog.MinScatterRadius.DisplayName")); configUI.FindControlForPropertyName(PropertyNames.MinScatterRadius).ControlProperties["UseExponentialScale"].Value = true; configUI.SetPropertyControlValue(PropertyNames.NumSamples, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("FrostedGlassEffect.ConfigDialog.NumSamples.DisplayName")); return(configUI); }
public override ControlInfo OnCreateSaveConfigUI(PropertyCollection props) { ControlInfo info = CreateDefaultSaveConfigUI(props); info.SetPropertyControlValue(PropertyNames.FileVersion, ControlInfoPropertyNames.DisplayName, Properties.Resources.FileVersionHeader); info.FindControlForPropertyName(PropertyNames.FileVersion).SetValueDisplayName(AbrFileVersion.Version1, Properties.Resources.FileVersion1); info.FindControlForPropertyName(PropertyNames.FileVersion).SetValueDisplayName(AbrFileVersion.Version2, Properties.Resources.FileVersion2); info.SetPropertyControlType(PropertyNames.FileVersion, PropertyControlType.RadioButton); info.SetPropertyControlValue(PropertyNames.RLE, ControlInfoPropertyNames.DisplayName, string.Empty); info.SetPropertyControlValue(PropertyNames.RLE, ControlInfoPropertyNames.Description, Properties.Resources.RLECompression); return(info); }
public override ControlInfo OnCreateSaveConfigUI(PropertyCollection props) { ControlInfo info = PropertyBasedFileType.CreateDefaultSaveConfigUI(props); info.SetPropertyControlValue(PropertyNames.FileVersion, ControlInfoPropertyNames.DisplayName, Resources.FileVersionText); info.FindControlForPropertyName(PropertyNames.FileVersion).SetValueDisplayName(FileVersion.Version5, Resources.Version5); info.FindControlForPropertyName(PropertyNames.FileVersion).SetValueDisplayName(FileVersion.Version6, Resources.Version6AndLater); info.FindControlForPropertyName(PropertyNames.CompressionType).SetValueDisplayName(CompressionFormats.None, Resources.CompressionFormatNoneText); info.FindControlForPropertyName(PropertyNames.CompressionType).SetValueDisplayName(CompressionFormats.LZ77, Resources.CompressionFormatLZ77Text); info.SetPropertyControlValue(PropertyNames.CompressionType, ControlInfoPropertyNames.DisplayName, Resources.CompressionFormatText); info.SetPropertyControlType(PropertyNames.CompressionType, PropertyControlType.RadioButton); return(info); }
protected override ControlInfo OnCreateConfigUI(PropertyCollection props) { ControlInfo configUI = base.OnCreateConfigUI(props); configUI.SetPropertyControlValue(PropertyNames.Amount, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("PolarInversion.ConfigUI.Amount.DisplayName")); configUI.SetPropertyControlValue(PropertyNames.Amount, ControlInfoPropertyNames.UseExponentialScale, true); configUI.SetPropertyControlValue(PropertyNames.Amount, ControlInfoPropertyNames.SliderLargeChange, 0.25); configUI.SetPropertyControlValue(PropertyNames.Amount, ControlInfoPropertyNames.SliderSmallChange, 0.05); configUI.SetPropertyControlValue(PropertyNames.Amount, ControlInfoPropertyNames.UpDownIncrement, 0.01); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("PolarInversion.ConfigUI.Offset.DisplayName")); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.SliderSmallChangeX, 0.05); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.SliderLargeChangeX, 0.25); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.UpDownIncrementX, 0.01); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.SliderSmallChangeY, 0.05); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.SliderLargeChangeY, 0.25); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.UpDownIncrementY, 0.01); Rectangle selection = this.EnvironmentParameters.GetSelection(base.EnvironmentParameters.SourceSurface.Bounds).GetBoundsInt(); ImageResource propertyValue = ImageResource.FromImage(base.EnvironmentParameters.SourceSurface.CreateAliasedBitmap(selection)); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.StaticImageUnderlay, propertyValue); configUI.SetPropertyControlValue(PropertyNames.EdgeBehavior, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("PolarInversion.ConfigUI.EdgeBehavior.DisplayName")); PropertyControlInfo edgeBehaviorPCI = configUI.FindControlForPropertyName(PropertyNames.EdgeBehavior); edgeBehaviorPCI.SetValueDisplayName(WarpEdgeBehavior.Clamp, PdnResources.GetString("PolarInversion.ConfigUI.EdgeBehavior.Clamp.DisplayName")); edgeBehaviorPCI.SetValueDisplayName(WarpEdgeBehavior.Reflect, PdnResources.GetString("PolarInversion.ConfigUI.EdgeBehavior.Reflect.DisplayName")); edgeBehaviorPCI.SetValueDisplayName(WarpEdgeBehavior.Wrap, PdnResources.GetString("PolarInversion.ConfigUI.EdgeBehavior.Wrap.DisplayName")); configUI.SetPropertyControlValue(PropertyNames.Quality, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("PolarInversion.ConfigUI.Quality.DisplayName")); return(configUI); }
protected override ControlInfo OnCreateConfigUI(PropertyCollection props) { ControlInfo configUI = CreateDefaultConfigUI(props); configUI.SetPropertyControlValue(PropertyNames.Scale, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("CloudsEffect.ConfigDialog.ScaleLabel")); configUI.SetPropertyControlValue(PropertyNames.Power, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("CloudsEffect.ConfigDialog.RoughnessLabel")); configUI.SetPropertyControlValue(PropertyNames.Power, ControlInfoPropertyNames.SliderLargeChange, 0.25); configUI.SetPropertyControlValue(PropertyNames.Power, ControlInfoPropertyNames.SliderSmallChange, 0.05); configUI.SetPropertyControlValue(PropertyNames.Power, ControlInfoPropertyNames.UpDownIncrement, 0.01); PropertyControlInfo blendOpControl = configUI.FindControlForPropertyName(PropertyNames.BlendOp); blendOpControl.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = PdnResources.GetString("CloudsEffect.ConfigDialog.BlendModeHeader.Text"); Type[] blendOpTypes = UserBlendOps.GetBlendOps(); foreach (Type blendOpType in blendOpTypes) { string blendOpDisplayName = UserBlendOps.GetBlendOpFriendlyName(blendOpType); blendOpControl.SetValueDisplayName(blendOpType, blendOpDisplayName); } configUI.SetPropertyControlType(PropertyNames.Seed, PropertyControlType.IncrementButton); configUI.SetPropertyControlValue(PropertyNames.Seed, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("CloudsEffect.ConfigDialog.SeedHeader.Text")); configUI.SetPropertyControlValue(PropertyNames.Seed, ControlInfoPropertyNames.ButtonText, PdnResources.GetString("CloudsEffect.ConfigDialog.ReseedButton.Text")); configUI.SetPropertyControlValue(PropertyNames.Seed, ControlInfoPropertyNames.Description, PdnResources.GetString("CloudsEffect.ConfigDialog.UsageLabel")); return(configUI); }
public override ControlInfo OnCreateSaveConfigUI(PropertyCollection props) { ControlInfo configUI = CreateDefaultSaveConfigUI(props); configUI.SetPropertyControlValue( PropertyNames.BitDepth, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("TgaFileType.ConfigUI.BitDepth.DisplayName")); configUI.SetPropertyControlType(PropertyNames.BitDepth, PropertyControlType.RadioButton); PropertyControlInfo bitDepthPCI = configUI.FindControlForPropertyName(PropertyNames.BitDepth); bitDepthPCI.SetValueDisplayName(TgaBitDepthUIChoices.AutoDetect, PdnResources.GetString("TgaFileType.ConfigUI.BitDepth.AutoDetect.DisplayName")); bitDepthPCI.SetValueDisplayName(TgaBitDepthUIChoices.Bpp24, PdnResources.GetString("TgaFileType.ConfigUI.BitDepth.Bpp24.DisplayName")); bitDepthPCI.SetValueDisplayName(TgaBitDepthUIChoices.Bpp32, PdnResources.GetString("TgaFileType.ConfigUI.BitDepth.Bpp32.DisplayName")); configUI.SetPropertyControlValue( PropertyNames.RleCompress, ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlValue( PropertyNames.RleCompress, ControlInfoPropertyNames.Description, PdnResources.GetString("TgaFileType.ConfigUI.RleCompress.Description")); return(configUI); }
public override ControlInfo OnCreateSaveConfigUI(PropertyCollection props) { ControlInfo configUI = CreateDefaultSaveConfigUI(props); configUI.SetPropertyControlValue( PropertyNames.BitDepth, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("PngFileType.ConfigUI.BitDepth.DisplayName")); PropertyControlInfo bitDepthPCI = configUI.FindControlForPropertyName(PropertyNames.BitDepth); bitDepthPCI.SetValueDisplayName(PngBitDepthUIChoices.AutoDetect, PdnResources.GetString("PngFileType.ConfigUI.BitDepth.AutoDetect.DisplayName")); bitDepthPCI.SetValueDisplayName(PngBitDepthUIChoices.Bpp32, PdnResources.GetString("PngFileType.ConfigUI.BitDepth.Bpp32.DisplayName")); bitDepthPCI.SetValueDisplayName(PngBitDepthUIChoices.Bpp24, PdnResources.GetString("PngFileType.ConfigUI.BitDepth.Bpp24.DisplayName")); bitDepthPCI.SetValueDisplayName(PngBitDepthUIChoices.Bpp8, PdnResources.GetString("PngFileType.ConfigUI.BitDepth.Bpp8.DisplayName")); configUI.SetPropertyControlType(PropertyNames.BitDepth, PropertyControlType.RadioButton); configUI.SetPropertyControlValue( PropertyNames.DitherLevel, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("PngFileType.ConfigUI.DitherLevel.DisplayName")); configUI.SetPropertyControlValue( PropertyNames.Threshold, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("PngFileType.ConfigUI.Threshold.DisplayName")); configUI.SetPropertyControlValue( PropertyNames.Threshold, ControlInfoPropertyNames.Description, PdnResources.GetString("PngFileType.ConfigUI.Threshold.Description")); return(configUI); }
protected override ControlInfo OnCreateConfigUI(PropertyCollection props) { ControlInfo configUI = CreateDefaultConfigUI(props); configUI.SetPropertyControlValue(PropertyNames.Angle, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("RadialBlurEffect.ConfigDialog.RadialLabel")); configUI.FindControlForPropertyName(PropertyNames.Angle).ControlType.Value = PropertyControlType.AngleChooser; configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("RadialBlurEffect.ConfigDialog.OffsetLabel")); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.SliderSmallChangeX, 0.05); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.SliderLargeChangeX, 0.25); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.UpDownIncrementX, 0.01); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.SliderSmallChangeY, 0.05); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.SliderLargeChangeY, 0.25); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.UpDownIncrementY, 0.01); Surface sourceSurface = this.EnvironmentParameters.SourceSurface; Bitmap bitmap = sourceSurface.CreateAliasedBitmap(); ImageResource imageResource = ImageResource.FromImage(bitmap); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.StaticImageUnderlay, imageResource); configUI.SetPropertyControlValue(PropertyNames.Quality, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("RadialBlurEffect.ConfigDialog.QualityLabel")); configUI.SetPropertyControlValue(PropertyNames.Quality, ControlInfoPropertyNames.Description, PdnResources.GetString("RadialBlurEffect.ConfigDialog.QualityDescription")); return(configUI); }
protected override ControlInfo OnCreateConfigUI(PropertyCollection props) { ControlInfo configUI = CreateDefaultConfigUI(props); configUI.SetPropertyControlValue(PropertyNames.DirSetting, ControlInfoPropertyNames.DisplayName, "Directory"); configUI.SetPropertyControlValue(PropertyNames.DirFiles, ControlInfoPropertyNames.DisplayName, "File"); configUI.SetPropertyControlValue(PropertyNames.checkk, ControlInfoPropertyNames.DisplayName, "Checkk"); PropertyControlInfo Amount2Control = configUI.FindControlForPropertyName(PropertyNames.DirFiles); Amount2Control.SetValueDisplayName(Amount2Options.CLUTFilename, ""); return(configUI); }
public override ControlInfo OnCreateSaveConfigUI(PropertyCollection props) { ControlInfo info = PropertyBasedFileType.CreateDefaultSaveConfigUI(props); info.SetPropertyControlValue(PropertyNames.BitDepth, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("BmpFileType.ConfigUI.BitDepth.DisplayName")); PropertyControlInfo info2 = info.FindControlForPropertyName(PropertyNames.BitDepth); info2.SetValueDisplayName(BmpBitDepthUIChoices.AutoDetect, PdnResources.GetString("BmpFileType.ConfigUI.BitDepth.AutoDetect.DisplayName")); info2.SetValueDisplayName(BmpBitDepthUIChoices.Bpp24, PdnResources.GetString("BmpFileType.ConfigUI.BitDepth.Bpp24.DisplayName")); info2.SetValueDisplayName(BmpBitDepthUIChoices.Bpp8, PdnResources.GetString("BmpFileType.ConfigUI.BitDepth.Bpp8.DisplayName")); info.SetPropertyControlType(PropertyNames.BitDepth, PropertyControlType.RadioButton); info.SetPropertyControlValue(PropertyNames.DitherLevel, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("BmpFileType.ConfigUI.DitherLevel.DisplayName")); return(info); }
protected override ControlInfo OnCreateConfigUI(PropertyCollection props) { ControlInfo configUI = CreateDefaultConfigUI(props); configUI.SetPropertyControlValue(PropertyNames.Radius, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("ReduceNoise.Radius.DisplayName")); configUI.SetPropertyControlValue(PropertyNames.Strength, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("ReduceNoise.Strength.DisplayName")); PropertyControlInfo strengthControlInfo = configUI.FindControlForPropertyName(PropertyNames.Strength); configUI.SetPropertyControlValue(PropertyNames.Strength, ControlInfoPropertyNames.UpDownIncrement, 0.01); configUI.SetPropertyControlValue(PropertyNames.Strength, ControlInfoPropertyNames.SliderSmallChange, 0.01); configUI.SetPropertyControlValue(PropertyNames.Strength, ControlInfoPropertyNames.SliderLargeChange, 0.1); return(configUI); }
protected override ControlInfo OnCreateConfigUI(PropertyCollection props) { ControlInfo configUI = CreateDefaultConfigUI(props); configUI.SetPropertyControlType(PropertyNames.Mode, PropertyControlType.RadioButton); PropertyControlInfo modes = configUI.FindControlForPropertyName(PropertyNames.Mode); modes.SetValueDisplayName(Modes.IsNotSecondary, "Ignore Within Tolerance of Secondary Color"); modes.SetValueDisplayName(Modes.IsPrimary, "Add Within Tolerance of Primary Color"); configUI.SetPropertyControlValue(PropertyNames.Mode, ControlInfoPropertyNames.DisplayName, "Clustering Mode"); configUI.SetPropertyControlValue(PropertyNames.LowerThreshold, ControlInfoPropertyNames.DisplayName, "Cluster Size Lower Threshold"); configUI.SetPropertyControlValue(PropertyNames.UpperThreshold, ControlInfoPropertyNames.DisplayName, "Cluster Size Upper Threshold"); configUI.SetPropertyControlValue(PropertyNames.Tolerance, ControlInfoPropertyNames.DisplayName, "Tolerance ‰"); return(configUI); }
public override ControlInfo OnCreateConfigUI(PropertyCollection props) { ControlInfo info = CreateDefaultConfigUI(props); info.SetPropertyControlValue(PropertyNames.HorizCellSize, ControlInfoPropertyNames.DisplayName, "Horizontal cell size"); info.SetPropertyControlValue(PropertyNames.VerticalCellSize, ControlInfoPropertyNames.DisplayName, "Vertical cell size"); info.SetPropertyControlValue(PropertyNames.PresetCharacters, ControlInfoPropertyNames.DisplayName, "Preset characters"); info.SetPropertyControlType(PropertyNames.PresetCharacters, PropertyControlType.RadioButton); PropertyControlInfo info2 = info.FindControlForPropertyName(PropertyNames.PresetCharacters); info2.SetValueDisplayName(PresetCharacters.AsciiChars, asciiChars); info2.SetValueDisplayName(PresetCharacters.Blocks, blocks); info2.SetValueDisplayName(PresetCharacters.Custom, "Custom (does not work with previewing and opening)"); info.SetPropertyControlValue(PropertyNames.Characters, ControlInfoPropertyNames.DisplayName, "Custom characters"); return(info); }
public override ControlInfo OnCreateSaveConfigUI(PropertyCollection props) { ControlInfo info = CreateDefaultSaveConfigUI(props); PropertyControlInfo presetPCI = info.FindControlForPropertyName(PropertyNames.Preset); presetPCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = Resources.Preset_DisplayName; presetPCI.SetValueDisplayName(WebPPreset.Default, Resources.Preset_Default_DisplayName); presetPCI.SetValueDisplayName(WebPPreset.Drawing, Resources.Preset_Drawing_DisplayName); presetPCI.SetValueDisplayName(WebPPreset.Icon, Resources.Preset_Icon_DisplayName); presetPCI.SetValueDisplayName(WebPPreset.Photo, Resources.Preset_Photo_DisplayName); presetPCI.SetValueDisplayName(WebPPreset.Picture, Resources.Preset_Picture_DisplayName); presetPCI.SetValueDisplayName(WebPPreset.Text, Resources.Preset_Text_DisplayName); info.SetPropertyControlValue(PropertyNames.Quality, ControlInfoPropertyNames.DisplayName, Resources.Quality_DisplayName); info.SetPropertyControlValue(PropertyNames.KeepMetadata, ControlInfoPropertyNames.DisplayName, string.Empty); info.SetPropertyControlValue(PropertyNames.KeepMetadata, ControlInfoPropertyNames.Description, Resources.KeepMetadata_Description); return(info); }
protected override ControlInfo OnCreateConfigUI(PropertyCollection props) { ControlInfo configUI = CreateDefaultConfigUI(props); configUI.SetPropertyControlValue(C.Properties.Text.ToString(), ControlInfoPropertyNames.Multiline, true); configUI.SetPropertyControlValue(C.Properties.Bold.ToString(), ControlInfoPropertyNames.DisplayName, "Formatting"); #pragma warning disable S4142 // Duplicate values should not be passed as arguments configUI.SetPropertyControlValue(C.Properties.Bold.ToString(), ControlInfoPropertyNames.Description, C.Properties.Bold.ToString()); configUI.SetPropertyControlValue(C.Properties.Italic.ToString(), ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlValue(C.Properties.Italic.ToString(), ControlInfoPropertyNames.Description, C.Properties.Italic.ToString()); configUI.SetPropertyControlValue(C.Properties.Underline.ToString(), ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlValue(C.Properties.Underline.ToString(), ControlInfoPropertyNames.Description, C.Properties.Underline.ToString()); configUI.SetPropertyControlValue(C.Properties.Strikeout.ToString(), ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlValue(C.Properties.Strikeout.ToString(), ControlInfoPropertyNames.Description, C.Properties.Strikeout.ToString()); #pragma warning restore S4142 // Duplicate values should not be passed as arguments configUI.SetPropertyControlValue(C.Properties.LetterSpacing.ToString(), ControlInfoPropertyNames.SliderLargeChange, 0.25); configUI.SetPropertyControlValue(C.Properties.LetterSpacing.ToString(), ControlInfoPropertyNames.SliderSmallChange, 0.01); configUI.SetPropertyControlValue(C.Properties.LetterSpacing.ToString(), ControlInfoPropertyNames.UpDownIncrement, 0.01); configUI.SetPropertyControlValue(C.Properties.LineSpacing.ToString(), ControlInfoPropertyNames.SliderLargeChange, 0.25); configUI.SetPropertyControlValue(C.Properties.LineSpacing.ToString(), ControlInfoPropertyNames.SliderSmallChange, 0.01); configUI.SetPropertyControlValue(C.Properties.LineSpacing.ToString(), ControlInfoPropertyNames.UpDownIncrement, 0.01); PropertyControlInfo fontControl = configUI.FindControlForPropertyName(C.Properties.FontFamily); foreach (FontFamily fontFamily in fontFamilies) { fontControl.SetValueDisplayName(fontFamily, fontFamily.Name); } return(configUI); }
protected override ControlInfo OnCreateConfigUI(PropertyCollection props) { ControlInfo configUI = CreateDefaultConfigUI(props); configUI.SetPropertyControlValue(PropertyNames.Text, ControlInfoPropertyNames.DisplayName, L10nStrings.Text); configUI.SetPropertyControlValue(PropertyNames.TextRepeat, ControlInfoPropertyNames.DisplayName, L10nStrings.TextRepeat); configUI.SetPropertyControlValue(PropertyNames.FontSize, ControlInfoPropertyNames.DisplayName, L10nStrings.FontSize); configUI.SetPropertyControlValue(PropertyNames.Font, ControlInfoPropertyNames.DisplayName, L10nStrings.Font); PropertyControlInfo Amount4FontFamilyControl = configUI.FindControlForPropertyName(PropertyNames.Font); foreach (FontFamily ff in FontUtil.UsableFontFamilies) { Amount4FontFamilyControl.SetValueDisplayName(ff, ff.Name); } configUI.SetPropertyControlValue(PropertyNames.Bold, ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlValue(PropertyNames.Bold, ControlInfoPropertyNames.Description, L10nStrings.Bold); configUI.SetPropertyControlValue(PropertyNames.Italic, ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlValue(PropertyNames.Italic, ControlInfoPropertyNames.Description, L10nStrings.Italic); configUI.SetPropertyControlValue(PropertyNames.Underline, ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlValue(PropertyNames.Underline, ControlInfoPropertyNames.Description, L10nStrings.Underline); configUI.SetPropertyControlValue(PropertyNames.Strikeout, ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlValue(PropertyNames.Strikeout, ControlInfoPropertyNames.Description, L10nStrings.Strikeout); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.DisplayName, L10nStrings.Offset); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.SliderSmallChangeX, 0.05); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.SliderLargeChangeX, 0.25); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.UpDownIncrementX, 0.01); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.SliderSmallChangeY, 0.05); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.SliderLargeChangeY, 0.25); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.UpDownIncrementY, 0.01); Rectangle selection9 = EnvironmentParameters.SelectionBounds; ImageResource imageResource9 = ImageResource.FromImage(EnvironmentParameters.SourceSurface.CreateAliasedBitmap(selection9)); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.StaticImageUnderlay, imageResource9); configUI.SetPropertyControlValue(PropertyNames.BackColor, ControlInfoPropertyNames.DisplayName, L10nStrings.BackColor); configUI.SetPropertyControlType(PropertyNames.BackColor, PropertyControlType.ColorWheel); return(configUI); }
protected override ControlInfo OnCreateConfigUI(PropertyCollection props) { ControlInfo configUI = CreateDefaultConfigUI(props); configUI.SetPropertyControlValue(PropertyNames.Scale, ControlInfoPropertyNames.DisplayName, L10nStrings.Scale); configUI.SetPropertyControlValue(PropertyNames.Scale, ControlInfoPropertyNames.SliderLargeChange, 0.25); configUI.SetPropertyControlValue(PropertyNames.Scale, ControlInfoPropertyNames.SliderSmallChange, 0.05); configUI.SetPropertyControlValue(PropertyNames.Scale, ControlInfoPropertyNames.UpDownIncrement, 0.001); configUI.SetPropertyControlValue(PropertyNames.Scale, ControlInfoPropertyNames.DecimalPlaces, 3); configUI.SetPropertyControlValue(PropertyNames.LineWidth, ControlInfoPropertyNames.DisplayName, L10nStrings.LineWidth); configUI.SetPropertyControlValue(PropertyNames.Pattern, ControlInfoPropertyNames.DisplayName, L10nStrings.Pattern); PropertyControlInfo patternControl = configUI.FindControlForPropertyName(PropertyNames.Pattern); patternControl.SetValueDisplayName(Pattern.AltHorVer, L10nStrings.AltHorVer); patternControl.SetValueDisplayName(Pattern.AltNone, L10nStrings.AltNone); patternControl.SetValueDisplayName(Pattern.AltHor, L10nStrings.AltHor); patternControl.SetValueDisplayName(Pattern.AltVer, L10nStrings.AltVer); configUI.SetPropertyControlValue(PropertyNames.Transparent, ControlInfoPropertyNames.DisplayName, L10nStrings.LineColor); configUI.SetPropertyControlValue(PropertyNames.Transparent, ControlInfoPropertyNames.Description, L10nStrings.Transparent); configUI.SetPropertyControlValue(PropertyNames.LineColor, ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlType(PropertyNames.LineColor, PropertyControlType.ColorWheel); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.DisplayName, L10nStrings.Position); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.SliderSmallChangeX, 0.05); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.SliderLargeChangeX, 0.25); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.UpDownIncrementX, 0.001); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.SliderSmallChangeY, 0.05); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.SliderLargeChangeY, 0.25); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.UpDownIncrementY, 0.001); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.DecimalPlaces, 3); Rectangle selBounds = EnvironmentParameters.SelectionBounds; ImageResource selImage = ImageResource.FromImage(EnvironmentParameters.SourceSurface.CreateAliasedBitmap(selBounds)); configUI.SetPropertyControlValue(PropertyNames.Offset, ControlInfoPropertyNames.StaticImageUnderlay, selImage); return(configUI); }
/// <summary> /// Adapt properties in the dialog (DisplayName, ...) /// </summary> public override ControlInfo OnCreateSaveConfigUI(PropertyCollection props) { ControlInfo configUI = CreateDefaultSaveConfigUI(props); PropertyControlInfo qualityPCI = configUI.FindControlForPropertyName(PropertyNames.Quality); qualityPCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = this.strings.GetString("Quality_DisplayName"); qualityPCI.ControlProperties[ControlInfoPropertyNames.Description].Value = string.Empty; PropertyControlInfo compressionSpeedPCI = configUI.FindControlForPropertyName(PropertyNames.CompressionSpeed); compressionSpeedPCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = this.strings.GetString("CompressionSpeed_DisplayName"); compressionSpeedPCI.SetValueDisplayName(CompressionSpeed.Fast, this.strings.GetString("CompressionSpeed_Fast_DisplayName")); compressionSpeedPCI.SetValueDisplayName(CompressionSpeed.Medium, this.strings.GetString("CompressionSpeed_Medium_DisplayName")); compressionSpeedPCI.SetValueDisplayName(CompressionSpeed.Slow, this.strings.GetString("CompressionSpeed_Slow_DisplayName")); compressionSpeedPCI.SetValueDisplayName(CompressionSpeed.VerySlow, this.strings.GetString("CompressionSpeed_VerySlow_DisplayName")); PropertyControlInfo subsamplingPCI = configUI.FindControlForPropertyName(PropertyNames.YUVChromaSubsampling); subsamplingPCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = this.strings.GetString("ChromaSubsampling_DisplayName"); subsamplingPCI.SetValueDisplayName(YUVChromaSubsampling.Subsampling420, this.strings.GetString("ChromaSubsampling_420_DisplayName")); subsamplingPCI.SetValueDisplayName(YUVChromaSubsampling.Subsampling422, this.strings.GetString("ChromaSubsampling_422_DisplayName")); subsamplingPCI.SetValueDisplayName(YUVChromaSubsampling.Subsampling444, this.strings.GetString("ChromaSubsampling_444_DisplayName")); PropertyControlInfo preserveExistingTileSizePCI = configUI.FindControlForPropertyName(PropertyNames.PreserveExistingTileSize); preserveExistingTileSizePCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = string.Empty; preserveExistingTileSizePCI.ControlProperties[ControlInfoPropertyNames.Description].Value = this.strings.GetString("PreserveExistingTileSize_Description"); PropertyControlInfo forumLinkPCI = configUI.FindControlForPropertyName(PropertyNames.ForumLink); forumLinkPCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = this.strings.GetString("ForumLink_DisplayName"); forumLinkPCI.ControlProperties[ControlInfoPropertyNames.Description].Value = this.strings.GetString("ForumLink_Description"); PropertyControlInfo githubLinkPCI = configUI.FindControlForPropertyName(PropertyNames.GitHubLink); githubLinkPCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = string.Empty; githubLinkPCI.ControlProperties[ControlInfoPropertyNames.Description].Value = "GitHub"; // GitHub is a brand name that should not be localized. return(configUI); }
public override ControlInfo OnCreateSaveConfigUI(PropertyCollection props) { ControlInfo info = PropertyBasedFileType.CreateDefaultSaveConfigUI(props); info.SetPropertyControlValue(PropertyNames.FileFormat, ControlInfoPropertyNames.DisplayName, string.Empty); info.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.DDS_FORMAT_DXT1, PdnResources.GetString("DdsFileType.SaveConfigWidget.FileFormatList.DXT1")); info.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.DDS_FORMAT_DXT3, PdnResources.GetString("DdsFileType.SaveConfigWidget.FileFormatList.DXT3")); info.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.DDS_FORMAT_DXT5, PdnResources.GetString("DdsFileType.SaveConfigWidget.FileFormatList.DXT5")); info.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.DDS_FORMAT_A8R8G8B8, PdnResources.GetString("DdsFileType.SaveConfigWidget.FileFormatList.A8R8G8B8")); info.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.DDS_FORMAT_X8R8G8B8, PdnResources.GetString("DdsFileType.SaveConfigWidget.FileFormatList.X8R8G8B8")); info.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.DDS_FORMAT_A8B8G8R8, PdnResources.GetString("DdsFileType.SaveConfigWidget.FileFormatList.A8B8G8R8")); info.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.DDS_FORMAT_X8B8G8R8, PdnResources.GetString("DdsFileType.SaveConfigWidget.FileFormatList.X8B8G8R8")); info.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.DDS_FORMAT_A1R5G5B5, PdnResources.GetString("DdsFileType.SaveConfigWidget.FileFormatList.A1R5G5B5")); info.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.DDS_FORMAT_A4R4G4B4, PdnResources.GetString("DdsFileType.SaveConfigWidget.FileFormatList.A4R4G4B4")); info.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.DDS_FORMAT_R8G8B8, PdnResources.GetString("DdsFileType.SaveConfigWidget.FileFormatList.R8G8B8")); info.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.DDS_FORMAT_R5G6B5, PdnResources.GetString("DdsFileType.SaveConfigWidget.FileFormatList.R5G6B5")); info.SetPropertyControlValue(PropertyNames.CompressorType, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("DdsFileType.SaveConfigWidget.CompressorTypeLabel.Text")); info.SetPropertyControlType(PropertyNames.CompressorType, PropertyControlType.RadioButton); info.FindControlForPropertyName(PropertyNames.CompressorType).SetValueDisplayName(DdsCompressorType.RangeFit, PdnResources.GetString("DdsFileType.SaveConfigWidget.RangeFit.Text")); info.FindControlForPropertyName(PropertyNames.CompressorType).SetValueDisplayName(DdsCompressorType.ClusterFit, PdnResources.GetString("DdsFileType.SaveConfigWidget.ClusterFit.Text")); info.FindControlForPropertyName(PropertyNames.CompressorType).SetValueDisplayName(DdsCompressorType.IterativeFit, PdnResources.GetString("DdsFileType.SaveConfigWidget.IterativeFit.Text")); info.SetPropertyControlValue(PropertyNames.ErrorMetric, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("DdsFileType.SaveConfigWidget.ErrorMetricLabel.Text")); info.SetPropertyControlType(PropertyNames.ErrorMetric, PropertyControlType.RadioButton); info.FindControlForPropertyName(PropertyNames.ErrorMetric).SetValueDisplayName(DdsErrorMetric.Perceptual, PdnResources.GetString("DdsFileType.SaveConfigWidget.Perceptual.Text")); info.FindControlForPropertyName(PropertyNames.ErrorMetric).SetValueDisplayName(DdsErrorMetric.Uniform, PdnResources.GetString("DdsFileType.SaveConfigWidget.Uniform.Text")); info.SetPropertyControlValue(PropertyNames.GenerateMipMaps, ControlInfoPropertyNames.DisplayName, string.Empty); info.SetPropertyControlValue(PropertyNames.GenerateMipMaps, ControlInfoPropertyNames.Description, PdnResources.GetString("DdsFileType.SaveConfigWidget.GenerateMipMaps.Text")); info.SetPropertyControlValue(PropertyNames.WeightColorByAlpha, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("DdsFileType.SaveConfigWidget.AdditionalOptions.Text")); info.SetPropertyControlValue(PropertyNames.WeightColorByAlpha, ControlInfoPropertyNames.Description, PdnResources.GetString("DdsFileType.SaveConfigWidget.WeightColourByAlpha")); info.SetPropertyControlValue(PropertyNames.MipMapResamplingAlgorithm, ControlInfoPropertyNames.DisplayName, string.Empty); info.FindControlForPropertyName(PropertyNames.MipMapResamplingAlgorithm).SetValueDisplayName(ResamplingAlgorithm.Fant, PdnResources.GetString("DdsFileType.SaveConfigWidget.MipMapResamplingAlgorithm.Fant")); info.FindControlForPropertyName(PropertyNames.MipMapResamplingAlgorithm).SetValueDisplayName(ResamplingAlgorithm.SuperSampling, PdnResources.GetString("DdsFileType.SaveConfigWidget.MipMapResamplingAlgorithm.SuperSampling")); info.FindControlForPropertyName(PropertyNames.MipMapResamplingAlgorithm).SetValueDisplayName(ResamplingAlgorithm.Bicubic, PdnResources.GetString("DdsFileType.SaveConfigWidget.MipMapResamplingAlgorithm.Bicubic")); info.FindControlForPropertyName(PropertyNames.MipMapResamplingAlgorithm).SetValueDisplayName(ResamplingAlgorithm.Bilinear, PdnResources.GetString("DdsFileType.SaveConfigWidget.MipMapResamplingAlgorithm.Bilinear")); info.FindControlForPropertyName(PropertyNames.MipMapResamplingAlgorithm).SetValueDisplayName(ResamplingAlgorithm.NearestNeighbor, PdnResources.GetString("DdsFileType.SaveConfigWidget.MipMapResamplingAlgorithm.NearestNeighbor")); return(info); }
public override ControlInfo OnCreateSaveConfigUI(PropertyCollection props) { ControlInfo configUI = CreateDefaultSaveConfigUI(props); PropertyControlInfo formatPCI = configUI.FindControlForPropertyName(PropertyNames.FileFormat); formatPCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = string.Empty; formatPCI.SetValueDisplayName(DdsFileFormat.BC1, GetString(DdsFileTypePlusStringName.DdsFileFormat_BC1)); formatPCI.SetValueDisplayName(DdsFileFormat.BC1Srgb, GetString(DdsFileTypePlusStringName.DdsFileFormat_BC1Srgb)); formatPCI.SetValueDisplayName(DdsFileFormat.BC2, GetString(DdsFileTypePlusStringName.DdsFileFormat_BC2)); formatPCI.SetValueDisplayName(DdsFileFormat.BC2Srgb, GetString(DdsFileTypePlusStringName.DdsFileFormat_BC2Srgb)); formatPCI.SetValueDisplayName(DdsFileFormat.BC3, GetString(DdsFileTypePlusStringName.DdsFileFormat_BC3)); formatPCI.SetValueDisplayName(DdsFileFormat.BC3Srgb, GetString(DdsFileTypePlusStringName.DdsFileFormat_BC3Srgb)); formatPCI.SetValueDisplayName(DdsFileFormat.BC4Unsigned, GetString(DdsFileTypePlusStringName.DdsFileFormat_BC4Unsigned)); formatPCI.SetValueDisplayName(DdsFileFormat.BC5Unsigned, GetString(DdsFileTypePlusStringName.DdsFileFormat_BC5Unsigned)); formatPCI.SetValueDisplayName(DdsFileFormat.BC5Signed, GetString(DdsFileTypePlusStringName.DdsFileFormat_BC5Signed)); formatPCI.SetValueDisplayName(DdsFileFormat.BC6HUnsigned, GetString(DdsFileTypePlusStringName.DdsFileFormat_BC6HUnsigned)); formatPCI.SetValueDisplayName(DdsFileFormat.BC7, GetString(DdsFileTypePlusStringName.DdsFileFormat_BC7)); formatPCI.SetValueDisplayName(DdsFileFormat.BC7Srgb, GetString(DdsFileTypePlusStringName.DdsFileFormat_BC7Srgb)); formatPCI.SetValueDisplayName(DdsFileFormat.B8G8R8A8, GetString(DdsFileTypePlusStringName.DdsFileFormat_B8G8R8A8)); formatPCI.SetValueDisplayName(DdsFileFormat.B8G8R8X8, GetString(DdsFileTypePlusStringName.DdsFileFormat_B8G8R8X8)); formatPCI.SetValueDisplayName(DdsFileFormat.R8G8B8A8, GetString(DdsFileTypePlusStringName.DdsFileFormat_R8G8B8A8)); formatPCI.SetValueDisplayName(DdsFileFormat.B5G5R5A1, GetString(DdsFileTypePlusStringName.DdsFileFormat_B5G5R5A1)); formatPCI.SetValueDisplayName(DdsFileFormat.B4G4R4A4, GetString(DdsFileTypePlusStringName.DdsFileFormat_B4G4R4A4)); formatPCI.SetValueDisplayName(DdsFileFormat.B5G6R5, GetString(DdsFileTypePlusStringName.DdsFileFormat_B5G6R5)); PropertyControlInfo compresionModePCI = configUI.FindControlForPropertyName(PropertyNames.BC7CompressionMode); compresionModePCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = GetString(DdsFileTypePlusStringName.BC7CompressionMode_DisplayName); compresionModePCI.SetValueDisplayName(BC7CompressionMode.Fast, GetString(DdsFileTypePlusStringName.BC7CompressionMode_Fast)); compresionModePCI.SetValueDisplayName(BC7CompressionMode.Normal, GetString(DdsFileTypePlusStringName.BC7CompressionMode_Normal)); compresionModePCI.SetValueDisplayName(BC7CompressionMode.Slow, GetString(DdsFileTypePlusStringName.BC7CompressionMode_Slow)); PropertyControlInfo errorMetricPCI = configUI.FindControlForPropertyName(PropertyNames.ErrorMetric); errorMetricPCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = GetString(DdsFileTypePlusStringName.ErrorMetric_DisplayName); errorMetricPCI.ControlType.Value = PropertyControlType.RadioButton; errorMetricPCI.SetValueDisplayName(DdsErrorMetric.Perceptual, GetString(DdsFileTypePlusStringName.ErrorMetric_Perceptual)); errorMetricPCI.SetValueDisplayName(DdsErrorMetric.Uniform, GetString(DdsFileTypePlusStringName.ErrorMetric_Uniform)); PropertyControlInfo cubemapPCI = configUI.FindControlForPropertyName(PropertyNames.CubeMap); cubemapPCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = string.Empty; cubemapPCI.ControlProperties[ControlInfoPropertyNames.Description].Value = GetString(DdsFileTypePlusStringName.CubeMap_Description); PropertyControlInfo generateMipPCI = configUI.FindControlForPropertyName(PropertyNames.GenerateMipMaps); generateMipPCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = string.Empty; generateMipPCI.ControlProperties[ControlInfoPropertyNames.Description].Value = GetString(DdsFileTypePlusStringName.GenerateMipMaps_Description); PropertyControlInfo mipResamplingPCI = configUI.FindControlForPropertyName(PropertyNames.MipMapResamplingAlgorithm); mipResamplingPCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = string.Empty; mipResamplingPCI.SetValueDisplayName(ResamplingAlgorithm.NearestNeighbor, GetString(DdsFileTypePlusStringName.ResamplingAlgorithm_NearestNeighbor)); mipResamplingPCI.SetValueDisplayName(ResamplingAlgorithm.Bicubic, GetString(DdsFileTypePlusStringName.ResamplingAlgorithm_Bicubic)); mipResamplingPCI.SetValueDisplayName(ResamplingAlgorithm.Bilinear, GetString(DdsFileTypePlusStringName.ResamplingAlgorithm_Bilinear)); mipResamplingPCI.SetValueDisplayName(ResamplingAlgorithm.Fant, GetString(DdsFileTypePlusStringName.ResamplingAlgorithm_Fant)); mipResamplingPCI.SetValueDisplayName(ResamplingAlgorithm.SuperSampling, GetString(DdsFileTypePlusStringName.ResamplingAlgorithm_SuperSampling)); PropertyControlInfo forumLinkPCI = configUI.FindControlForPropertyName(PropertyNames.ForumLink); forumLinkPCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = GetString(DdsFileTypePlusStringName.ForumLink_DisplayName); forumLinkPCI.ControlProperties[ControlInfoPropertyNames.Description].Value = GetString(DdsFileTypePlusStringName.ForumLink_Description); PropertyControlInfo githubLinkPCI = configUI.FindControlForPropertyName(PropertyNames.GitHubLink); githubLinkPCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = string.Empty; githubLinkPCI.ControlProperties[ControlInfoPropertyNames.Description].Value = "GitHub"; // GitHub is a brand name that should not be localized. return(configUI); }
protected override ControlInfo OnCreateConfigUI(PropertyCollection properties) { ControlInfo info = base.OnCreateConfigUI(properties); BooleanSetting enableHardwareAcceleration = base.Section.AppSettings.UI.EnableHardwareAcceleration; info.SetPropertyControlValue(enableHardwareAcceleration.Path, ControlInfoPropertyNames.DisplayName, string.Empty); info.SetPropertyControlValue(enableHardwareAcceleration.Path, ControlInfoPropertyNames.Description, PdnResources.GetString("SettingsDialog.UI.EnableHardwareAcceleration.Description")); BooleanSetting enableAnimations = base.Section.AppSettings.UI.EnableAnimations; info.SetPropertyControlValue(enableAnimations.Path, ControlInfoPropertyNames.DisplayName, string.Empty); info.SetPropertyControlValue(enableAnimations.Path, ControlInfoPropertyNames.Description, PdnResources.GetString("SettingsDialog.UI.EnableAnimations.Description")); BooleanSetting enableAntialiasedSelectionOutline = base.Section.AppSettings.UI.EnableAntialiasedSelectionOutline; info.SetPropertyControlValue(enableAntialiasedSelectionOutline.Path, ControlInfoPropertyNames.DisplayName, string.Empty); info.SetPropertyControlValue(enableAntialiasedSelectionOutline.Path, ControlInfoPropertyNames.Description, PdnResources.GetString("SettingsDialog.UI.EnableAntialiasedSelectionOutline.Description")); BooleanSetting showTaskbarPreviews = base.Section.AppSettings.UI.ShowTaskbarPreviews; info.SetPropertyControlValue(showTaskbarPreviews.Path, ControlInfoPropertyNames.DisplayName, string.Empty); info.SetPropertyControlValue(showTaskbarPreviews.Path, ControlInfoPropertyNames.Description, PdnResources.GetString("SettingsDialog.UI.ShowTaskbarPreviews.Description")); BooleanSetting enableOverscroll = base.Section.AppSettings.UI.EnableOverscroll; info.SetPropertyControlValue(enableOverscroll.Path, ControlInfoPropertyNames.DisplayName, string.Empty); info.SetPropertyControlValue(enableOverscroll.Path, ControlInfoPropertyNames.Description, PdnResources.GetString("SettingsDialog.UI.Overscroll.Description")); BooleanSetting translucentWindows = base.Section.AppSettings.UI.TranslucentWindows; info.SetPropertyControlValue(translucentWindows.Path, ControlInfoPropertyNames.DisplayName, string.Empty); info.SetPropertyControlValue(translucentWindows.Path, ControlInfoPropertyNames.Description, PdnResources.GetString("SettingsDialog.UI.TranslucentWindows.Description")); EnumSetting <AeroColorScheme> aeroColorScheme = base.Section.AppSettings.UI.AeroColorScheme; info.SetPropertyControlValue(aeroColorScheme.Path, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("SettingsDialog.UI.AeroColorScheme.DisplayName")); PropertyControlInfo info2 = info.FindControlForPropertyName(aeroColorScheme.Path); info2.SetValueDisplayName(AeroColorScheme.Blue, PdnResources.GetString("SettingsDialog.UI.AeroColorScheme.Value.Blue")); info2.SetValueDisplayName(AeroColorScheme.Light, PdnResources.GetString("SettingsDialog.UI.AeroColorScheme.Value.Light")); if (ThemeConfig.EffectiveTheme == PdnTheme.Classic) { info.SetPropertyControlValue(aeroColorScheme.Path, ControlInfoPropertyNames.Description, PdnResources.GetString("SettingsDialog.UI.AeroColorScheme.Description.ClassicDisabled")); } CultureInfoSetting language = base.Section.AppSettings.UI.Language; info.SetPropertyControlValue(language.Path, ControlInfoPropertyNames.DisplayName, PdnResources.GetString("SettingsDialog.UI.Language.DisplayName")); info.SetPropertyControlValue(language.Path, ControlInfoPropertyNames.Description, PdnResources.GetString("SettingsDialog.UI.Language.Description")); PropertyControlInfo info3 = info.FindControlForPropertyName(language.Path); StaticListChoiceProperty property = (StaticListChoiceProperty)info3.Property; CultureInfo info4 = new CultureInfo("en-US"); foreach (CultureInfo info5 in property.ValueChoices) { string nativeName; if (info5.Equals(info4)) { nativeName = info5.Parent.NativeName; } else { nativeName = info5.NativeName; } info3.SetValueDisplayName(info5, nativeName); } return(info); }
public override ControlInfo OnCreateSaveConfigUI(PropertyCollection props) { ControlInfo configUI = CreateDefaultSaveConfigUI(props); configUI.SetPropertyControlValue(PropertyNames.FileFormat, ControlInfoPropertyNames.DisplayName, string.Empty); configUI.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.BC1, "BC1 (Linear, DXT1)"); configUI.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.BC1Srgb, "BC1 (sRGB, DX 10+)"); configUI.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.BC2, "BC2 (Linear, DXT3)"); configUI.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.BC2Srgb, "BC2 (sRGB, DX 10+)"); configUI.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.BC3, "BC3 (Linear, DXT5)"); configUI.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.BC3Srgb, "BC3 (sRGB, DX 10+)"); configUI.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.BC4, "BC4 (Linear, DX 10+)"); configUI.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.BC5, "BC5 (Linear, DX 10+)"); configUI.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.BC6H, "BC6H (Linear, DX 11+)"); configUI.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.BC7, "BC7 (Linear, DX 11+)"); configUI.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.BC7Srgb, "BC7 (sRGB, DX 11+)"); configUI.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.B8G8R8A8, "B8G8R8A8 (Linear, A8R8G8B8)"); configUI.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.B8G8R8X8, "B8G8R8X8 (Linear, X8R8G8B8)"); configUI.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.R8G8B8A8, "R8G8B8A8 (Linear, A8B8G8R8)"); configUI.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.B5G5R5A1, "B5G5R5A1 (Linear, A1R5G5B5)"); configUI.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.B4G4R4A4, "B4G4R4A4 (Linear, A4R4G4B4)"); configUI.FindControlForPropertyName(PropertyNames.FileFormat).SetValueDisplayName(DdsFileFormat.B5G6R5, "B5G6R5 (Linear, R5G6B5)"); configUI.SetPropertyControlValue(PropertyNames.BC7CompressionMode, ControlInfoPropertyNames.DisplayName, "BC6H / BC7 Compression Mode"); configUI.FindControlForPropertyName(PropertyNames.BC7CompressionMode).SetValueDisplayName(BC7CompressionMode.Fast, "Fast"); configUI.FindControlForPropertyName(PropertyNames.BC7CompressionMode).SetValueDisplayName(BC7CompressionMode.Normal, "Normal"); configUI.FindControlForPropertyName(PropertyNames.BC7CompressionMode).SetValueDisplayName(BC7CompressionMode.Slow, "Slow"); configUI.SetPropertyControlValue(PropertyNames.ErrorMetric, ControlInfoPropertyNames.DisplayName, "Error Metric"); configUI.SetPropertyControlType(PropertyNames.ErrorMetric, PropertyControlType.RadioButton); configUI.FindControlForPropertyName(PropertyNames.ErrorMetric).SetValueDisplayName(DdsErrorMetric.Perceptual, "Perceptual"); configUI.FindControlForPropertyName(PropertyNames.ErrorMetric).SetValueDisplayName(DdsErrorMetric.Uniform, "Uniform"); configUI.SetPropertyControlValue(PropertyNames.CubeMap, ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlValue(PropertyNames.CubeMap, ControlInfoPropertyNames.Description, "Cube Map from crossed image"); configUI.SetPropertyControlValue(PropertyNames.GenerateMipMaps, ControlInfoPropertyNames.DisplayName, string.Empty); configUI.SetPropertyControlValue(PropertyNames.GenerateMipMaps, ControlInfoPropertyNames.Description, "Generate Mip Maps"); configUI.SetPropertyControlValue(PropertyNames.MipMapResamplingAlgorithm, ControlInfoPropertyNames.DisplayName, string.Empty); configUI.FindControlForPropertyName(PropertyNames.MipMapResamplingAlgorithm).SetValueDisplayName(MipMapSampling.NearestNeighbor, "Nearest Neighbor"); configUI.FindControlForPropertyName(PropertyNames.MipMapResamplingAlgorithm).SetValueDisplayName(MipMapSampling.Bicubic, "Bicubic"); configUI.FindControlForPropertyName(PropertyNames.MipMapResamplingAlgorithm).SetValueDisplayName(MipMapSampling.Bilinear, "Bilinear"); configUI.FindControlForPropertyName(PropertyNames.MipMapResamplingAlgorithm).SetValueDisplayName(MipMapSampling.Fant, "Fant"); return(configUI); }
public override ControlInfo OnCreateSaveConfigUI(PropertyCollection props) { ControlInfo configUI = CreateDefaultSaveConfigUI(props); PropertyControlInfo formatPCI = configUI.FindControlForPropertyName(PropertyNames.FileFormat); formatPCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = string.Empty; formatPCI.SetValueDisplayName(DdsFileFormat.BC1, this.strings.GetString("DdsFileFormat_BC1")); formatPCI.SetValueDisplayName(DdsFileFormat.BC1Srgb, this.strings.GetString("DdsFileFormat_BC1Srgb")); formatPCI.SetValueDisplayName(DdsFileFormat.BC2, this.strings.GetString("DdsFileFormat_BC2")); formatPCI.SetValueDisplayName(DdsFileFormat.BC2Srgb, this.strings.GetString("DdsFileFormat_BC2Srgb")); formatPCI.SetValueDisplayName(DdsFileFormat.BC3, this.strings.GetString("DdsFileFormat_BC3")); formatPCI.SetValueDisplayName(DdsFileFormat.BC3Srgb, this.strings.GetString("DdsFileFormat_BC3Srgb")); formatPCI.SetValueDisplayName(DdsFileFormat.BC4Unsigned, this.strings.GetString("DdsFileFormat_BC4Unsigned")); formatPCI.SetValueDisplayName(DdsFileFormat.BC5Unsigned, this.strings.GetString("DdsFileFormat_BC5Unsigned")); formatPCI.SetValueDisplayName(DdsFileFormat.BC5Signed, this.strings.GetString("DdsFileFormat_BC5Signed")); formatPCI.SetValueDisplayName(DdsFileFormat.BC6HUnsigned, this.strings.GetString("DdsFileFormat_BC6HUnsigned")); formatPCI.SetValueDisplayName(DdsFileFormat.BC7, this.strings.GetString("DdsFileFormat_BC7")); formatPCI.SetValueDisplayName(DdsFileFormat.BC7Srgb, this.strings.GetString("DdsFileFormat_BC7Srgb")); formatPCI.SetValueDisplayName(DdsFileFormat.B8G8R8A8, this.strings.GetString("DdsFileFormat_B8G8R8A8")); formatPCI.SetValueDisplayName(DdsFileFormat.B8G8R8A8Srgb, this.strings.GetString("DdsFileFormat_B8G8R8A8Srgb")); formatPCI.SetValueDisplayName(DdsFileFormat.B8G8R8X8, this.strings.GetString("DdsFileFormat_B8G8R8X8")); formatPCI.SetValueDisplayName(DdsFileFormat.B8G8R8X8Srgb, this.strings.GetString("DdsFileFormat_B8G8R8X8Srgb")); formatPCI.SetValueDisplayName(DdsFileFormat.R8G8B8A8, this.strings.GetString("DdsFileFormat_R8G8B8A8")); formatPCI.SetValueDisplayName(DdsFileFormat.R8G8B8A8Srgb, this.strings.GetString("DdsFileFormat_R8G8B8A8Srgb")); formatPCI.SetValueDisplayName(DdsFileFormat.R8G8B8X8, this.strings.GetString("DdsFileFormat_R8G8B8X8")); formatPCI.SetValueDisplayName(DdsFileFormat.B5G5R5A1, this.strings.GetString("DdsFileFormat_B5G5R5A1")); formatPCI.SetValueDisplayName(DdsFileFormat.B4G4R4A4, this.strings.GetString("DdsFileFormat_B4G4R4A4")); formatPCI.SetValueDisplayName(DdsFileFormat.B5G6R5, this.strings.GetString("DdsFileFormat_B5G6R5")); formatPCI.SetValueDisplayName(DdsFileFormat.B8G8R8, this.strings.GetString("DdsFileFormat_B8G8R8")); formatPCI.SetValueDisplayName(DdsFileFormat.R8Unsigned, this.strings.GetString("DdsFileFormat_R8Unsigned")); formatPCI.SetValueDisplayName(DdsFileFormat.R8G8Unsigned, this.strings.GetString("DdsFileFormat_R8G8Unsigned")); formatPCI.SetValueDisplayName(DdsFileFormat.R8G8Signed, this.strings.GetString("DdsFileFormat_R8G8Signed")); PropertyControlInfo compresionModePCI = configUI.FindControlForPropertyName(PropertyNames.BC7CompressionSpeed); compresionModePCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = this.strings.GetString("BC7CompressionSpeed_DisplayName"); compresionModePCI.SetValueDisplayName(BC7CompressionSpeed.Fast, this.strings.GetString("BC7CompressionSpeed_Fast")); compresionModePCI.SetValueDisplayName(BC7CompressionSpeed.Medium, this.strings.GetString("BC7CompressionSpeed_Medium")); compresionModePCI.SetValueDisplayName(BC7CompressionSpeed.Slow, this.strings.GetString("BC7CompressionSpeed_Slow")); PropertyControlInfo errorMetricPCI = configUI.FindControlForPropertyName(PropertyNames.ErrorMetric); errorMetricPCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = this.strings.GetString("ErrorMetric_DisplayName"); errorMetricPCI.ControlType.Value = PropertyControlType.RadioButton; errorMetricPCI.SetValueDisplayName(DdsErrorMetric.Perceptual, this.strings.GetString("ErrorMetric_Perceptual")); errorMetricPCI.SetValueDisplayName(DdsErrorMetric.Uniform, this.strings.GetString("ErrorMetric_Uniform")); PropertyControlInfo cubemapPCI = configUI.FindControlForPropertyName(PropertyNames.CubeMap); cubemapPCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = string.Empty; cubemapPCI.ControlProperties[ControlInfoPropertyNames.Description].Value = this.strings.GetString("CubeMap_Description"); PropertyControlInfo generateMipPCI = configUI.FindControlForPropertyName(PropertyNames.GenerateMipMaps); generateMipPCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = string.Empty; generateMipPCI.ControlProperties[ControlInfoPropertyNames.Description].Value = this.strings.GetString("GenerateMipMaps_Description"); PropertyControlInfo mipResamplingPCI = configUI.FindControlForPropertyName(PropertyNames.MipMapResamplingAlgorithm); mipResamplingPCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = string.Empty; mipResamplingPCI.SetValueDisplayName(ResamplingAlgorithm.NearestNeighbor, this.strings.GetString("ResamplingAlgorithm_NearestNeighbor")); mipResamplingPCI.SetValueDisplayName(ResamplingAlgorithm.Bicubic, this.strings.GetString("ResamplingAlgorithm_Bicubic")); mipResamplingPCI.SetValueDisplayName(ResamplingAlgorithm.Bilinear, this.strings.GetString("ResamplingAlgorithm_Bilinear")); mipResamplingPCI.SetValueDisplayName(ResamplingAlgorithm.Fant, this.strings.GetString("ResamplingAlgorithm_Fant")); mipResamplingPCI.SetValueDisplayName(ResamplingAlgorithm.SuperSampling, this.strings.GetString("ResamplingAlgorithm_SuperSampling")); PropertyControlInfo forumLinkPCI = configUI.FindControlForPropertyName(PropertyNames.ForumLink); forumLinkPCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = this.strings.GetString("ForumLink_DisplayName"); forumLinkPCI.ControlProperties[ControlInfoPropertyNames.Description].Value = this.strings.GetString("ForumLink_Description"); PropertyControlInfo githubLinkPCI = configUI.FindControlForPropertyName(PropertyNames.GitHubLink); githubLinkPCI.ControlProperties[ControlInfoPropertyNames.DisplayName].Value = string.Empty; githubLinkPCI.ControlProperties[ControlInfoPropertyNames.Description].Value = "GitHub"; // GitHub is a brand name that should not be localized. return(configUI); }