public DataValues(Meta meta, string iEntName, Map map, int iOffsetInChunk, IFPIO.ObjectEnum type, int iLineNumber) { this.meta = meta; this.LineNumber = iLineNumber; this.chunkOffset = iOffsetInChunk; this.map = map; this.EntName = iEntName; InitializeComponent(); this.Dock = DockStyle.Top; this.Controls[0].Text = EntName; this.Controls[2].Text = type.ToString(); this.ValueType = type; switch (this.ValueType) { case IFPIO.ObjectEnum.Byte: this.size = 1; break; case IFPIO.ObjectEnum.Short: case IFPIO.ObjectEnum.UShort: this.size = 2; break; case IFPIO.ObjectEnum.Int: case IFPIO.ObjectEnum.UInt: case IFPIO.ObjectEnum.Float: case IFPIO.ObjectEnum.Unknown: this.size = 4; break; case IFPIO.ObjectEnum.Unused: this.size = 0; break; } this.AutoSize = false; }
/// <summary> /// Initializes a new instance of the <see cref="DataValues"/> class. /// </summary> /// <param name="iEntName"> /// The i ent name. /// </param> /// <param name="map"> /// The map. /// </param> /// <param name="iOffsetInChunk"> /// The i offset in chunk. /// </param> /// <param name="type"> /// The type. /// </param> /// <param name="iLineNumber"> /// The i line number. /// </param> public DataValues(string iEntName, Map map, int iOffsetInChunk, IFPIO.ObjectEnum type, int iLineNumber) { this.LineNumber = iLineNumber; this.chunkOffset = iOffsetInChunk; this.map = map; this.EntName = iEntName; InitializeComponent(); this.Dock = DockStyle.Top; this.Controls[0].Text = EntName; this.Controls[2].Text = type.ToString(); this.ValueType = type; this.AutoSize = false; this.Enter += DataValues_GotFocus; this.Leave += DataValues_LostFocus; }