コード例 #1
0
        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);
            }
        }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
 public ShapeReportViewModel(ShapeCodeReport shapeCode)
 {
     ShapeReport = shapeCode;
     Name        = GetName(shapeCode);
 }