Esempio n. 1
0
        public void LoadChartStatistics()
        {
            statService = statService ?? new StatisticsService(contents);

            // Time
            string startTime = record.StartTime.ToString("HH:mm:ss tt");
            string stopTime  = record.StopTime.ToString("HH:mm:ss tt");
            string duration  = (record.StopTime - record.StartTime).ToString("g");

            RecordStatistics stats = new RecordStatistics()
            {
                StartTime    = startTime,
                StopTime     = stopTime,
                Duration     = duration,
                PiezoMax     = statService.GetPiezoMax().ToString(),
                PiezoMin     = statService.GetPiezoMin().ToString(),
                PiezoAverage = statService.GetPiezoAverage().ToString(),
                AxMax        = statService.GetAxMax().ToString(),
                AxMin        = statService.GetAxMin().ToString(),
                AxAverage    = statService.GetAxAverage().ToString(),
                AyMax        = statService.GetAyMax().ToString(),
                AyMin        = statService.GetAyMin().ToString(),
                AyAverage    = statService.GetAyAverage().ToString(),
                AzMax        = statService.GetAzMax().ToString(),
                AzMin        = statService.GetAzMin().ToString(),
                AzAverage    = statService.GetAzAverage().ToString()
            };

            view.DisplayRecordStatistics(stats);
        }
 public void DisplayRecordStatistics(RecordStatistics stats)
 {
     txtStartTime.Text    = stats.StartTime;
     txtStopTime.Text     = stats.StopTime;
     txtDuration.Text     = stats.Duration;
     txtPiezoMax.Text     = stats.PiezoMax;
     txtPiezoMin.Text     = stats.PiezoMin;
     txtPiezoAverage.Text = stats.PiezoAverage;
     txtAxMax.Text        = stats.AxMax;
     txtAxMin.Text        = stats.AxMin;
     txtAxAverage.Text    = stats.AxAverage;
     txtAyMax.Text        = stats.AyMax;
     txtAyMin.Text        = stats.AyMin;
     txtAyAverage.Text    = stats.AyAverage;
     txtAzMax.Text        = stats.AzMax;
     txtAzMin.Text        = stats.AzMin;
     txtAzAverage.Text    = stats.AzAverage;
 }