Пример #1
0
 /// <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;
 }
Пример #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="table"></param>
 public StatsTableProcesses(StatsTable table)
 {
     table_ = table;
       pids_ = new List<int>();
       Initialize();
 }
Пример #3
0
 public StatsTableEntry(int id, string name, StatsTable table)
 {
     id_ = id;
       name_ = name;
       table_ = table;
 }
Пример #4
0
 /// <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();
 }
Пример #5
0
        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;
              }
        }
Пример #6
0
 /// <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();
       }
 }