當前位置: 首頁>>代碼示例>>C#>>正文


C# Item.Write方法代碼示例

本文整理匯總了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
			}
開發者ID:CodeAsm,項目名稱:open-sauce,代碼行數:35,代碼來源:Compiler.cs

示例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
			}
開發者ID:CodeAsm,項目名稱:open-sauce,代碼行數:40,代碼來源:Compiler.cs

示例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");
 }
開發者ID:MichaelGatesDev,項目名稱:NLSE,代碼行數:7,代碼來源:Garden.cs


注:本文中的System.Item.Write方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。