public static string GetName(ShapeCodeReport shapeCode) { switch (shapeCode) { case ShapeCodeReport.ColumnChart: return("Столбчатая диаграмма"); case ShapeCodeReport.LineChart: return("Линейная диаграмма"); case ShapeCodeReport.PieChart: return("Круговая диаграмма"); case ShapeCodeReport.TableChart: return("Табличная диаграмма"); default: return(string.Empty); } }
internal static UserControl GetChartView(this IReportFilter vm, ShapeCodeReport shapeCode, IEnumerable source , DateTime?dtFrom = null, DateTime?dtTo = null) { switch (shapeCode) { case ShapeCodeReport.ColumnChart: return(new BasicColumnChart(source)); case ShapeCodeReport.PieChart: return(new BasicPieChart(source)); case ShapeCodeReport.TableChart: return(new BasicTableChart(source)); case ShapeCodeReport.LineChart: return(new BasicLineChart(source, dtFrom, dtTo)); default: return(null); } }
public ShapeReportViewModel(ShapeCodeReport shapeCode) { ShapeReport = shapeCode; Name = GetName(shapeCode); }