protected void PrepareState(NavigationContext navigationContext, bool push) { UpdateProperties(); Guid workflowStateId = navigationContext.WorkflowState.StateId; if (workflowStateId == Consts.WF_STATE_ID_PLAYLISTS_OVERVIEW) { ClearData(); UpdatePlaylists(true); } if (workflowStateId == Consts.WF_STATE_ID_PLAYLISTS_REMOVE) { UpdatePlaylists(true); } else if (workflowStateId == Consts.WF_STATE_ID_PLAYLIST_INFO) { _playlist = GetCurrentPlaylist(navigationContext); } if (!push) return; if (workflowStateId == Consts.WF_STATE_ID_PLAYLIST_SAVE_EDIT_NAME) { _playlist = GetCurrentPlaylist(navigationContext); } else if (workflowStateId == Consts.WF_STATE_ID_PLAYLIST_SAVE_SUCCESSFUL) { // Nothing to do } else if (workflowStateId == Consts.WF_STATE_ID_PLAYLIST_SAVE_FAILED) { _message = GetMessage(navigationContext); } }
public static void ShowPlaylistInfo(PlaylistBase playlistData) { IWorkflowManager workflowManager = ServiceRegistration.Get<IWorkflowManager>(); workflowManager.NavigatePush(Consts.WF_STATE_ID_PLAYLIST_INFO, new NavigationContextConfig { AdditionalContextVariables = new Dictionary<string, object> { {Consts.KEY_PLAYLIST_DATA, playlistData} } }); }