Exemplo n.º 1
0
 private void UpdateProviderCounters(ICollection <ProviderCounter> providerCounters)
 {
     foreach (ProviderCounter counter in (IEnumerable <ProviderCounter>)providerCounters)
     {
         ProviderCounterViewRow providerCounterViewRow;
         if (!this.providerCounterRows.TryGetValue(counter.Provider, out providerCounterViewRow))
         {
             providerCounterViewRow        = new ProviderCounterViewRow(counter);
             providerCounterViewRow.Height = this.dgvProviderCounters.RowTemplate.Height;
             this.providerCounterRows.Add(counter.Provider, providerCounterViewRow);
             this.dgvProviderCounters.Rows.Add((DataGridViewRow)providerCounterViewRow);
         }
         providerCounterViewRow.UpdateCounter((EventCounter)counter);
         if (counter.Provider == this.selectedProvider)
         {
             this.UpdateInstrumentCounters(counter.InstrumentCounters);
         }
     }
 }
Exemplo n.º 2
0
 private void UpdateProviderCounters(ICollection<ProviderCounter> providerCounters)
 {
     foreach (ProviderCounter counter in (IEnumerable<ProviderCounter>) providerCounters)
     {
         ProviderCounterViewRow providerCounterViewRow;
         if (!this.providerCounterRows.TryGetValue(counter.Provider, out providerCounterViewRow))
         {
             providerCounterViewRow = new ProviderCounterViewRow(counter);
             providerCounterViewRow.Height = this.dgvProviderCounters.RowTemplate.Height;
             this.providerCounterRows.Add(counter.Provider, providerCounterViewRow);
             this.dgvProviderCounters.Rows.Add((DataGridViewRow)providerCounterViewRow);
         }
         providerCounterViewRow.UpdateCounter((EventCounter)counter);
         if (counter.Provider == this.selectedProvider)
             this.UpdateInstrumentCounters(counter.InstrumentCounters);
     }
 }