| | | 1 | | using System.Collections.Generic; |
| | | 2 | | |
| | | 3 | | namespace DirectSight.Reporting.Builders.Rendering; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Represents a card in the HTML report. |
| | | 7 | | /// </summary> |
| | | 8 | | public class Card |
| | | 9 | | { |
| | | 10 | | /// <summary> |
| | | 11 | | /// Initializes a new instance of the <see cref="Card" /> class. |
| | | 12 | | /// </summary> |
| | | 13 | | /// <param name="title">The title.</param> |
| | 38 | 14 | | public Card(string title) |
| | 38 | 15 | | { |
| | 38 | 16 | | this.Title = title; |
| | 38 | 17 | | } |
| | | 18 | | |
| | | 19 | | /// <summary> |
| | | 20 | | /// Initializes a new instance of the <see cref="Card" /> class. |
| | | 21 | | /// </summary> |
| | | 22 | | /// <param name="title">The title.</param> |
| | | 23 | | /// <param name="subtitle">The sub title.</param> |
| | | 24 | | /// <param name="subTitlePercentage">The percentage for the left border.</param> |
| | | 25 | | /// <param name="rows">The rows.</param> |
| | 114 | 26 | | public Card(string title, string subtitle, decimal? subTitlePercentage, params CardLineItem[] rows) |
| | 114 | 27 | | { |
| | 114 | 28 | | this.Title = title; |
| | 114 | 29 | | this.SubTitle = subtitle; |
| | 114 | 30 | | this.SubTitlePercentage = subTitlePercentage; |
| | 114 | 31 | | this.Rows = rows; |
| | 114 | 32 | | } |
| | | 33 | | |
| | | 34 | | /// <summary> |
| | | 35 | | /// Gets the title. |
| | | 36 | | /// </summary> |
| | 304 | 37 | | public string Title { get; } |
| | | 38 | | |
| | | 39 | | /// <summary> |
| | | 40 | | /// Gets the sub title. |
| | | 41 | | /// </summary> |
| | 228 | 42 | | public string SubTitle { get; } |
| | | 43 | | |
| | | 44 | | /// <summary> |
| | | 45 | | /// Gets the percentage for the left border. |
| | | 46 | | /// </summary> |
| | 120 | 47 | | public decimal? SubTitlePercentage { get; } |
| | | 48 | | |
| | | 49 | | /// <summary> |
| | | 50 | | /// Gets the rows. |
| | | 51 | | /// </summary> |
| | 304 | 52 | | public IReadOnlyCollection<CardLineItem> Rows { get; } = new List<CardLineItem>(); |
| | | 53 | | } |