/// <summary> /// Attempt to open the stats file. /// Return true on success, false otherwise. /// </summary> private bool OpenStatsFile() { StatsTable table = new StatsTable(); if (table.Open(kStatsTableName)) { stats_table_ = table; return true; } return false; }
/// <summary> /// Constructor /// </summary> /// <param name="table"></param> public StatsTableProcesses(StatsTable table) { table_ = table; pids_ = new List<int>(); Initialize(); }
public StatsTableEntry(int id, string name, StatsTable table) { id_ = id; name_ = name; table_ = table; }
/// <summary> /// Create the list of counters /// </summary> /// <param name="table"></param> /// pid</param> public StatsTableCounters(StatsTable table) { table_ = table; counter_hi_water_mark_ = -1; counters_ = new List<IStatsCounter>(); FindCounters(); }
private void openToolStripMenuItem_Click(object sender, EventArgs e) { OpenDialog dialog = new OpenDialog(); dialog.ShowDialog(); CloseStatsFile(); StatsTable table = new StatsTable(); bool rv = table.Open(dialog.FileName); if (!rv) { MessageBox.Show("Could not open statsfile: " + dialog.FileName); } else { stats_table_ = table; } }
/// <summary> /// Close the open stats file. /// </summary> private void CloseStatsFile() { if (this.stats_table_ != null) { this.stats_table_.Close(); this.stats_table_ = null; this.listViewCounters.Items.Clear(); } }