internal void SetChartDataBindingSource(object referenceRecord) { // InvokeRequired required compares the thread ID of the // calling thread to the thread ID of the creating thread. // If these threads are different, it returns true. if (this.WiimoteStatus.InvokeRequired) { SetChartDataBindingSourceCallback d = new SetChartDataBindingSourceCallback(SetChartDataBindingSource); this.Invoke(d, new object[] { referenceRecord }); } else { this.chartDataBindingSource.DataSource = (WiimoteReferenceRecord)referenceRecord; } }