public override IDictionary <int, PropertyInfo> DeterminePropertyOrder() { int order = 0; IList <bool> orderAttributes = new List <bool>(); foreach (var p in Properties) { if (p.GetCustomAttributes(false).Any(x => x.GetType() == typeof(PropertyOrderAttribute))) { orderAttributes.Add(true); order = ((PropertyOrderAttribute)(p.GetCustomAttributes(false).First(x => x.GetType() == typeof(PropertyOrderAttribute)))).Order; if (order >= Properties.Count()) { throw new OrderOutOfValuesRange(p, typeof(T), order); } } else { orderAttributes.Add(false); } if (orderAttributes.Distinct().Count() > 1) { throw new PartlyOrderAttribute(typeof(T)); } PropertyOrder.Add(order, p); order++; } return(PropertyOrder); }
private static int CompareCore(object x, object y) { ModelPropertyEntry j = x as ModelPropertyEntry; ModelPropertyEntry k = y as ModelPropertyEntry; if (j == null && k == null) { return(0); } if (j == null) { return(-1); } if (k == null) { return(1); } PropertyOrder a = j.PropertyOrder ?? DefaultOrder; PropertyOrder b = k.PropertyOrder ?? DefaultOrder; int result = a.CompareTo(b); return(result != 0 ? result : string.Compare(j.DisplayName, k.DisplayName, StringComparison.CurrentCulture)); }
public override int Compare(PropertyEntry x, PropertyEntry y) { SceneNodeProperty sceneNodeProperty1 = (SceneNodeProperty)x; SceneNodeProperty sceneNodeProperty2 = (SceneNodeProperty)y; PropertyOrder propertyOrder1 = (PropertyOrder)sceneNodeProperty1.PropertyOrder; PropertyOrder propertyOrder2 = (PropertyOrder)sceneNodeProperty2.PropertyOrder; int num = !OrderToken.op_Equality((OrderToken)propertyOrder1, (OrderToken)propertyOrder2) ? ((OrderToken)propertyOrder1).CompareTo((OrderToken)propertyOrder2) : 0; if (num != 0) { return(num); } return(x.get_PropertyName().CompareTo(y.get_PropertyName())); }
public override int Compare(PropertyEntry x, PropertyEntry y) { SceneNodeProperty sceneNodeProperty1 = (SceneNodeProperty)x; SceneNodeProperty sceneNodeProperty2 = (SceneNodeProperty)y; PropertyOrder propertyOrder1 = (PropertyOrder)sceneNodeProperty1.PropertyOrder; PropertyOrder propertyOrder2 = (PropertyOrder)sceneNodeProperty2.PropertyOrder; int num = !((OrderToken)propertyOrder1 == (OrderToken)propertyOrder2) ? propertyOrder1.CompareTo((OrderToken)propertyOrder2) : 0; if (num != 0) { return(num); } return(x.PropertyName.CompareTo(y.PropertyName)); }
public override IDictionary <int, PropertyInfo> DeterminePropertyOrder() { for (int i = 0; i < FirstArray.Length; i++) { try { var p = Properties.First(x => x.Name.ToLower() == FirstArray[i].ToLower()); PropertyOrder.Add(i, p); } catch (InvalidOperationException) { throw new PropertyNotFound(FirstArray[i], typeof(T)); } } return(PropertyOrder); }
private static void TmpInitGranularity(out Granularity granularity) { granularity = new Granularity(); granularity.Limit = 3; //granularity.Offset = 1; granularity.PropertyOrders = new List <PropertyOrder>(); PropertyOrder propertyOrder = new PropertyOrder(); propertyOrder.PropertyName = RequestParamKeys.Campaign.Id; propertyOrder.Order = Ordering.Ascending; PropertyOrder propertyOrder1 = new PropertyOrder(); propertyOrder1.PropertyName = RequestParamKeys.Campaign.LimitClicks; propertyOrder1.Order = Ordering.Ascending; granularity.PropertyOrders.Add(propertyOrder); granularity.PropertyOrders.Add(propertyOrder1); }
/// <summary> /// To register design time metadata for SSWC.TimeUpDown. /// </summary> public TimeUpDownMetadata() : base() { AddCallback( typeof(SSWC.TimeUpDown), b => { b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimeUpDown>(x => x.IsEditable), new CategoryAttribute(Properties.Resources.CommonProperties)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimeUpDown>(x => x.Minimum), new CategoryAttribute(Properties.Resources.CommonProperties)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimeUpDown>(x => x.Maximum), new CategoryAttribute(Properties.Resources.CommonProperties)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimeUpDown>(x => x.Value), new CategoryAttribute(Properties.Resources.CommonProperties)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimeUpDown>(x => x.IsCyclic), new CategoryAttribute(Properties.Resources.CommonProperties)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimeUpDown>(x => x.TimeParsers), new CategoryAttribute(Properties.Resources.TimeInput)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimeUpDown>(x => x.Format), new CategoryAttribute(Properties.Resources.TimeInput)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimeUpDown>(x => x.Culture), new CategoryAttribute(Properties.Resources.TimeInput)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimeUpDown>(x => x.TimeGlobalizationInfo), new CategoryAttribute(Properties.Resources.TimeInput)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimeUpDown>(x => x.Culture), PropertyValueEditor.CreateEditorAttribute(typeof(CultureInfoEditor))); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimeUpDown>(x => x.TimeGlobalizationInfo), new TypeConverterAttribute(typeof(ExpandableObjectConverter))); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimeUpDown>(x => x.ActualTimeParsers), new BrowsableAttribute(false)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimeUpDown>(x => x.Minimum), new PropertyOrderAttribute(PropertyOrder.Early)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimeUpDown>(x => x.Maximum), new PropertyOrderAttribute(PropertyOrder.CreateAfter(PropertyOrder.Early))); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimeUpDown>(x => x.Value), new PropertyOrderAttribute(PropertyOrder.CreateAfter(PropertyOrder.Early))); b.AddCustomAttributes(new DefaultBindingPropertyAttribute( Extensions.GetMemberName <SSWC.TimeUpDown>(x => x.Value))); #if MWD40 b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.BasicControls, true)); #endif }); }
/// <summary> /// Evaluates the function on a vector argument. /// </summary> /// <param name="Arguments">Function arguments.</param> /// <param name="Variables">Variables collection.</param> /// <returns>Function result.</returns> public override IElement Evaluate(IElement[] Arguments, Variables Variables) { int c = Arguments.Length; if (!(Arguments[0] is IVector Vector)) { throw new ScriptRuntimeException("First argument muts be a vector.", this); } ICollection <IElement> Temp = Vector.VectorElements; IElement[] Elements; int i; if (Temp is IElement[] V) { Elements = (IElement[])V.Clone(); } else { Elements = new IElement[Temp.Count]; i = 0; foreach (IElement E in Temp) { Elements[i++] = E; } } if (c == 1) { Array.Sort <IElement>(Elements, new ElementOrder(this)); } else { IComparer <IElement>[] Comparers = new IComparer <IElement> [c]; IElement Element; for (i = 1; i < c; i++) { Element = Arguments[i]; if (Element is DoubleNumber N) { double d = N.Value; int Sign = 1; if (d < 0) { Sign = -1; d = -d; } if (d == 0 || d > int.MaxValue || d != Math.Truncate(d)) { throw new ScriptRuntimeException("Index values must be non-zero integers.", this); } Comparers[i - 1] = new IndexOrder(this, (int)(d - 1), Sign); } else if (Element is StringValue S) { string s = S.Value; int Sign = 1; if (s.StartsWith("-")) { s = s.Substring(1); Sign = -1; } Comparers[i - 1] = new PropertyOrder(this, s, Sign); } else if (Element is ILambdaExpression Lambda) { if (Lambda.NrArguments != 2) { throw new ScriptRuntimeException("Lambda expressions must take exactly two parameters.", this); } Comparers[i - 1] = new LambdaOrder(Lambda, Variables); } else { throw new ScriptRuntimeException("Order parameters must be either lambda expressions, " + "string values representing field names or numeric index values.", this); } } Comparers[c - 1] = new ElementOrder(this); Array.Sort(Elements, new CompoundOrder(Comparers)); } return(Vector.Encapsulate(Elements, this)); }
/// <summary> /// To register design time metadata for SSWC.TimePicker. /// </summary> public TimePickerMetadata() : base() { AddCallback( typeof(SSWC.TimePicker), b => { b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePicker>(x => x.Minimum), new CategoryAttribute(Properties.Resources.CommonProperties)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePicker>(x => x.Maximum), new CategoryAttribute(Properties.Resources.CommonProperties)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePicker>(x => x.Value), new CategoryAttribute(Properties.Resources.CommonProperties)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePicker>(x => x.Popup), new CategoryAttribute(Properties.Resources.CommonProperties)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePicker>(x => x.TimeParsers), new CategoryAttribute(Properties.Resources.TimeInput)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePicker>(x => x.Format), new CategoryAttribute(Properties.Resources.TimeInput)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePicker>(x => x.Culture), new CategoryAttribute(Properties.Resources.TimeInput)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePicker>(x => x.TimeGlobalizationInfo), new CategoryAttribute(Properties.Resources.TimeInput)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePicker>(x => x.PopupMinutesInterval), new CategoryAttribute(Properties.Resources.TimeInput)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePicker>(x => x.PopupSecondsInterval), new CategoryAttribute(Properties.Resources.TimeInput)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePicker>(x => x.PopupTimeSelectionMode), new CategoryAttribute(Properties.Resources.TimeInput)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePicker>(x => x.Culture), PropertyValueEditor.CreateEditorAttribute(typeof(CultureInfoEditor))); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePicker>(x => x.TimeGlobalizationInfo), new TypeConverterAttribute(typeof(ExpandableObjectConverter))); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePicker>(x => x.ActualTimeParsers), new BrowsableAttribute(false)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePicker>(x => x.Minimum), new PropertyOrderAttribute(PropertyOrder.Early)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePicker>(x => x.Maximum), new PropertyOrderAttribute(PropertyOrder.CreateAfter(PropertyOrder.Early))); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePicker>(x => x.Value), new PropertyOrderAttribute(PropertyOrder.CreateAfter(PropertyOrder.Early))); b.AddCustomAttributes(new DefaultBindingPropertyAttribute( Extensions.GetMemberName <SSWC.TimePicker>(x => x.Value))); #if MWD40 b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePicker>(x => x.Popup), new AlternateContentPropertyAttribute()); b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Controls, true)); b.AddCustomAttributes(new FeatureAttribute(typeof(TimePickerIsDropDownOpenDesignModeValueProvider))); b.AddCustomAttributes(new FeatureAttribute(typeof(TimePickerIsDropDownOpenDesignModeValueProvider.AdornerProxy))); #endif }); }
/// <summary> /// Provide a place to add custom attributes without creating a builder subclass. /// </summary> /// <param name="builder">The assembly attribute table builder.</param> protected override void AddAttributes(AttributeTableBuilder builder) { //builder.AddCustomAttributes( // typeof(BandedSwirlEffect) // , Ext.GetMemberName<BrightExtractEffect>(o => o.Threshold) // , new NumberRangesAttribute(null, 0, 1, null, null) // , new NumberIncrementsAttribute(0.01, 0.025, 0.1) // , new NumberFormatAttribute("0'%'", null, 100) // ); #region BandedSwirlEffect builder.AddCallback( typeof(ShaderEffectLibrary.BandedSwirlEffect) , b => b.AddCustomAttributes ( new ToolboxBrowsableAttribute(true) , new DefaultPropertyAttribute(Ext.GetMemberName <ShaderEffectLibrary.BandedSwirlEffect>(o => o.SwirlStrength)) ) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.BandedSwirlEffect) , Ext.GetMemberName <ShaderEffectLibrary.BandedSwirlEffect>(o => o.SwirlStrength) , new DisplayNameAttribute(@"Swirl Strength") , new NumberRangesAttribute(null, -10, 10, null, null) , new NumberIncrementsAttribute(.01, .1, 1) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.BandedSwirlEffect) , Ext.GetMemberName <ShaderEffectLibrary.BandedSwirlEffect>(o => o.DistanceThreshold) , new DisplayNameAttribute(@"Distance Threshold") , new NumberRangesAttribute(null, 0, 1, null, null) , new NumberIncrementsAttribute(.0001, .001, .01) ); #endregion #region BloomEffect builder.AddCallback( typeof(ShaderEffectLibrary.BloomEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.BloomEffect) , Ext.GetMemberName <ShaderEffectLibrary.BloomEffect>(o => o.BloomIntensity) , new DisplayNameAttribute(@"Bloom Intensity") , new NumberRangesAttribute(null, 0, 10, null, null) , new NumberIncrementsAttribute(0.01, 0.020, 0.1) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.BloomEffect) , Ext.GetMemberName <ShaderEffectLibrary.BloomEffect>(o => o.BaseIntensity) , new DisplayNameAttribute(@"Base Intensity") , new NumberRangesAttribute(null, 0, 10, null, null) , new NumberIncrementsAttribute(0.01, 0.020, 0.1) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.BloomEffect) , Ext.GetMemberName <ShaderEffectLibrary.BloomEffect>(o => o.BloomSaturation) , new DisplayNameAttribute(@"Bloom Saturation") , new NumberRangesAttribute(null, 0, 10, null, null) , new NumberIncrementsAttribute(0.01, 0.020, 0.1) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.BloomEffect) , Ext.GetMemberName <ShaderEffectLibrary.BloomEffect>(o => o.BaseSaturation) , new DisplayNameAttribute(@"Base Saturation") , new NumberRangesAttribute(null, 0, 10, null, null) , new NumberIncrementsAttribute(0.01, 0.020, 0.1) ); #endregion #region BrightExtractEffect builder.AddCallback( typeof(ShaderEffectLibrary.BrightExtractEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.BrightExtractEffect) , Ext.GetMemberName <ShaderEffectLibrary.BrightExtractEffect>(o => o.Threshold) , new NumberRangesAttribute(null, 0, 1, null, null) , new NumberIncrementsAttribute(0.01, 0.025, 0.1) , new NumberFormatAttribute("0'%'", null, 100) ); #endregion #region ColorKeyAlphaEffect builder.AddCallback( typeof(ShaderEffectLibrary.ColorKeyAlphaEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); #endregion #region ColorToneAlphaEffect builder.AddCallback( typeof(ShaderEffectLibrary.ColorToneAlphaEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.ColorToneAlphaEffect) , Ext.GetMemberName <ShaderEffectLibrary.ColorToneAlphaEffect>(o => o.Desaturation) , new NumberRangesAttribute(null, 0, 10, null, null) , new NumberIncrementsAttribute(0.01, 0.020, 0.1) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.ColorToneAlphaEffect) , Ext.GetMemberName <ShaderEffectLibrary.ColorToneAlphaEffect>(o => o.Toned) , new NumberRangesAttribute(null, 0, 10, null, null) , new NumberIncrementsAttribute(0.01, 0.020, 0.1) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.ColorToneAlphaEffect) , Ext.GetMemberName <ShaderEffectLibrary.ColorToneAlphaEffect>(o => o.DarkColor) , new DisplayNameAttribute(@"Dark Color") ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.ColorToneAlphaEffect) , Ext.GetMemberName <ShaderEffectLibrary.ColorToneAlphaEffect>(o => o.LightColor) , new DisplayNameAttribute(@"Light Color") ); #endregion #region ColorToneEffect builder.AddCallback( typeof(ShaderEffectLibrary.ColorToneEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.ColorToneEffect) , Ext.GetMemberName <ShaderEffectLibrary.ColorToneEffect>(o => o.Desaturation) , new NumberRangesAttribute(null, 0, 10, null, null) , new NumberIncrementsAttribute(0.01, 0.020, 0.1) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.ColorToneEffect) , Ext.GetMemberName <ShaderEffectLibrary.ColorToneEffect>(o => o.Toned) , new NumberRangesAttribute(null, 0, 10, null, null) , new NumberIncrementsAttribute(0.01, 0.020, 0.1) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.ColorToneEffect) , Ext.GetMemberName <ShaderEffectLibrary.ColorToneEffect>(o => o.DarkColor) , new DisplayNameAttribute(@"Dark Color") ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.ColorToneEffect) , Ext.GetMemberName <ShaderEffectLibrary.ColorToneEffect>(o => o.LightColor) , new DisplayNameAttribute(@"Light Color") ); #endregion #region ContrastAdjustEffect builder.AddCallback( typeof(ShaderEffectLibrary.ContrastAdjustEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.ContrastAdjustEffect) , Ext.GetMemberName <ShaderEffectLibrary.ContrastAdjustEffect>(o => o.Brightness) , new NumberRangesAttribute(null, 0, 1, null, null) , new NumberIncrementsAttribute(0.01, 0.025, 0.1) , new NumberFormatAttribute("0'%'", null, 100) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.ContrastAdjustEffect) , Ext.GetMemberName <ShaderEffectLibrary.ContrastAdjustEffect>(o => o.Contrast) , new NumberRangesAttribute(null, 0, 1, null, null) , new NumberIncrementsAttribute(0.01, 0.025, 0.1) , new NumberFormatAttribute("0'%'", null, 100) ); #endregion #region DirectionalBlurEffect builder.AddCallback( typeof(ShaderEffectLibrary.DirectionalBlurEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.DirectionalBlurEffect) , Ext.GetMemberName <ShaderEffectLibrary.DirectionalBlurEffect>(o => o.Angle) , new NumberRangesAttribute(null, 0, 360, null, null) , new NumberIncrementsAttribute(0.1, 0.50, 1.0) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.DirectionalBlurEffect) , Ext.GetMemberName <ShaderEffectLibrary.DirectionalBlurEffect>(o => o.BlurAmount) , new NumberRangesAttribute(null, 0, 1, null, null) , new NumberIncrementsAttribute(0.001, 0.0025, 0.01) , new DisplayNameAttribute(@"Blur Amount") ); #endregion #region EmbossedEffect builder.AddCallback( typeof(ShaderEffectLibrary.EmbossedEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.EmbossedEffect) , Ext.GetMemberName <ShaderEffectLibrary.EmbossedEffect>(o => o.Amount) , new NumberRangesAttribute(0, 0, 10, 30, null) , new NumberIncrementsAttribute(0.01, 0.020, 0.1) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.EmbossedEffect) , Ext.GetMemberName <ShaderEffectLibrary.EmbossedEffect>(o => o.Width) , new NumberRangesAttribute(0, 0, 0.005, 0.005, null) , new NumberIncrementsAttribute(0.000001, 0.00001, 0.001) , new NumberFormatAttribute("0'%'", 10, 100) ); #endregion #region GloomEffect builder.AddCallback( typeof(ShaderEffectLibrary.GloomEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.GloomEffect) , Ext.GetMemberName <ShaderEffectLibrary.GloomEffect>(o => o.GloomIntensity) , new DisplayNameAttribute(@"Gloom Intensity") , new NumberRangesAttribute(null, 0, 1, null, null) , new NumberIncrementsAttribute(0.01, 0.025, 0.1) , new NumberFormatAttribute("0'%'", 4, 100) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.GloomEffect) , Ext.GetMemberName <ShaderEffectLibrary.GloomEffect>(o => o.BaseIntensity) , new DisplayNameAttribute(@"Base Intensity") , new NumberRangesAttribute(null, 0, 1, null, null) , new NumberIncrementsAttribute(0.01, 0.025, 0.1) , new NumberFormatAttribute("0'%'", 4, 100) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.GloomEffect) , Ext.GetMemberName <ShaderEffectLibrary.GloomEffect>(o => o.GloomSaturation) , new DisplayNameAttribute(@"Gloom Saturation") , new NumberRangesAttribute(null, 0, 1, null, null) , new NumberIncrementsAttribute(0.01, 0.025, 0.1) , new NumberFormatAttribute("0'%'", 4, 100) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.GloomEffect) , Ext.GetMemberName <ShaderEffectLibrary.GloomEffect>(o => o.BaseSaturation) , new DisplayNameAttribute(@"Base Saturation") , new NumberRangesAttribute(null, 0, 1, null, null) , new NumberIncrementsAttribute(0.01, 0.025, 0.1) , new NumberFormatAttribute("0'%'", 4, 100) ); #endregion #region GrowablePoissonDiskEffect builder.AddCallback( typeof(ShaderEffectLibrary.GrowablePoissonDiskEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.GrowablePoissonDiskEffect) , Ext.GetMemberName <ShaderEffectLibrary.GrowablePoissonDiskEffect>(o => o.Radius) , new NumberRangesAttribute(null, 0, 1, null, null) , new NumberIncrementsAttribute(0.01, 0.025, 0.1) , new NumberFormatAttribute("0'%'", null, 100) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.GrowablePoissonDiskEffect) , Ext.GetMemberName <ShaderEffectLibrary.GrowablePoissonDiskEffect>(o => o.Width) , new NumberRangesAttribute(0, 0, 10, 50, null) , new NumberIncrementsAttribute(0.01, 0.020, 0.1) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.GrowablePoissonDiskEffect) , Ext.GetMemberName <ShaderEffectLibrary.GrowablePoissonDiskEffect>(o => o.Height) , new NumberRangesAttribute(0, 0, 10, 50, null) , new NumberIncrementsAttribute(0.01, 0.020, 0.1) ); #endregion #region InvertColorEffect builder.AddCallback( typeof(ShaderEffectLibrary.InvertColorEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); #endregion #region LightStreakEffect builder.AddCallback( typeof(ShaderEffectLibrary.LightStreakEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.LightStreakEffect) , Ext.GetMemberName <ShaderEffectLibrary.LightStreakEffect>(o => o.BrightThreshold) , new DisplayNameAttribute(@"Bright Threshold") , new NumberRangesAttribute(null, 0, 1, null, null) , new NumberIncrementsAttribute(0.01, 0.025, 0.1) , new NumberFormatAttribute("0'%'", null, 100) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.LightStreakEffect) , Ext.GetMemberName <ShaderEffectLibrary.LightStreakEffect>(o => o.Scale) , new NumberRangesAttribute(null, 0, 4, null, null) , new NumberIncrementsAttribute(0.01, 0.020, 0.1) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.LightStreakEffect) , Ext.GetMemberName <ShaderEffectLibrary.LightStreakEffect>(o => o.Attenuation) , new NumberRangesAttribute(null, 0, 1, null, null) , new NumberIncrementsAttribute(0.01, 0.025, 0.1) , new NumberFormatAttribute("0'%'", null, 100) ); #endregion #region MagnifyEffect builder.AddCallback( typeof(ShaderEffectLibrary.MagnifyEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.MagnifyEffect) , Ext.GetMemberName <ShaderEffectLibrary.MagnifyEffect>(o => o.ShrinkFactor) , new DisplayNameAttribute(@"Shrink Factor") , new NumberRangesAttribute(null, 0, 1, null, null) , new NumberIncrementsAttribute(0.01, 0.025, 0.1) , new NumberFormatAttribute("0'%'", 4, 100) ); #endregion #region MonochromeEffect builder.AddCallback( typeof(ShaderEffectLibrary.MonochromeEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.MonochromeEffect) , Ext.GetMemberName <ShaderEffectLibrary.MonochromeEffect>(o => o.FilterColor) , new DisplayNameAttribute(@"Filter Color") ); #endregion #region PinchEffect builder.AddCallback( typeof(ShaderEffectLibrary.PinchEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.PinchEffect) , Ext.GetMemberName <ShaderEffectLibrary.PinchEffect>(o => o.Radius) , new NumberRangesAttribute(null, 0, 1, null, null) , new NumberIncrementsAttribute(0.01, 0.025, 0.1) , new NumberFormatAttribute("0'%'", null, 100) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.PinchEffect) , Ext.GetMemberName <ShaderEffectLibrary.PinchEffect>(o => o.Amount) , new NumberRangesAttribute(0, 0, 10, 4, null) , new NumberIncrementsAttribute(0.01, 0.020, 0.1) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.PinchEffect) , Ext.GetMemberName <ShaderEffectLibrary.PinchEffect>(o => o.CenterX) , new DisplayNameAttribute(@"Center X") , new NumberRangesAttribute(null, 0, 1, null, null) , new NumberIncrementsAttribute(0.01, 0.025, 0.1) , new NumberFormatAttribute("0'%'", null, 100) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.PinchEffect) , Ext.GetMemberName <ShaderEffectLibrary.PinchEffect>(o => o.CenterY) , new DisplayNameAttribute(@"Center Y") , new NumberRangesAttribute(null, 0, 1, null, null) , new NumberIncrementsAttribute(0.01, 0.025, 0.1) , new NumberFormatAttribute("0'%'", null, 100) ); #endregion #region PixelateEffect builder.AddCallback( typeof(ShaderEffectLibrary.PixelateEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.PixelateEffect) , Ext.GetMemberName <ShaderEffectLibrary.PixelateEffect>(o => o.HorizontalPixelCounts) , new DisplayNameAttribute(@"Horizontal Pixel Counts") , new NumberRangesAttribute(null, 0, 800, null, null) , new NumberIncrementsAttribute(0.1, 0.25, 1.0) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.PixelateEffect) , Ext.GetMemberName <ShaderEffectLibrary.PixelateEffect>(o => o.VerticalPixelCounts) , new DisplayNameAttribute(@"Vertical Pixel Counts") , new NumberRangesAttribute(null, 0, 800, null, null) , new NumberIncrementsAttribute(0.1, 0.25, 1.0) ); #endregion #region RippleEffect builder.AddCallback( typeof(ShaderEffectLibrary.RippleEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.RippleEffect) , Ext.GetMemberName <ShaderEffectLibrary.RippleEffect>(o => o.Amplitude) , new NumberRangesAttribute(null, 0, 1, null, null) , new NumberIncrementsAttribute(0.001, 0.0025, 0.01) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.RippleEffect) , Ext.GetMemberName <ShaderEffectLibrary.RippleEffect>(o => o.Amplitude) , new NumberRangesAttribute(null, 0, 100, null, null) , new NumberIncrementsAttribute(0.10, 0.25, 1.0) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.RippleEffect) , Ext.GetMemberName <ShaderEffectLibrary.RippleEffect>(o => o.Phase) , new NumberRangesAttribute(0, 0, 10, 10, null) , new NumberIncrementsAttribute(0.01, 0.020, 0.1) ); #endregion #region SharpenEffect builder.AddCallback( typeof(ShaderEffectLibrary.SharpenEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.SharpenEffect) , Ext.GetMemberName <ShaderEffectLibrary.SharpenEffect>(o => o.Amount) , new NumberRangesAttribute(null, 0, 100, null, null) , new NumberIncrementsAttribute(0.10, 0.25, 1.0) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.SharpenEffect) , Ext.GetMemberName <ShaderEffectLibrary.SharpenEffect>(o => o.Width) , new NumberRangesAttribute(null, 0, 100, null, null) , new NumberIncrementsAttribute(0.0001, 0.001, 0.01) ); #endregion #region SmoothMagnifyEffect builder.AddCallback( typeof(ShaderEffectLibrary.SmoothMagnifyEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.SmoothMagnifyEffect) , Ext.GetMemberName <ShaderEffectLibrary.SmoothMagnifyEffect>(o => o.InnerRadius) , new DisplayNameAttribute(@"Inner Radius") , new NumberRangesAttribute(null, 0, 0.6, null, null) , new NumberIncrementsAttribute(0.001, 0.0025, 0.01) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.SmoothMagnifyEffect) , Ext.GetMemberName <ShaderEffectLibrary.SmoothMagnifyEffect>(o => o.OuterRadius) , new DisplayNameAttribute(@"Outer Radius") , new NumberRangesAttribute(0, 0, 1.0, 1.0, null) , new NumberIncrementsAttribute(0.001, 0.0025, 0.01) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.SmoothMagnifyEffect) , Ext.GetMemberName <ShaderEffectLibrary.SmoothMagnifyEffect>(o => o.Magnification) , new NumberRangesAttribute(0, 0, 10.0, 10.0, null) , new NumberIncrementsAttribute(0.01, 0.025, 0.1) ); #endregion #region SwirlEffect builder.AddCallback( typeof(ShaderEffectLibrary.SwirlEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.SwirlEffect) , Ext.GetMemberName <ShaderEffectLibrary.SwirlEffect>(o => o.SwirlStrength) , new DisplayNameAttribute(@"Swirl Strength") , new NumberRangesAttribute(-20, 0, 10.0, 20.0, null) , new NumberIncrementsAttribute(0.01, 0.025, 0.1) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.SwirlEffect) , Ext.GetMemberName <ShaderEffectLibrary.SwirlEffect>(o => o.AngleFrequency) , new DisplayNameAttribute(@"Angle Frequency") , new NumberIncrementsAttribute(0.01, 0.025, 0.1) ); #endregion #region ToneMappingEffect builder.AddCallback( typeof(ShaderEffectLibrary.ToneMappingEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.ToneMappingEffect) , Ext.GetMemberName <ShaderEffectLibrary.ToneMappingEffect>(o => o.Exposure) , new NumberRangesAttribute(0, 0, 1.0, 3.0, null) , new NumberIncrementsAttribute(0.01, 0.025, 0.1) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.ToneMappingEffect) , Ext.GetMemberName <ShaderEffectLibrary.ToneMappingEffect>(o => o.Gamma) , new NumberRangesAttribute(null, 0, 1, null, null) , new NumberIncrementsAttribute(0.01, 0.025, 0.1) , new NumberFormatAttribute("0'%'", null, 100) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.ToneMappingEffect) , Ext.GetMemberName <ShaderEffectLibrary.ToneMappingEffect>(o => o.Defog) , new NumberRangesAttribute(null, 0, 1, null, null) , new NumberIncrementsAttribute(0.01, 0.025, 0.1) , new NumberFormatAttribute("0'%'", null, 100) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.ToneMappingEffect) , Ext.GetMemberName <ShaderEffectLibrary.ToneMappingEffect>(o => o.FogColor) , new DisplayNameAttribute(@"Fog Color") ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.ToneMappingEffect) , Ext.GetMemberName <ShaderEffectLibrary.ToneMappingEffect>(o => o.VignetteRadius) , new DisplayNameAttribute(@"Vignette Radius") , new NumberRangesAttribute(null, 0, 1, null, null) , new NumberIncrementsAttribute(0.01, 0.025, 0.1) , new NumberFormatAttribute("0'%'", null, 100) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.ToneMappingEffect) , Ext.GetMemberName <ShaderEffectLibrary.ToneMappingEffect>(o => o.BlueShift) , new DisplayNameAttribute(@"Blue Shift") , new NumberRangesAttribute(null, 0, 1, null, null) , new NumberIncrementsAttribute(0.01, 0.025, 0.1) , new NumberFormatAttribute("0'%'", null, 100) ); #endregion #region ToonShaderEffect builder.AddCallback( typeof(ShaderEffectLibrary.ToonShaderEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); #endregion #region ZoomBlurEffect builder.AddCallback( typeof(ShaderEffectLibrary.ZoomBlurEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.ZoomBlurEffect) , Ext.GetMemberName <ShaderEffectLibrary.ZoomBlurEffect>(o => o.BlurAmount) , new DisplayNameAttribute(@"Blur Amount") , new NumberRangesAttribute(0, 0, 1.0, 10.0, null) , new NumberIncrementsAttribute(0.01, 0.025, 0.1) ); #endregion #region HatchingEffect builder.AddCallback( typeof(ShaderEffectLibrary.HatchingEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); PropertyOrder lastInsertedOrderForHatchingEffect = null; builder.AddCustomAttributes( typeof(ShaderEffectLibrary.HatchingEffect) , Ext.GetMemberName <ShaderEffectLibrary.HatchingEffect>(o => o.TransparentToneThreshold) , new DisplayNameAttribute(@"Transparent Tone Threshold") , new NumberRangesAttribute(null, 0, 4, null, null) , new NumberIncrementsAttribute(.01, .1, 1) , new CategoryAttribute("Hatching Effect") , new PropertyOrderAttribute(lastInsertedOrderForHatchingEffect = PropertyOrder.CreateAfter(PropertyOrder.Default)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.HatchingEffect) , Ext.GetMemberName <ShaderEffectLibrary.HatchingEffect>(o => o.LightToneThreshold) , new DisplayNameAttribute(@"Light Tone Threshold") , new NumberRangesAttribute(null, 0, 4, null, null) , new NumberIncrementsAttribute(.01, .1, 1) , new CategoryAttribute("Hatching Effect") , new PropertyOrderAttribute(lastInsertedOrderForHatchingEffect = PropertyOrder.CreateAfter(lastInsertedOrderForHatchingEffect)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.HatchingEffect) , Ext.GetMemberName <ShaderEffectLibrary.HatchingEffect>(o => o.MiddleToneThreshold) , new DisplayNameAttribute(@"Middle Tone Threshold") , new NumberRangesAttribute(null, 0, 4, null, null) , new CategoryAttribute("Hatching Effect") , new NumberIncrementsAttribute(.01, .1, 1) , new PropertyOrderAttribute(lastInsertedOrderForHatchingEffect = PropertyOrder.CreateAfter(lastInsertedOrderForHatchingEffect)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.HatchingEffect) , Ext.GetMemberName <ShaderEffectLibrary.HatchingEffect>(o => o.DarkToneThreshold) , new DisplayNameAttribute(@"Dark Tone Threshold") , new NumberRangesAttribute(null, 0, 4, null, null) , new NumberIncrementsAttribute(.01, .1, 1) , new CategoryAttribute("Hatching Effect") , new PropertyOrderAttribute(lastInsertedOrderForHatchingEffect = PropertyOrder.CreateAfter(lastInsertedOrderForHatchingEffect)) ); #endregion #region ChromaKeyAlphaEffect // Description for asset library builder.AddCallback( typeof(ShaderEffectLibrary.ChromaKeyAlphaEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); // Make the slider appear in the Common properties. builder.AddCustomAttributes( typeof(ShaderEffectLibrary.ChromaKeyAlphaEffect) , Ext.GetMemberName <ShaderEffectLibrary.ChromaKeyAlphaEffect>(o => o.Tolerance) , new CategoryAttribute("Chroma Key") , new NumberIncrementsAttribute(.001, .01, 0.1) , new NumberRangesAttribute(new double?(0), new double?(0), 1, 1, null) ); // Make the slider appear in the Common properties. builder.AddCustomAttributes( typeof(ShaderEffectLibrary.ChromaKeyAlphaEffect) , Ext.GetMemberName <ShaderEffectLibrary.ChromaKeyAlphaEffect>(o => o.ColorKey) , new DisplayNameAttribute(@"Color Key") , new CategoryAttribute("Chroma Key") ); #endregion #region LogoDisplacerEffect builder.AddCallback( typeof(ShaderEffectLibrary.LogoDisplacerEffect) , b => b.AddCustomAttributes(new ToolboxBrowsableAttribute(true)) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.LogoDisplacerEffect) , Ext.GetMemberName <ShaderEffectLibrary.LogoDisplacerEffect>(o => o.Displacement) , new NumberRangesAttribute(null, -50, 50, null, null) , new NumberIncrementsAttribute(.01, .1, 1) ); builder.AddCustomAttributes( typeof(ShaderEffectLibrary.LogoDisplacerEffect) , Ext.GetMemberName <ShaderEffectLibrary.LogoDisplacerEffect>(o => o.AdditionalLogoOpacity) , new DisplayNameAttribute(@"Additional Logo Opacity") , new NumberRangesAttribute(null, 0, 1.5, null, null) , new NumberIncrementsAttribute(0.01, 0.025, 0.1) ); #endregion }
/// <summary> /// To register design time metadata for SSWC.TimePickerPopup. /// </summary> public TimePickerPopupMetadata() : base() { AddCallback( typeof(SSWC.TimePickerPopup), b => { b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePickerPopup>(x => x.Minimum), new CategoryAttribute(Properties.Resources.CommonProperties)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePickerPopup>(x => x.Maximum), new CategoryAttribute(Properties.Resources.CommonProperties)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePickerPopup>(x => x.Value), new CategoryAttribute(Properties.Resources.CommonProperties)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePickerPopup>(x => x.Format), new CategoryAttribute(Properties.Resources.TimeInput)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePickerPopup>(x => x.Culture), new CategoryAttribute(Properties.Resources.TimeInput)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePickerPopup>(x => x.TimeGlobalizationInfo), new CategoryAttribute(Properties.Resources.TimeInput)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePickerPopup>(x => x.PopupMinutesInterval), new CategoryAttribute(Properties.Resources.TimeInput)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePickerPopup>(x => x.PopupSecondsInterval), new CategoryAttribute(Properties.Resources.TimeInput)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePickerPopup>(x => x.PopupTimeSelectionMode), new CategoryAttribute(Properties.Resources.TimeInput)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePickerPopup>(x => x.Culture), PropertyValueEditor.CreateEditorAttribute(typeof(CultureInfoEditor))); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePickerPopup>(x => x.TimeGlobalizationInfo), new TypeConverterAttribute(typeof(ExpandableObjectConverter))); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePickerPopup>(x => x.Minimum), new PropertyOrderAttribute(PropertyOrder.Early)); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePickerPopup>(x => x.Maximum), new PropertyOrderAttribute(PropertyOrder.CreateAfter(PropertyOrder.Early))); b.AddCustomAttributes( Extensions.GetMemberName <SSWC.TimePickerPopup>(x => x.Value), new PropertyOrderAttribute(PropertyOrder.CreateAfter(PropertyOrder.Early))); b.AddCustomAttributes(new DefaultBindingPropertyAttribute( Extensions.GetMemberName <SSWC.TimePickerPopup>(x => x.Value))); #if MWD40 b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.BasicControls, false)); #endif }); }