コード例 #1
0
        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);
            }
        }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
        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
            }
        }
コード例 #4
0
        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);
            }
        }