private void BindChart() { try { dataSource = channel.GetHistoricalDataForChart(this.Id, this.StartTime, this.EndTime); } catch (System.Exception ex) { logger.LogException(LogLevel.Info, string.Format("WindowChart2.BindChart"), ex); } Dispatcher.BeginInvoke(new Action(BindChartUI)); }
private void BindChart() { if (IsDataFromOtherWindow) { dataSource = DataFromOtherWindow; IsDataFromOtherWindow = false; } else { try { dataSource = channel.GetHistoricalDataForChart(this.Id, this.StartTime, this.EndTime); } catch (System.Exception ex) { logger.LogException(LogLevel.Info, string.Format("WindowCharts.BindChart"), ex); } } Dispatcher.Invoke(new Action(BindChartUI)); }