private void ReadData() { // TODO: Populate the collection ChartValues string filename = @"C:\Users\SoftwareDevelopment\Downloads\Ex_Files_Code_Clinic_C_Sharp\Exercise Files\Ch06\dashBoardData.csv"; foreach (var ft in FactoryTelemetry.Load(filename)) { if (!readingData) { return; } ChartValues.Add(ft); this.EngineEfficiency = ft.Efficiency; AdjustAxis(ft.TimeStamp.Ticks); if (ChartValues.Count > 30) { ChartValues.RemoveAt(0); } Thread.Sleep(60); } }
private void ReadData() { // TODO: Populate the collection ChartValues string filename = @"..\..\..\..\..\dashBoardData.csv"; foreach (var ft in FactoryTelemetry.Load(filename)) { if (!readingData) { return; } ChartValues.Add(ft); this.EngineEfficiency = ft.Efficiency; AdjustAxis(ft.TimeStamp.Ticks); if (ChartValues.Count > 30) { ChartValues.RemoveAt(0); } Thread.Sleep(50); } }
private void ReadData() { //ToDo: Populate the collection ChartValues string filename = @"SampleDataFile.csv"; foreach (var ft in FactoryTelemetry.Load(filename)) { if (!readingData) { return; //This allows us to stop the data read when we click the stop button } ChartValues.Add(ft); this.EngineEfficiency = ft.Efficiency; AdjustAxis(ft.TimeStamp.Ticks); if (ChartValues.Count > 30) { ChartValues.RemoveAt(0); } Thread.Sleep(50); //This controls the speed at which the data is read, the higher the number the slower it goes } }
private void ReadData() { //todo : populate the collectioon chartvalue string filename = @"C:\Users\hsingh\Desktop\C# Revision\Ex_Files_Code_Clinic_C_Sharp\Exercise Files\Ch06\dashBoardData.csv"; foreach (var ft in FactoryTelemetry.Load(filename)) { ChartsValues.Add(ft); this.EngineEfficiency = ft.Efficiency; if (ChartsValues.Count > 30) { ChartsValues.RemoveAt(0); } Thread.Sleep(30); } }