void DownloadSceneResult(ReCapPhotoscene scene) { if (scene.SceneLink == null) { OnLogError("Scene Link unavailable ..."); return; } string fileName = scene.SceneName + ".zip"; fileName = UIHelper.GetValidFileName(fileName, '-'); fileName = UIHelper.GetSaveFileName(fileName); if (fileName != string.Empty) { AdnFileDownloader fd = new AdnFileDownloader( scene.SceneLink, fileName); fd.OnDownloadFileCompleted += OnDownloadFileCompleted; fd.Download(); } }
public ReCapTreeItem(ReCapPhotoscene scene, Bitmap image) { _scene = scene; _image = image; Name = scene.SceneName; }
private async Task <ReCapPhotoscene> RetrieveSceneInfo(string photosceneId) { try { var scenePropsResponse = await _reCapClient.GetPhotoscenePropertiesAsync( photosceneId); if (!scenePropsResponse.IsOk()) { OnLogReCapError(scenePropsResponse.Error); return(null); } ReCapPhotoscene scene = scenePropsResponse.Photoscene; var sceneProgResponse = await _reCapClient.GetPhotosceneProgressAsync( photosceneId); if (!sceneProgResponse.IsOk()) { OnLogReCapError(sceneProgResponse.Error); return(null); } double progress = sceneProgResponse.Photoscene.Progress; string progressMsg = sceneProgResponse.Photoscene.ProgressMsg; Uri link = null; if (progress == 100.0) { var sceneLinkResponse = await _reCapClient.GetPhotosceneLinkAsync( scene.PhotosceneId, MeshFormatEnumExtensions.FromString( scene.ConvertFormat)); if (!sceneLinkResponse.IsOk()) { OnLogReCapError(sceneLinkResponse.Error); } else { link = sceneLinkResponse.Photoscene.SceneLink; } } return(new ReCapPhotoscene( scene.SceneName, scene.PhotosceneId, progressMsg, progress, link, scene.FileSize, scene.UserId, scene.MeshQuality, scene.ConvertFormat, scene.ConvertStatus, scene.ProcessingTime, scene.Deleted, scene.Files, scene.Nb3dPoints, scene.NbFaces, scene.NbShots, scene.NbStitchedShots, scene.NbVertices)); } catch { return(null); } }