本文整理汇总了C#中System.Item.Write方法的典型用法代码示例。如果您正苦于以下问题:C# Item.Write方法的具体用法?C# Item.Write怎么用?C# Item.Write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Item
的用法示例。
在下文中一共展示了Item.Write方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Write
public void Write(IO.EndianWriter stream)
{
Compiler comp = stream.Owner as Compiler;
Import import = comp.OwnerState.Importer as Import;
int real_count = import.Groups.Count;
stream.Write("dynamic tag groups", false);
stream.Write((short)DataArray.MaxValue);
stream.Write((short)Item.Size);
stream.Write(true);
stream.Write(true);
stream.Write((short)0);
MiscGroups.data.Write(stream);
stream.Write((short)real_count);//stream.Write((short)Datums.Count);
stream.Write((short)real_count);//stream.Write((short)Datums.Count);
stream.Write(real_count);
stream.WritePointer(stream.PositionUnsigned + 4);
#region Write tag group datums
foreach (Import.TagGroup tg in import.Groups.Values)
{
stream.Write((short)0); // Header
stream.Write((short)0); // Flags
comp.AddLocationFixup(tg.Name, stream, false);
stream.Write((int)0);
}
#endregion
#region Write null datums
Item i = new Item();
int count = DataArray.MaxValue - real_count;
for (int x = 0; x < count; x++)
i.Write(stream);
#endregion
}
示例2: Write
public void Write(IO.EndianWriter stream)
{
Compiler comp = stream.Owner as Compiler;
Import import = comp.OwnerState.Importer as Import;
short real_count = (short)import.Groups.Count;
var next_index = new DatumIndex((ushort)real_count,
0); // note that this default value isn't ideal
stream.Write("dynamic tag groups", false);
stream.Write(DataArray.MaxValue);
stream.Write(Item.Size);
stream.Write((byte)0); // alignment bit
stream.Write(true); // is valid
stream.Write((short)0); // flags
MiscGroups.data.Write(stream);
stream.Write(uint.MinValue); // allocator
stream.Write((int)0); // bit vector next index
stream.Write(Datums.Count); // bit vector length
stream.Write(Datums.Count); // actual count
next_index.Write(stream); // next index
stream.WritePointer(stream.PositionUnsigned + 8);
stream.Write((int)0); // bit vector pointer
#region Write tag group datums
foreach (Import.TagGroup tg in import.Groups.Values)
{
stream.Write((short)0); // Header
stream.Write((short)0); // Flags
comp.AddLocationFixup(tg.Name, stream, false);
stream.Write((int)0);
}
#endregion
#region Write null datums
Item i = new Item();
int count = DataArray.MaxValue - real_count;
for (int x = 0; x < count; x++)
i.Write(stream);
#endregion
}
示例3: reloadCurrentItem
private void reloadCurrentItem(Item item)
{
currentItem = new Item(item.Write());
CB_Item.SelectedValue = (int)item.ID;
TB_Flag1.Text = item.Flag1.ToString("X2");
TB_Flag2.Text = item.Flag2.ToString("X2");
}