-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathScheduleInfo.cs
More file actions
70 lines (61 loc) · 2.2 KB
/
ScheduleInfo.cs
File metadata and controls
70 lines (61 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
using System;
namespace JMS.DVB.Algorithms.Scheduler
{
/// <summary>
/// Beschreibt eine auszuführende Aufzeichnung.
/// </summary>
internal class ScheduleInfo : IScheduleInformation
{
/// <summary>
/// Die ursprüngliche Planung.
/// </summary>
public IScheduleDefinition Definition { get; private set; }
/// <summary>
/// Das zu verwendende Gerät.
/// </summary>
public IScheduleResource Resource { get; private set; }
/// <summary>
/// Die tatsächliche Ausführungszeit.
/// </summary>
public PlannedTime Time { get; private set; }
/// <summary>
/// Gesetzt, wenn die Ausführung verspätet beginnt.
/// </summary>
public bool StartsLate { get; private set; }
/// <summary>
/// Erzeugt eine neue Beschreibung.
/// </summary>
/// <param name="definition">Die ursprüngliche Beschreibung der Aufzeichnung.</param>
/// <param name="resource">Das zu verwendende Gerät.</param>
/// <param name="time">Die tatsächliche Ausführungszeit.</param>
/// <param name="late">Gesetzt, wenn die Ausführung verspätet beginnt.</param>
internal ScheduleInfo( IScheduleDefinition definition, IScheduleResource resource, PlannedTime time, bool late )
{
// Remember
Definition = definition;
Resource = resource;
StartsLate = late;
Time = time;
}
/// <summary>
/// Erzeugt einen Anzeigetext zu Testzwecken.
/// </summary>
/// <returns></returns>
public override string ToString()
{
// Test
var recording = Definition as IRecordingDefinition;
// Format
return
string.Format
(
Properties.SchedulerResources.Debug_ScheduleInformation,
Time.Start,
Time.End,
StartsLate ? "*" : string.Empty,
Resource,
(recording == null) ? null : recording.Source
);
}
}
}