2 using System.Collections.Generic;
3 using System.ComponentModel;
8 using System.Windows.Forms;
9 using DirectOutput.General;
10 using DirectOutput.General.Statistics;
12 namespace DirectOutput.Frontend
19 this.Pinball = Pinball;
20 InitializeComponent();
26 public void RefreshData()
29 RefreshDurationStatistics();
32 private void RefreshDurationStatistics()
36 DurationStatistics.Rows.Clear();
39 int RowIndex = DurationStatistics.Rows.Add();
40 DurationStatistics.Rows[RowIndex].Tag = Item;
41 DurationStatistics[StatGroup.Name, RowIndex].Value = (Item.
GroupName.IsNullOrWhiteSpace()?
"":Item.
GroupName);
42 DurationStatistics[StatName.Name, RowIndex].Value = Item.
Name;
43 DurationStatistics[StatCallsCount.Name, RowIndex].Value =
"{0} calls".Build(Item.
ValuesCount);
46 DurationStatistics[StatTotalDuration.Name, RowIndex].Value = Item.
TotalDuration.Format();
47 DurationStatistics[StatAvgDuration.Name, RowIndex].Value = Item.
AverageDuration.Format();
48 DurationStatistics[StatMinDuration.Name, RowIndex].Value = Item.
MinDuration.Format();
49 DurationStatistics[StatMaxDuration.Name, RowIndex].Value = Item.
MaxDuration.Format();
90 private void RefreshButton_Click(
object sender, EventArgs e)
95 private void DurationStatistics_CellClick(
object sender, DataGridViewCellEventArgs e)
97 if (e.RowIndex >= 0 && e.RowIndex < DurationStatistics.Rows.Count)
99 new TimeSpanStatisticsDetails((
TimeSpanStatisticsItem)DurationStatistics.Rows[e.RowIndex].Tag).ShowDialog(
this);