本文整理汇总了C#中PropertyCollection类的典型用法代码示例。如果您正苦于以下问题:C# PropertyCollection类的具体用法?C# PropertyCollection怎么用?C# PropertyCollection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PropertyCollection类属于命名空间,在下文中一共展示了PropertyCollection类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnCreateConfigUI
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;
}
开发者ID:metadeta96,项目名称:openpdn,代码行数:33,代码来源:PolarInversionEffect.cs
示例2: MapContent
public MapContent(string filePath, Renderer renderer, string contentRoot)
{
XmlDocument document = new XmlDocument();
document.Load(filePath);
XmlNode mapNode = document[AttributeNames.MapAttributes.Map];
Version = mapNode.Attributes[AttributeNames.MapAttributes.Version].Value;
Orientation = (Orientation)Enum.Parse(typeof(Orientation), mapNode.Attributes[AttributeNames.MapAttributes.Orientation].Value, true);
Width = Utilities.TryToParseInt(mapNode.Attributes[AttributeNames.MapAttributes.Width].Value);
Height = Utilities.TryToParseInt(mapNode.Attributes[AttributeNames.MapAttributes.Height].Value);
TileWidth = Utilities.TryToParseInt(mapNode.Attributes[AttributeNames.MapAttributes.TileWidth].Value);
TileHeight = Utilities.TryToParseInt(mapNode.Attributes[AttributeNames.MapAttributes.TileHeight].Value);
XmlNode propertiesNode = document.SelectSingleNode(AttributeNames.MapAttributes.MapProperties);
if (propertiesNode != null)
properties = new PropertyCollection(propertiesNode);
BuildTileSets(document);
BuildLayers(document);
BuildTileSetTextures(renderer, contentRoot);
GenerateTileSourceRectangles();
}
开发者ID:richardlalancette,项目名称:SharpTiles,代码行数:26,代码来源:MapContent.cs
示例3: AddTypedProperty1
public void AddTypedProperty1()
{
var col = new PropertyCollection();
col.AddTypedProperty("foo");
Assert.AreEqual(1, col.PropertyList.Count);
Assert.IsTrue(col.ContainsProperty(typeof(string)));
}
开发者ID:ameent,项目名称:VsVim,代码行数:7,代码来源:ExtensionsTest.cs
示例4: Level
public Level(string uniqueName, string caption, int number, PropertyCollection properties)
{
UniqueName = uniqueName;
Caption = caption;
Number = number;
Properties = properties;
}
开发者ID:zyh329,项目名称:nbi,代码行数:7,代码来源:Level.cs
示例5: Layer
public Layer(XElement node)
{
//string Type = node.Name;
Name = node.Attribute("name").Value;
if (node.Attribute("width") != null)
Width = int.Parse(node.Attribute("width").Value, CultureInfo.InvariantCulture);
else
Width = 0;
if (node.Attribute("height") != null)
Height = int.Parse(node.Attribute("height").Value, CultureInfo.InvariantCulture);
else
Height = 0;
if (node.Attribute("opacity") != null)
{
Opacity = float.Parse(node.Attribute("opacity").Value, CultureInfo.InvariantCulture);
}
else
Opacity = 1;
if (node.Attribute("visible") != null)
{
Visible = int.Parse(node.Attribute("visible").Value, CultureInfo.InvariantCulture) == 1;
}
else
Visible = true;
XElement propertiesNode = node.Element("properties");
if (propertiesNode != null)
{
Properties = new PropertyCollection(propertiesNode);
}
}
开发者ID:JeremyMah,项目名称:ProjectChessStone,代码行数:33,代码来源:Layer.cs
示例6: Settings
internal Settings(StyleCopCore core)
{
this.globalSettings = new PropertyCollection();
this.parserSettings = new Dictionary<string, AddInPropertyCollection>();
this.analyzerSettings = new Dictionary<string, AddInPropertyCollection>();
this.core = core;
}
开发者ID:katerina-marchenkova,项目名称:my,代码行数:7,代码来源:Settings.cs
示例7: ObjectContent
public ObjectContent(XmlNode node)
{
if (node.Attributes[AttributeNames.MapObjectAttributes.Name] != null)
Name = node.Attributes[AttributeNames.MapObjectAttributes.Name].Value;
if (node.Attributes[AttributeNames.MapObjectAttributes.Type] != null)
Type = node.Attributes[AttributeNames.MapObjectAttributes.Type].Value;
if (node[AttributeNames.MapObjectAttributes.Properties] != null)
properties = new PropertyCollection(node[AttributeNames.MapObjectAttributes.Properties]);
int x = 0, y = 0, width = 0, height = 0;
if (node.Attributes[AttributeNames.MapObjectAttributes.X] != null)
x = Utilities.TryToParseInt(node.Attributes[AttributeNames.MapObjectAttributes.X].Value);
if (node.Attributes[AttributeNames.MapObjectAttributes.Y] != null)
y = Utilities.TryToParseInt(node.Attributes[AttributeNames.MapObjectAttributes.Y].Value);
if (node.Attributes[AttributeNames.MapObjectAttributes.Width] != null)
width = Utilities.TryToParseInt(node.Attributes[AttributeNames.MapObjectAttributes.Width].Value);
if (node.Attributes[AttributeNames.MapObjectAttributes.Height] != null)
height = Utilities.TryToParseInt(node.Attributes[AttributeNames.MapObjectAttributes.Height].Value);
Bounds = new Rectangle(x, y, width, height);
string objectPoints = String.Empty;
if (node.Attributes[AttributeNames.MapObjectAttributes.GID] != null)
{
objectType = MapObjectType.Tile;
GID = Utilities.TryToParseInt(node.Attributes[AttributeNames.MapObjectAttributes.GID].Value);
}
else if (node.Attributes[AttributeNames.MapObjectAttributes.Polygon] != null)
{
objectType = MapObjectType.Polygon;
objectPoints = node.Attributes[AttributeNames.MapObjectAttributes.Polygon].Value;
}
else if (node.Attributes[AttributeNames.MapObjectAttributes.Polyline] != null)
{
objectType = MapObjectType.Polyline;
objectPoints = node.Attributes[AttributeNames.MapObjectAttributes.Polyline].Value;
}
if(!String.IsNullOrEmpty(objectPoints))
{
string[] splitPoints = objectPoints.Split(' ');
foreach(string splitPoint in splitPoints)
{
string[] coordinates = splitPoint.Split(',');
float coordinateX = 0f, coordinateY = 0f;
float.TryParse(coordinates[0], NumberStyles.None, CultureInfo.InvariantCulture, out coordinateX);
float.TryParse(coordinates[1], NumberStyles.None, CultureInfo.InvariantCulture, out coordinateY);
points.Add(new Point((int)x, (int)y));
}
}
}
开发者ID:richardlalancette,项目名称:SharpTiles,代码行数:60,代码来源:ObjectContent.cs
示例8: Content
/// <summary>
/// Constructor for creating a Content object
/// </summary>
/// <param name="name">Name of the content</param>
/// <param name="parentId">Id of the Parent content</param>
/// <param name="contentType">ContentType for the current Content object</param>
/// <param name="properties">Collection of properties</param>
public Content(string name, int parentId, IContentType contentType, PropertyCollection properties)
: base(name, parentId, contentType, properties)
{
Mandate.ParameterNotNull(contentType, "contentType");
_contentType = contentType;
}
开发者ID:phaniarveti,项目名称:Experiments,代码行数:14,代码来源:Content.cs
示例9: Tileset
internal Tileset(ContentReader reader)
: this()
{
_manager = reader.ContentManager;
int version = reader.ReadInt16();
int id = reader.ReadInt16();
TileWidth = reader.ReadInt16();
TileHeight = reader.ReadInt16();
string texAsset = reader.ReadString();
Properties = new PropertyCollection(reader);
int tileCount = reader.ReadInt16();
for (int i = 0; i < tileCount; i++) {
int tileId = reader.ReadInt16();
int tileX = reader.ReadInt16();
int tileY = reader.ReadInt16();
Tile tile = new Tile(tileId, this, tileX, tileY)
{
Properties = new PropertyCollection(reader),
};
_tiles.Add(tileId, tile);
}
_texture = _manager.Load<Texture2D>(texAsset);
}
开发者ID:JuliaABurch,项目名称:Treefrog,代码行数:29,代码来源:Tileset.cs
示例10: OnCreateConfigUI
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;
}
开发者ID:metadeta96,项目名称:openpdn,代码行数:28,代码来源:CloudsEffect.cs
示例11: ReadDetail
protected virtual void ReadDetail(XPathNavigator navigator, PropertyCollection collection, ReadingJournal journal)
{
Dictionary<string, string> attributes = GetAttributes(navigator);
Type type = attributes["typeName"].ToType();
if (type != typeof(ContentItem))
{
collection.Add(Parse(navigator.Value, type));
}
else
{
int referencedItemID = int.Parse(navigator.Value);
ContentItem referencedItem = journal.Find(referencedItemID);
if (referencedItem != null)
collection.Add(referencedItem);
else
journal.ItemAdded += (sender, e) =>
{
if (e.AffectedItem.ID == referencedItemID)
{
collection.Add(e.AffectedItem);
}
};
}
}
开发者ID:dpawatts,项目名称:zeus,代码行数:25,代码来源:PropertyCollectionXmlReader.cs
示例12: Mesh
/// <summary>
/// Initializes a new instance of the <see cref="Mesh"/> class.
/// </summary>
public Mesh()
{
VertexBuffers = new List<VertexBuffer>();
IndexBuffers = new List<IndexBuffer>();
MeshParts = new List<MeshPart>();
Properties = new PropertyCollection();
}
开发者ID:numo16,项目名称:SharpDX,代码行数:10,代码来源:ModelData.Mesh.cs
示例13: PropertyManager
internal PropertyManager(PropertyClassManager classManager, object inst)
{
_classManager = classManager;
_inst = inst;
_custom = new PropertyCollection(_classManager.RegisteredNames);
}
开发者ID:Elof3,项目名称:Treefrog,代码行数:7,代码来源:PropertyManager.cs
示例14: MapObject
/// <summary>
/// Default constructor requires a name, the bounds of the object, the orientation of projection, and a collection of properties assigned to the object
/// </summary>
/// <param name="name"></param>
/// <param name="bounds"></param>
/// <param name="orientation"></param>
/// <param name="properties"></param>
public MapObject(string name, Rectangle bounds, Orientation orientation, PropertyCollection properties)
{
Name = name;
Bounds = bounds;
Orientation = orientation;
Properties = properties;
}
开发者ID:richardlalancette,项目名称:SharpTiles,代码行数:14,代码来源:MapObject.cs
示例15: MapObject
internal MapObject(string name, string type, Rectangle location, PropertyCollection properties)
{
Name = name;
Type = type;
Location = location;
Properties = properties;
}
开发者ID:GarethIW,项目名称:HeroBash,代码行数:7,代码来源:MapObject.cs
示例16: Tile
internal Tile(Texture2D texture, Rectangle source, PropertyCollection properties, bool[] collision)
{
Texture = texture;
Source = source;
Properties = properties;
CollisionData = collision;
}
开发者ID:GarethIW,项目名称:Hunted,代码行数:7,代码来源:Tile.cs
示例17: TileSheetPropertiesCommand
public TileSheetPropertiesCommand(TileSheet tileSheet,
string newId, string newDescription,
Size newTileSize, Size newMargin, Size newSpacing,
Size newSheetSize, string newImageSource,
PropertyCollection newProperties)
{
m_tileSheet = tileSheet;
m_oldId = tileSheet.Id;
m_oldDescription = tileSheet.Description;
m_oldTileSize = tileSheet.TileSize;
m_oldMargin = tileSheet.Margin;
m_oldSpacing = tileSheet.Spacing;
m_oldSheetSize = tileSheet.SheetSize;
m_oldImageSource = tileSheet.ImageSource;
m_oldProperties = new PropertyCollection(tileSheet.Properties);
m_newId = newId;
m_newDescription = newDescription;
m_newTileSize = newTileSize;
m_newMargin = newMargin;
m_newSpacing = newSpacing;
m_newSheetSize = newSheetSize;
m_newImageSource = newImageSource;
m_newProperties = newProperties;
}
开发者ID:dekk7,项目名称:xEngine,代码行数:26,代码来源:TileSheetPropertiesCommand.cs
示例18: OnCreateSaveConfigUI
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;
}
开发者ID:metadeta96,项目名称:openpdn,代码行数:34,代码来源:PngFileType.cs
示例19: ObjectLayer
internal ObjectLayer(ContentReader reader, ObjectRegistry registry)
: base(reader)
{
_registry = registry;
_objects = new List<ObjectInstance>();
int objCount = reader.ReadInt32();
for (int i = 0; i < objCount; i++) {
int id = reader.ReadInt32();
int dx = reader.ReadInt32();
int dy = reader.ReadInt32();
float rotation = reader.ReadSingle();
float scaleX = reader.ReadSingle();
float scaleY = reader.ReadSingle();
PropertyCollection properties = new PropertyCollection(reader);
_objects.Add(new ObjectInstance(_registry.GetObjectPool(id), id, dx, dy) {
Rotation = rotation,
ScaleX = scaleX,
ScaleY = scaleY,
Properties = properties,
});
}
}
开发者ID:Elof3,项目名称:Treefrog,代码行数:25,代码来源:ObjectLayer.cs
示例20: MapEntity
public MapEntity()
{
Layer = MapLayer.Default;
FourCC = string.Empty;
LayerCanChange = false;
Fields = new PropertyCollection();
}
开发者ID:CryZe,项目名称:WindEditor2,代码行数:7,代码来源:MapEntity.cs
注:本文中的PropertyCollection类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论