/// <summary> /// Flows to the GameplayHUD. /// Use this method to play transition effect on B window only. /// If you call Hide() on A window - it will hide with standard behaviour. /// Full Name: ExampleProject.UI.Gameplay.GameplayHUD.GameplayHUDScreen /// </summary> /// <param name="gameplay">gameplay to OnParametersPass</param> /// <returns>GameplayHUD</returns> public virtual ExampleProject.UI.Gameplay.GameplayHUD.GameplayHUDScreen FlowGameplayHUD(ExampleProject.UI.Gameplay.GameplayView.GameplayViewScreen gameplay) { return this.INTERNAL_FlowGameplayHUD(false, (w) => w.OnParametersPass(gameplay)); }
/// <summary> /// Flows to the GameplayView. /// Hides current window. /// Use this method to play transition effect on both windows (A and B). /// Full Name: ExampleProject.UI.Gameplay.GameplayView.GameplayViewScreen /// </summary> /// <param name="startSide">startSide to OnParametersPass</param> /// <returns>GameplayView</returns> public virtual ExampleProject.UI.Gameplay.GameplayView.GameplayViewScreen FlowHideGameplayView(ExampleProject.UI.Gameplay.GameplayView.Side startSide) { return this.INTERNAL_FlowGameplayView(true, (w) => w.OnParametersPass(startSide)); }
private async Task <ExampleProject> GetProjectAsync(DomainProject project) { if (project == null) { throw new ArgumentNullException("project"); } // Avsx Task <StorageFile> avsxTask = Task.FromResult <StorageFile>(null); if (!string.IsNullOrEmpty(project.AvsxFileId)) { avsxTask = _fileSystem.GetFilePropertiesSlimAsync(new StorageFile { Id = project.AvsxFileId }); } // Screenshot Task <StorageFile> screenshotTask = Task.FromResult <StorageFile>(null); if (!string.IsNullOrEmpty(project.ScreenshotFileId)) { screenshotTask = _fileSystem.GetFilePropertiesSlimAsync(new StorageFile { Id = project.ScreenshotFileId }); } // Original video Task <StorageFile> videoTask = Task.FromResult <StorageFile>(null); if (!string.IsNullOrEmpty(project.OriginalVideoFileId)) { videoTask = _fileSystem.GetFilePropertiesSlimAsync(new StorageFile { Id = project.OriginalVideoFileId }); } await Task.WhenAll(new[] { avsxTask, screenshotTask, videoTask }); var result = new ExampleProject { Id = project.Id, Name = project.Name, Description = project.Description, Created = project.Created, Views = project.HitsCount, Likes = project.LikesCount, Dislikes = project.DislikesCount, ProjectType = (int)project.ProjectType, ProjectSubtype = (int)project.ProjectSubtype }; if (avsxTask.Result != null) { result.AvsxUri = _uriProvider.CreateUri(avsxTask.Result.Id); result.TotalSize += avsxTask.Result.Length; } if (screenshotTask.Result != null) { result.ScreenshotUri = _uriProvider.CreateUri(screenshotTask.Result.Id); result.TotalSize += screenshotTask.Result.Length; } if (videoTask.Result != null) { result.VideoUri = _uriProvider.CreateUri(videoTask.Result.Id); result.VideoHash = videoTask.Result.Id; result.TotalSize += videoTask.Result.Length; } return(result); }
/// <summary> /// Flows to the GameplayView. /// Use this method to play transition effect on B window only. /// If you call Hide() on A window - it will hide with standard behaviour. /// Full Name: ExampleProject.UI.Gameplay.GameplayView.GameplayViewScreen /// </summary> /// <param name="startSide">startSide to OnParametersPass</param> /// <param name="onInstance">Calls after window created, but before any method called</param> /// <returns>GameplayView</returns> public virtual ExampleProject.UI.Gameplay.GameplayView.GameplayViewScreen FlowGameplayView(ExampleProject.UI.Gameplay.GameplayView.Side startSide, System.Action<ExampleProject.UI.Gameplay.GameplayView.GameplayViewScreen> onInstance) { return this.INTERNAL_FlowGameplayView(false, (w) => w.OnParametersPass(startSide), onInstance); }
/// <summary> /// Flows to the GameplayHUD. /// Hides current window. /// Use this method to play transition effect on both windows (A and B). /// Full Name: ExampleProject.UI.Gameplay.GameplayHUD.GameplayHUDScreen /// </summary> /// <param name="gameplay">gameplay to OnParametersPass</param> /// <param name="onInstance">Calls after window created, but before any method called</param> /// <returns>GameplayHUD</returns> public virtual ExampleProject.UI.Gameplay.GameplayHUD.GameplayHUDScreen FlowHideGameplayHUD(ExampleProject.UI.Gameplay.GameplayView.GameplayViewScreen gameplay, System.Action<ExampleProject.UI.Gameplay.GameplayHUD.GameplayHUDScreen> onInstance) { return this.INTERNAL_FlowGameplayHUD(true, (w) => w.OnParametersPass(gameplay), onInstance); }