public TextDisplayer(int?id, string filename, bool splited = false) : base(id) { _splited = splited; ppFormatter = RtppFormatter.GetPPFormatter(); hitCountFormatter = RtppFormatter.GetHitCountFormatter(); if (ppFormatter != null) { ppFormatter.Displayer = this; } if (hitCountFormatter != null) { hitCountFormatter.Displayer = this; } if (!Path.IsPathRooted(filename)) { _filenames[0] = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, filename); } else { _filenames[0] = filename; } if (_splited) { string ext = Path.GetExtension(_filenames[0]); string path = Path.GetDirectoryName(_filenames[0]); string file = Path.GetFileNameWithoutExtension(_filenames[0]); _filenames[0] = $"{path}{Path.DirectorySeparatorChar}{file}-pp{ext}"; _filenames[1] = $"{path}{Path.DirectorySeparatorChar}{file}-hit{ext}"; } Clear();//Create File }
public object GetPPFormat() => new { format = RtppFormatter.GetPPFormatter().Format };