private void RibbonButtonShowChart_Click(object sender, RoutedEventArgs e) { WindowCharts windowCharts = new WindowCharts(); windowCharts.Id = this.Id; windowCharts.EndTime = this.EndTime; windowCharts.StartTime = this.StartTime; windowCharts.TitleFoSensor = this.TitleFoSensor; windowCharts.Show(); }
private void RibbonButtonShowChart_Click(object sender, RoutedEventArgs e) { if (LastSelected != null && LastSelected.IsSelected == true) { WindowCharts windowCharts = new WindowCharts(); windowCharts.Id = LastSelected.Id; windowCharts.EndTime = DateTime.Now; windowCharts.StartTime = DateTime.Now - new TimeSpan(1, 0, 0, 0); windowCharts.TitleFoSensor = LastSelected.Title; windowCharts.Show(); } }
private void RibbonButtonShowChart_Click(object sender, RoutedEventArgs e) { WindowCharts windowCharts = new WindowCharts(); windowCharts.Id = this.Id; windowCharts.EndTime = DateTime.Now; windowCharts.StartTime = DateTime.Now - new TimeSpan(0, 0, 0, 1); windowCharts.TitleFoSensor = this.TitleFoSensor; windowCharts.IsDataFromOtherWindow = true; List <HistoricalDataForChart> list = new List <HistoricalDataForChart>(); foreach (var item in gridView.Items) { HistoricalDataForGrid currentItem = (HistoricalDataForGrid)item; list.Add(new HistoricalDataForChart(currentItem.Value, currentItem.Date)); } windowCharts.DataFromOtherWindow = list; windowCharts.Show(); }