private void UpdateInstrumentCounters(ICollection <InstrumentCounter> instrumentCounters)
 {
     foreach (InstrumentCounter counter in (IEnumerable <InstrumentCounter>)instrumentCounters)
     {
         InstrumentCounterViewRow instrumentCounterViewRow;
         if (!this.instrumentCounterRows.TryGetValue(counter.Instrument, out instrumentCounterViewRow))
         {
             instrumentCounterViewRow        = new InstrumentCounterViewRow(counter);
             instrumentCounterViewRow.Height = this.dgvInstrumentCounters.RowTemplate.Height;
             this.instrumentCounterRows.Add(counter.Instrument, instrumentCounterViewRow);
             this.dgvInstrumentCounters.Rows.Add((DataGridViewRow)instrumentCounterViewRow);
         }
         instrumentCounterViewRow.UpdateCounter((EventCounter)counter);
     }
 }
Beispiel #2
0
 private void UpdateInstrumentCounters(ICollection<InstrumentCounter> instrumentCounters)
 {
     foreach (InstrumentCounter counter in (IEnumerable<InstrumentCounter>) instrumentCounters)
     {
         InstrumentCounterViewRow instrumentCounterViewRow;
         if (!this.instrumentCounterRows.TryGetValue(counter.Instrument, out instrumentCounterViewRow))
         {
             instrumentCounterViewRow = new InstrumentCounterViewRow(counter);
             instrumentCounterViewRow.Height = this.dgvInstrumentCounters.RowTemplate.Height;
             this.instrumentCounterRows.Add(counter.Instrument, instrumentCounterViewRow);
             this.dgvInstrumentCounters.Rows.Add((DataGridViewRow)instrumentCounterViewRow);
         }
         instrumentCounterViewRow.UpdateCounter((EventCounter)counter);
     }
 }