Class Timeline
Represents a timeline used by profile elements
public class Timeline : CorePropertyChanged, IStorageModel
- Inheritance
-
objectCorePropertyChangedTimeline
- Implements
Constructors
Timeline()
Creates a new instance of the Timeline class
public Timeline()
Properties
Delta
Gets the cumulative delta of all calls to Update(TimeSpan, bool) that took place after the last call to ClearDelta()
public TimeSpan Delta { get; }
Property Value
EndSegmentEndPosition
Gets or sets the end position of the end segment
public TimeSpan EndSegmentEndPosition { get; set; }
Property Value
EndSegmentLength
Gets or sets the length of the end segment
public TimeSpan EndSegmentLength { get; set; }
Property Value
EndSegmentStartPosition
Gets or sets the end position of the end segment
public TimeSpan EndSegmentStartPosition { get; set; }
Property Value
IsFinished
Gets a boolean indicating whether the timeline has finished its run
public bool IsFinished { get; }
Property Value
IsOverridden
Gets a boolean indicating whether the timeline progress has been overridden
public bool IsOverridden { get; }
Property Value
Length
Gets the total length of this timeline
public TimeSpan Length { get; }
Property Value
MainSegmentEndPosition
Gets or sets the end position of the main segment
public TimeSpan MainSegmentEndPosition { get; set; }
Property Value
MainSegmentLength
Gets or sets the length of the main segment
public TimeSpan MainSegmentLength { get; set; }
Property Value
MainSegmentStartPosition
Gets or sets the start position of the main segment
public TimeSpan MainSegmentStartPosition { get; set; }
Property Value
Position
Gets the current position of the timeline
public TimeSpan Position { get; }
Property Value
StartSegmentEndPosition
Gets or sets the end position of the start segment
public TimeSpan StartSegmentEndPosition { get; set; }
Property Value
StartSegmentLength
Gets or sets the length of the start segment
public TimeSpan StartSegmentLength { get; set; }
Property Value
Methods
ClearDelta()
public void ClearDelta()
JumpToEnd()
Moves the position of the timeline forwards to the very end of the timeline
public void JumpToEnd()
JumpToEndSegment()
Moves the position of the timeline forwards to the beginning of the end segment
public void JumpToEndSegment()
JumpToStart()
Moves the position of the timeline backwards to the very start of the timeline
public void JumpToStart()
Load()
Loads the model from its associated entity
public void Load()
Save()
Saves the model to its associated entity
public void Save()
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Update(TimeSpan, bool)
Updates the timeline, applying the provided delta to the Position
public void Update(TimeSpan delta, bool stickToMainSegment)
Parameters
deltaTimeSpanThe amount of time to apply to the position
stickToMainSegmentboolWhether to stick to the main segment, wrapping around if needed
Events
TimelineChanged
Occurs when changes have been made to any of the segments of the timeline.
public event EventHandler? TimelineChanged