Exemplo n.º 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;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="table"></param>
 public StatsTableProcesses(StatsTable table)
 {
     table_ = table;
       pids_ = new List<int>();
       Initialize();
 }
Exemplo n.º 3
0
 public StatsTableEntry(int id, string name, StatsTable table)
 {
     id_ = id;
       name_ = name;
       table_ = table;
 }
Exemplo n.º 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();
 }
Exemplo n.º 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;
              }
        }
Exemplo n.º 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();
       }
 }