public DMSNewColumn(string fieldName, int version, int length, int decPositions, UseEditFlags useEdit, FieldTypes type, FieldFormats format, GUIControls gui = GUIControls.DEFAULT) { FieldName = fieldName; VersionNumber = version; FieldLength = length; DecimalPositions = decPositions; UseEditMask = useEdit; FieldType = type; FieldFormat = format; DefaultGUIControl = gui; }
public DMSRecordFieldMetadata(DMSNewColumn newColumn, DMSTable table) { FieldName = newColumn.FieldName; RecordName = table.Name; Unknown1 = 0; VersionNumber = newColumn.VersionNumber; DecimalPositions = newColumn.DecimalPositions; UseEditMask = newColumn.UseEditMask; Unknown2 = 0; FieldType = newColumn.FieldType; FieldFormat = newColumn.FieldFormat; FieldLength = newColumn.FieldLength; DefaultGUIControl = newColumn.DefaultGUIControl; Unknown5 = 0; Unknown6 = 0; }
private void listBox1_SelectedValueChanged(object sender, EventArgs e) { /* Update UseEditFlags value */ if (updatingSelection) { return; } updatingText = true; UseEditFlags newValue = 0; for (var x = 0; x < listBox1.Items.Count; x++) { if (listBox1.GetSelected(x)) { newValue |= (UseEditFlags)listBox1.Items[x]; } } txtUseEdit.Text = ((int)newValue).ToString(); updatingText = false; }
public DMSRecordFieldMetadata(byte[] data, bool littleEndian) { using (MemoryStream ms = new MemoryStream(data)) { using (EndianBinaryReader br = new EndianBinaryReader(ms, littleEndian)) { FieldName = br.ReadFromUnicode(38); RecordName = br.ReadFromUnicode(32); Unknown1 = br.ReadInt32(); if (Unknown1 != 0) { Debugger.Break(); } VersionNumber = br.ReadInt32(); DecimalPositions = br.ReadInt32(); UseEditMask = (UseEditFlags)br.ReadInt32(); Unknown2 = br.ReadInt16(); if (Unknown2 != 0) { Debugger.Break(); } FieldType = (FieldTypes)br.ReadInt16(); FieldFormat = (FieldFormats)br.ReadInt16(); FieldLength = br.ReadInt32(); DefaultGUIControl = (GUIControls)br.ReadInt32(); Unknown5 = br.ReadInt32(); Unknown6 = br.ReadInt16(); if (Unknown5 != 0 || Unknown6 != 0) { Debugger.Break(); } } } }