Interface IProfileEditorService
- Namespace
- Artemis.UI.Shared.Services.ProfileEditor
- Assembly
- Artemis.UI.Shared.dll
Provides access the the profile editor back-end logic.
public interface IProfileEditorService : IArtemisSharedUIService
Properties
FocusMode
Gets an observable of the suspended keybindings state.
IObservable<ProfileEditorFocusMode> FocusMode { get; }
Property Value
History
Gets an observable of the current editor history.
IObservable<ProfileEditorHistory?> History { get; }
Property Value
LayerProperty
Gets an observable of the currently selected layer property.
IObservable<ILayerProperty?> LayerProperty { get; }
Property Value
PixelsPerSecond
Gets an observable of the zoom level.
IObservable<int> PixelsPerSecond { get; }
Property Value
Playing
Gets an observable of the profile preview playing state.
IObservable<bool> Playing { get; }
Property Value
ProfileConfiguration
Gets an observable of the currently selected profile configuration.
IObservable<ProfileConfiguration?> ProfileConfiguration { get; }
Property Value
ProfileElement
Gets an observable of the currently selected profile element.
IObservable<RenderProfileElement?> ProfileElement { get; }
Property Value
SelectedKeyframes
Gets an observable read only collection of selected keyframes.
ReadOnlyObservableCollection<ILayerPropertyKeyframe> SelectedKeyframes { get; }
Property Value
SuspendedEditing
Gets an observable of the suspended state.
IObservable<bool> SuspendedEditing { get; }
Property Value
Time
Gets an observable of the profile preview playback time.
IObservable<TimeSpan> Time { get; }
Property Value
Methods
ChangeCurrentLayerProperty(ILayerProperty?)
Change the selected layer property.
void ChangeCurrentLayerProperty(ILayerProperty? layerProperty)
Parameters
layerPropertyILayerPropertyThe layer property to select.
ChangeCurrentProfileConfiguration(ProfileConfiguration?)
Changes the selected profile by its ProfileConfiguration.
Task ChangeCurrentProfileConfiguration(ProfileConfiguration? profileConfiguration)
Parameters
profileConfigurationProfileConfigurationThe profile configuration of the profile to select.
Returns
ChangeCurrentProfileElement(RenderProfileElement?)
Changes the selected profile element.
void ChangeCurrentProfileElement(RenderProfileElement? renderProfileElement)
Parameters
renderProfileElementRenderProfileElementThe profile element to select.
ChangeFocusMode(ProfileEditorFocusMode)
Changes the current focus mode.
void ChangeFocusMode(ProfileEditorFocusMode focusMode)
Parameters
focusModeProfileEditorFocusModeThe new focus mode.
ChangePixelsPerSecond(int)
Changes the current pixels per second
void ChangePixelsPerSecond(int pixelsPerSecond)
Parameters
pixelsPerSecondintThe new pixels per second.
ChangeSuspendedEditing(bool)
Changes the current suspended state.
void ChangeSuspendedEditing(bool suspend)
Parameters
suspendboolThe new suspended state.
ChangeTime(TimeSpan)
Changes the current profile preview playback time.
void ChangeTime(TimeSpan time)
Parameters
timeTimeSpanThe new time.
CreateAndAddFolder(ProfileElement)
Creates a new folder as a sibling or child of the given target.
Folder CreateAndAddFolder(ProfileElement target)
Parameters
targetProfileElementThe target, if this is a layer the new layer will become a sibling, otherwise a child.
Returns
- Folder
The resulting folder.
CreateAndAddLayer(ProfileElement)
Creates a new layer with the default brush and all current LEDs as a sibling or child of the given target.
Layer CreateAndAddLayer(ProfileElement target)
Parameters
targetProfileElementThe target, if this is a layer the new layer will become a sibling, otherwise a child.
Returns
- Layer
The resulting layer.
CreateCommandScope(string)
Creates a new command scope which can be used to group undo/redo actions of multiple commands.
ProfileEditorCommandScope CreateCommandScope(string name)
Parameters
namestringThe name of the command scope.
Returns
- ProfileEditorCommandScope
The command scope that will group any commands until disposed.
ExecuteCommand(IProfileEditorCommand)
Executes the provided command and adds it to the history.
void ExecuteCommand(IProfileEditorCommand command)
Parameters
commandIProfileEditorCommandThe command to execute.
Pause()
Pauses profile preview playback.
void Pause()
Play()
Resumes profile preview playback.
void Play()
RoundTime(TimeSpan)
Rounds the given time to something appropriate for the current zoom level.
TimeSpan RoundTime(TimeSpan time)
Parameters
timeTimeSpanThe time to round
Returns
- TimeSpan
The rounded time.
SaveProfileAsync()
Asynchronously saves the current profile.
Task SaveProfileAsync()
Returns
- Task
A task representing the save action.
SelectKeyframe(ILayerPropertyKeyframe?, bool, bool)
Selects the provided keyframe.
void SelectKeyframe(ILayerPropertyKeyframe? keyframe, bool expand, bool toggle)
Parameters
keyframeILayerPropertyKeyframeThe keyframe to select.
expandboolIf true expands the current selection; otherwise replaces it with only the provided
keyframe.toggleboolIf true toggles the selection and only for the provided
keyframe.
SelectKeyframes(IEnumerable<ILayerPropertyKeyframe>, bool)
Selects the provided keyframes.
void SelectKeyframes(IEnumerable<ILayerPropertyKeyframe> keyframes, bool expand)
Parameters
keyframesIEnumerable<ILayerPropertyKeyframe>The keyframes to select.
expandboolIf true expands the current selection; otherwise replaces it with only the provided
keyframes.
SnapToTimeline(TimeSpan, TimeSpan, bool, bool, List<TimeSpan>?)
Snaps the given time to the closest relevant element in the timeline, this can be the cursor, a keyframe or a segment end.
TimeSpan SnapToTimeline(TimeSpan time, TimeSpan tolerance, bool snapToSegments, bool snapToCurrentTime, List<TimeSpan>? snapTimes = null)
Parameters
timeTimeSpanThe time to snap.
toleranceTimeSpanHow close the time must be to snap.
snapToSegmentsboolEnable snapping to timeline segments.
snapToCurrentTimeboolEnable snapping to the current time of the editor.
snapTimesList<TimeSpan>An optional extra list of times to snap to.
Returns
- TimeSpan
The snapped time.