5 | @if (TimelapseService.FileHistory != null)
6 | {
7 |
8 |
9 | @for (int i = MinValue ; i <= MaxValue ; i++)
10 | {
11 | var revision = TimelapseService.FileHistory.Revisions[i];
12 | var label = GetRevisionLabel(revision);
13 | if (!string.IsNullOrEmpty(label))
14 | {
15 |
16 | @label
17 |
18 | }
19 | }
20 |
21 | }
22 |
23 |
24 | @code
25 | {
26 | private const double RequiredSizePerRevision = 24.0;
27 | private const int MaximumRevision = 100;
28 | private SamplingCache _samplingCache;
29 |
30 | [Inject]
31 | TimelapseService TimelapseService { get; set; } = default!;
32 |
33 | [Inject]
34 | MessagingService MessagingService { get; set; } = default!;
35 |
36 | private double PixelsPerRevision => RevisionCount > 0 ? Application.Current.MainWindow.ActualWidth / RevisionCount : 0;
37 |
38 | private int CurrentValue => TimelapseService.CurrentFileRevision?.Index ?? 0;
39 |
40 | private int MinValue => Math.Max(0, MaxValue - MaximumRevision);
41 |
42 | private int MaxValue => TimelapseService.FileHistory != null ? TimelapseService.FileHistory.Revisions.Count - 1 : 0;
43 |
44 | private int RevisionCount => (int)(MaxValue - MinValue);
45 |
46 | private SliderMark[] Marks
47 | {
48 | get
49 | {
50 | var marks = new List