本文整理汇总了C#中PaintDotNet.List类的典型用法代码示例。如果您正苦于以下问题:C# List类的具体用法?C# List怎么用?C# List使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
List类属于PaintDotNet命名空间,在下文中一共展示了List类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HistoryStack
private HistoryStack(
List<HistoryMemento> undoStack,
List<HistoryMemento> redoStack)
{
this.undoStack = new List<HistoryMemento>(undoStack);
this.redoStack = new List<HistoryMemento>(redoStack);
}
示例2: PaletteQuantizer
/// <summary>
/// Construct the palette quantizer
/// </summary>
/// <param name="palette">The color palette to quantize to</param>
/// <remarks>
/// Palette quantization only requires a single quantization step
/// </remarks>
public PaletteQuantizer(List<Color> palette)
: base(true)
{
_colorMap = new Dictionary<uint, byte>();
_colors = new Color[palette.Count];
palette.CopyTo(_colors);
}
示例3: UnhookStylus
public static void UnhookStylus(Control control)
{
lock (hookedControls.SyncRoot)
{
List<WeakReference> deleteUs = new List<WeakReference>();
foreach (WeakReference weakRef in hookedControls.Keys)
{
object target = weakRef.Target;
if (target == null)
{
deleteUs.Add(weakRef);
}
else
{
Control control2 = (Control)target;
if (object.ReferenceEquals(control, control2))
{
deleteUs.Add(weakRef);
}
}
}
foreach (WeakReference weakRef in deleteUs)
{
RealTimeStylus stylus = (RealTimeStylus)hookedControls[weakRef];
stylus.Enabled = false;
stylus.AsyncPluginCollection.Clear();
hookedControls.Remove(weakRef);
}
}
}
示例4: GetFileTypeFactoriesFromAssemblies
private static Type[] GetFileTypeFactoriesFromAssemblies(ICollection assemblies)
{
List<Type> allFactories = new List<Type>();
foreach (Assembly assembly in assemblies)
{
Type[] factories;
try
{
factories = GetFileTypeFactoriesFromAssembly(assembly);
}
catch (Exception)
{
continue;
}
foreach (Type type in factories)
{
allFactories.Add(type);
}
}
return allFactories.ToArray();
}
示例5: OnCreateSavePropertyCollection
public override PropertyCollection OnCreateSavePropertyCollection()
{
List<Property> props = new List<Property>();
props.Add(new Int32Property(PropertyNames.Quality, 95, 0, 100));
return new PropertyCollection(props);
}
示例6: OnCreatePropertyCollection
protected override PropertyCollection OnCreatePropertyCollection()
{
List<Property> props = new List<Property>();
props.Add(new DoubleProperty(PropertyNames.Angle, 0.0, -180.0, +180.0));
return new PropertyCollection(props);
}
示例7: OnCreatePropertyCollection
protected override PropertyCollection OnCreatePropertyCollection()
{
List<Property> props = new List<Property>();
props.Add(new Int32Property(PropertyNames.Tolerance, 70, 0, 100));
props.Add(new Int32Property(PropertyNames.Saturation, 90, 0, 100));
return new PropertyCollection(props);
}
示例8: OnCreatePropertyCollection
protected override PropertyCollection OnCreatePropertyCollection()
{
List<Property> props = new List<Property>();
props.Add(new Int32Property(PropertyNames.Radius, 10, 1, 200));
props.Add(new Int32Property(PropertyNames.Percentile, 50, 0, 100));
return new PropertyCollection(props);
}
示例9: OnCreatePropertyCollection
protected override PropertyCollection OnCreatePropertyCollection()
{
List<Property> propsBuilder = new List<Property>();
propsBuilder.Add(new DoubleProperty("X", 0.3, 0, 1));
propsBuilder.Add(new DoubleProperty("Y", 0.5, 0, 1));
propsBuilder.Add(new DoubleProperty("Z", 0.11, 0, 1));
return new PropertyCollection(propsBuilder.ToArray());
}
示例10: OnCreatePropertyCollection
protected override PropertyCollection OnCreatePropertyCollection()
{
List<Property> props = new List<Property>();
props.Add(new Int32Property(PropertyNames.BrushSize, 3, 1, 8));
props.Add(new Int32Property(PropertyNames.Coarseness, 50, 3, 255));
return new PropertyCollection(props);
}
示例11: OnCreatePropertyCollection
protected override PropertyCollection OnCreatePropertyCollection()
{
List<Property> props = new List<Property>();
props.Add(new Int32Property(PropertyNames.Radius, 10, 0, 200));
props.Add(new DoubleProperty(PropertyNames.Strength, 0.4, 0, 1));
return new PropertyCollection(props);
}
示例12: OnCreateSavePropertyCollection
public override PropertyCollection OnCreateSavePropertyCollection()
{
List<Property> props = new List<Property>();
props.Add(new Int32Property(PropertyNames.DitherLevel, 7, 0, 8));
props.Add(new Int32Property(PropertyNames.Threshold, 128, 0, 255));
return new PropertyCollection(props);
}
示例13: OnCreatePropertyCollection
protected override PropertyCollection OnCreatePropertyCollection()
{
List<Property> props = new List<Property>();
props.Add(new Int32Property(PropertyNames.Radius, 6, 1, 20));
props.Add(new Int32Property(PropertyNames.Brightness, 10, -100, +100));
props.Add(new Int32Property(PropertyNames.Contrast, 10, -100, +100));
return new PropertyCollection(props);
}
示例14: OnCreatePropertyCollection
protected override PropertyCollection OnCreatePropertyCollection()
{
List<Property> props = new List<Property>();
props.Add(new Int32Property(PropertyNames.Softness, 5, 0, 10));
props.Add(new Int32Property(PropertyNames.Lighting, 0, -20, +20));
props.Add(new Int32Property(PropertyNames.Warmth, 10, 0, 20));
return new PropertyCollection(props);
}
示例15: OnCreatePropertyCollection
protected override PropertyCollection OnCreatePropertyCollection()
{
List<Property> props = new List<Property>();
props.Add(new Int32Property(PropertyNames.Hue, 0, -180, +180));
props.Add(new Int32Property(PropertyNames.Saturation, 100, 0, 200));
props.Add(new Int32Property(PropertyNames.Lightness, 0, -100, +100));
return new PropertyCollection(props);
}