public void PlotBtn_Click(object sender, RoutedEventArgs e) { PlotUtils.removeAllCharts(this.plotter); foreach (PlotLineController pl in PLClist) { if ((bool)pl.checkboxSelect.IsChecked) { switch ((int)pl.Key) { case 0: { PlotUtils.plotSelectedNumericalValues(this.plotter, (string)pl.LogFilePath, (int)pl.Key, (int)pl.DataIndex, (int)pl.OffsetValue, (double)pl.ScaleValue, (string)pl.checkboxSelect.Content, (SolidColorBrush)pl.MyBrush); break; } default: { PlotUtils.plotSelectedBooleanValues(this.plotter, (string)pl.LogFilePath, (int)pl.Key, (int)pl.DataIndex, (int)pl.OffsetValue, (double)pl.ScaleValue, (string)pl.checkboxSelect.Content, (SolidColorBrush)pl.MyBrush); break; } } } } }