public MetricValueControl(WriteToLogDelegate writeToLog,
                           Action closeAction,
                           IEnumerable <MetricValue> metricValues,
                           MetricDataPoint metricDataPoint,
                           MetricInfo metricInfo)
 {
     this.writeToLog      = writeToLog;
     this.closeAction     = closeAction;
     this.metricDataPoint = metricDataPoint;
     this.metricInfo      = metricInfo;
     InitializeComponent();
     metricList  = metricValues as IList <MetricValue> ?? metricValues.ToList();
     bindingList = metricValues != null ?
                   new BindingList <MetricValue>(metricList)
     {
         AllowNew    = true,
         AllowEdit   = true,
         AllowRemove = true
     } :
     new BindingList <MetricValue>
     {
         AllowNew    = true,
         AllowEdit   = true,
         AllowRemove = true
     };
     InitializeControls();
 }
 public MetricValueControl(WriteToLogDelegate writeToLog, 
                      Action closeAction, 
                      IEnumerable<MetricValue> metricValues, 
                      MetricDataPoint metricDataPoint,  
                      MetricInfo metricInfo)
 {
     this.writeToLog = writeToLog;
     this.closeAction = closeAction;
     this.metricDataPoint = metricDataPoint;
     this.metricInfo = metricInfo;
     InitializeComponent();
     metricList = metricValues as IList<MetricValue> ?? metricValues.ToList();
     bindingList = metricValues != null ?
                   new BindingList<MetricValue>(metricList)
                     {
                         AllowNew = true,
                         AllowEdit = true,
                         AllowRemove = true
                     } : 
                   new BindingList<MetricValue>
                     {
                         AllowNew = true,
                         AllowEdit = true,
                         AllowRemove = true
                     };
     InitializeControls();
 }