当前位置: 首页>>代码示例>>C#>>正文


C# IValueWriter.WriteEnum方法代码示例

本文整理汇总了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);
 }
开发者ID:wtfcolt,项目名称:game,代码行数:12,代码来源:PolygonEmitter.cs

示例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);
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:10,代码来源:QuickBarForm.cs

示例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);
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:12,代码来源:ToolStateManager.cs

示例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);
        }
开发者ID:Vizzini,项目名称:netgore,代码行数:23,代码来源:BackgroundImage.cs

示例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);
        }
开发者ID:Vizzini,项目名称:netgore,代码行数:11,代码来源:BackgroundLayer.cs

示例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);
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:8,代码来源:WallEntityBase.cs


注:本文中的IValueWriter.WriteEnum方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。