public List <Condition> ListOfConditionsToDisplay;// { get; set; } public override void DisplayConditions(List <Condition> conditionList) { foreach (var track in conditionList) { Separation sep = (Separation)track; Console.WriteLine( $"--------------------------------------------------------------\n---------------------------------------------------------------------\nID: {sep.Id}\t Condition: {sep.Type}\t Timestamp: {sep.Timestamp} ----- {sep.Type} betweeen Tag1: {sep.Tag1} Tag2: {sep.Tag2}"); } }
//string filename = String.Format("{0:yyyy-MM-dd}__{1}.txt", DateTime.Now,name); public void LogEndCondition(Condition c) { Separation sep = (Separation)c; CreateFolder(); using (System.IO.StreamWriter file = File.AppendText(@"C:\Logs\SeparationLog.txt")) { file.WriteLine($"{sep.Timestamp}:\t {sep.Type} Ended\t ID:{c.Id}\t between:\t {sep.Tag1}\t and {sep.Tag2}"); } }