Created
August 12, 2021 16:05
-
-
Save rdelrosario/4e32c7c9ce9777c5b68e29bda4d2fe8d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainViewModel | |
{ | |
public ICommand TriggerCommand { get; } | |
public ICommand VideoActionCommand { get; set; } | |
public MainViewModel() | |
{ | |
... | |
TriggerCommand = new Command<VideoTrigger>(OnTrigger);; | |
} | |
private void OnTrigger(VideoTrigger videoTrigger) | |
{ | |
if (_videoPlayerStateMachine.CanFire(videoTrigger)) | |
{ | |
VideoActionCommand?.Execute(videoTrigger); | |
_videoPlayerStateMachine.Fire(videoTrigger); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment