本文整理汇总了C#中IValueWriter.WriteEnum方法的典型用法代码示例。如果您正苦于以下问题:C# IValueWriter.WriteEnum方法的具体用法?C# IValueWriter.WriteEnum怎么用?C# IValueWriter.WriteEnum使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IValueWriter
的用法示例。
在下文中一共展示了IValueWriter.WriteEnum方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteCustomValues
/// <summary>
/// When overridden in the derived class, writes all custom state values to the <paramref name="writer"/>.
/// </summary>
/// <param name="writer">The <see cref="IValueWriter"/> to write the state values to.</param>
protected override void WriteCustomValues(IValueWriter writer)
{
writer.Write(_closedKeyName, Closed);
writer.Write(_scaleKeyName, Scale);
writer.Write(_rotationKeyName, Rotation);
writer.WriteEnum(_polygonOriginKeyName, PolygonOrigin);
Points.Write(_pointsNodeName, writer);
}
示例2: Write
/// <summary>
/// Writes the <see cref="QuickBarSlotValues"/> to an <see cref="IValueWriter"/>.
/// </summary>
/// <param name="w">The <see cref="IValueWriter"/> to write the values to.</param>
public void Write(IValueWriter w)
{
w.Write("Slot", Slot);
w.WriteEnum("Type", Type);
w.Write("Value", Value);
}
示例3: WriteToolBarItems
/// <summary>
/// Writes the items in a <see cref="ToolBar"/>.
/// </summary>
/// <param name="writer">The <see cref="IValueWriter"/> to write to.</param>
/// <param name="tb">The <see cref="ToolBar"/> containing the items to write.</param>
static void WriteToolBarItems(IValueWriter writer, ToolBar tb)
{
var tbItems = tb.GetItems().Select(x => x == null ? _separatorClassName : (GetToolKey(x.Tool) ?? _separatorClassName));
writer.WriteEnum(_toolBarItemsKeyName, tb.ToolBarVisibility);
writer.WriteMany(_toolBarItemsValueName, tbItems, writer.Write);
}
示例4: Write
/// <summary>
/// Writes the <see cref="BackgroundImage"/> to an <see cref="IValueWriter"/>.
/// </summary>
/// <param name="writer">The <see cref="IValueWriter"/> to write to.</param>
public virtual void Write(IValueWriter writer)
{
writer.Write(_valueKeyName, Name);
writer.WriteEnum(_valueKeyAlignment, Alignment);
writer.Write(_valueKeyColor, Color);
writer.Write(_valueKeyDepth, Depth);
writer.Write(_valueKeyOffset, Offset);
GrhIndex grhIndex;
if (IsSpriteSet())
grhIndex = Sprite.GrhData.GrhIndex;
else
{
grhIndex = GrhIndex.Invalid;
Debug.Fail("Why is the Sprite not set? That doesn't seem right...");
}
writer.Write(_valueKeyGrhIndex, grhIndex);
}
示例5: Write
/// <summary>
/// Writes the <see cref="BackgroundImage"/> to an <see cref="IValueWriter"/>.
/// </summary>
/// <param name="writer">The <see cref="IValueWriter"/> to write to.</param>
public override void Write(IValueWriter writer)
{
base.Write(writer);
writer.WriteEnum(_horizontalLayoutKey, HorizontalLayout);
writer.WriteEnum(_verticalLayoutKey, VerticalLayout);
}
示例6: Write
public void Write(IValueWriter w)
{
w.Write(_positionValueKey, Position);
w.Write(_sizeValueKey, Size);
w.Write(_isPlatformValueKey, IsPlatform);
w.Write(_boundGrhIndexValueKey, BoundGrhIndex);
w.WriteEnum(_directionBlockValueKey, DirectionalBlock);
}