private void ReadFile(Stream data) { Entries = new List <EVTEntry>(); BinaryReader Reader = new BinaryReader(data); string CommaSeparatedValues = new string(Reader.ReadChars((int)data.Length)); string[] Lines = CommaSeparatedValues.Split(new string[] { "\r\n" }, StringSplitOptions.None); for (int i = 0; i < Lines.Length; i++) { if (Lines[i] == "") { continue; } string[] Values = Lines[i].Split(','); var Entry = new EVTEntry(); Entry.Name = Values[0].ToLower(); Entry.EventType = ParseHexString(Values[1]); Entry.TrackID = ParseHexString(Values[2]); Entry.Unknown = ParseHexString(Values[3]); Entry.Unknown2 = ParseHexString(Values[4]); Entry.Unknown3 = ParseHexString(Values[5]); Entry.Unknown4 = ParseHexString(Values[6]); Entries.Add(Entry); } Reader.Close(); }
private void ReadFile(Stream data) { Entries = new List<EVTEntry>(); BinaryReader Reader = new BinaryReader(data); string CommaSeparatedValues = new string(Reader.ReadChars((int)data.Length)); string[] Lines = CommaSeparatedValues.Split(new string[] { "\r\n" }, StringSplitOptions.None); for (int i = 0; i < Lines.Length; i++) { if (Lines[i] == "") continue; string[] Values = Lines[i].Split(','); var Entry = new EVTEntry(); Entry.Name = Values[0].ToLower(); Entry.EventType = ParseHexString(Values[1]); Entry.TrackID = ParseHexString(Values[2]); Entry.Unknown = ParseHexString(Values[3]); Entry.Unknown2 = ParseHexString(Values[4]); Entry.Unknown3 = ParseHexString(Values[5]); Entry.Unknown4 = ParseHexString(Values[6]); Entries.Add(Entry); } Reader.Close(); }