public void SetAndDisplayDataFile(string filePath, MessageTypeCollection messageTypes) { DataFileInfo dataFileInfo = new DataFileInfo(filePath); SetDataFile(dataFileInfo); MyDataFile.ParseDataFromFileIntoBytes(filePath); DisplayDataFile(messageTypes); }
public DataFile MakeDataFile(DataFileInfo d) { if (d.FileName.Contains(".txt")) { return(new AsciiFile(d)); } else if (d.FileName.Contains(".hex")) { return(new HexFile(d)); } else if (d.FileName.Contains(".dat")) { return(new DatFile()); } else { throw new Exception("No file type selected"); } }
public AsciiFile(DataFileInfo d) { filename = d.FileName; }
public void SetDataFile(DataFileInfo dataFileInfo) { DataFileFactoryImpl dataFileFactory = new DataFileFactoryImpl(); MyDataFile = dataFileFactory.MakeDataFile(dataFileInfo); }
public HexFile(DataFileInfo d) { filename = d.FileName; }