DirectOuput Framework R2
DirectOutput framework R2 for virtual pinball cabinets
Go to:
Overview 
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros Pages
TimeSpanStatisticsDetails.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections.Generic;
3 using System.ComponentModel;
4 using System.Data;
5 using System.Drawing;
6 using System.Linq;
7 using System.Text;
8 using System.Windows.Forms;
9 using DirectOutput.General.Statistics;
10 
11 namespace DirectOutput.Frontend
12 {
13  public partial class TimeSpanStatisticsDetails : Form
14  {
16 
18  {
19  InitializeComponent();
20  this.TimeSpanStatisticsItem = TimeSpanStatisticsItem;
21  ShowData();
22  }
23 
24  public void ShowData()
25  {
26  DetailGroup.Text = TimeSpanStatisticsItem.GroupName;
27  DetailName.Text = TimeSpanStatisticsItem.Name;
28  DetailTotalDuration.Text = TimeSpanStatisticsItem.TotalDuration.Format();
29  DetailValuesCount.Text = TimeSpanStatisticsItem.ValuesCount.ToString();
30  DetailAvgDuration.Text = TimeSpanStatisticsItem.AverageDuration.Format();
31  DetailMinDuration.Text = TimeSpanStatisticsItem.MinDuration.Format();
32  DetailMaxDuration.Text = TimeSpanStatisticsItem.MaxDuration.Format();
33 
34  int RowIndex;
35  MinDurationsGrid.Rows.Clear();
37  foreach (TimeSpan TS in TimeSpanStatisticsItem.MinDurations)
38  {
39  RowIndex = MinDurationsGrid.Rows.Add();
40  MinDurationsGrid[MinDurations.Name, RowIndex].Value = TS.Format();
41  }
42  MaxDurationsGrid.Rows.Clear();
44  foreach (TimeSpan TS in TimeSpanStatisticsItem.MaxDurations)
45  {
46  RowIndex = MaxDurationsGrid.Rows.Add();
47  MaxDurationsGrid[MaxDurations.Name, RowIndex].Value = TS.Format();
48  }
49  }
50 
51  }
52 }