async Task <string> CreateNewPhotoscene(
            string sceneName,
            ReCapPhotosceneOptionsBuilder options)
        {
            string[] files = UIHelper.FileSelect(
                "Select Pictures",
                "(*.jpg)|*.jpg",
                true);

            if (files == null)
            {
                return(string.Empty);
            }

            // Step 1 - Create a new Photoscene

            var createResult = await _reCapClient.CreatePhotosceneAsync(
                sceneName,
                options);

            if (!createResult.IsOk())
            {
                OnLogReCapError(createResult.Error);

                return(string.Empty);
            }

            OnLogMessage("New scene created: " + sceneName +
                         " [Id: " + createResult.Photoscene.PhotosceneId + "]");

            var sceneWithInfo = await RetrieveSceneInfo(
                createResult.Photoscene.PhotosceneId);

            if (sceneWithInfo != null)
            {
                RootNode.AddNode(
                    new ReCapTreeItem(
                        sceneWithInfo,
                        Properties.Resources.file));
            }

            // Step 2 - Upload pictures

            OnLogMessage("Uploading " + files.Length +
                         " images for scene: " + sceneName);

            string photosceneId = createResult.Photoscene.PhotosceneId;

            var uploadResultArray = await _reCapClient.UploadFilesAsync(
                photosceneId,
                files);

            foreach (var uploadResult in uploadResultArray)
            {
                if (!uploadResult.IsOk())
                {
                    OnLogReCapError(uploadResult.Error);

                    //return;
                }
            }

            OnLogMessage("Files uploaded for scene: " + sceneName);

            // Step 3 - start processing the Photoscene

            var processResult = await _reCapClient.ProcessPhotosceneAsync(
                photosceneId);

            if (!processResult.IsOk())
            {
                OnLogReCapError(processResult.Error);

                return(photosceneId);
            }

            OnLogMessage("Start processing for scene: " + sceneName);

            return(photosceneId);
        }
        async Task <string> CreateNewPhotoscene(
            string sceneName,
            ReCapPhotosceneOptionsBuilder options)
        {
            string[] files = UIHelper.FileSelect(
                "Select Pictures",
                "(*.jpg)|*.jpg",
                true);

            if (files == null)
            {
                return(string.Empty);
            }

            // Step 1 - Create a new Photoscene

            var createResult = await _reCapClient.CreatePhotosceneAsync(
                sceneName,
                options);

            if (!createResult.IsOk())
            {
                OnLogReCapError(createResult.Error);

                return(string.Empty);
            }

            OnLogMessage("New scene created: " + sceneName);

            // Step 2 - Upload pictures

            string photosceneId = createResult.Photoscene.PhotosceneId;

            var uploadResult = await _reCapClient.UploadFilesAsync(
                photosceneId,
                files);

            if (!uploadResult.IsOk())
            {
                OnLogReCapError(uploadResult.Error);

                return(string.Empty);
            }

            OnLogMessage("Files uploaded for scene: " + sceneName);

            // Step 3 - start processing the Photoscene

            var processResult = await _reCapClient.ProcessPhotosceneAsync(
                photosceneId);

            if (!processResult.IsOk())
            {
                OnLogReCapError(processResult.Error);

                return(string.Empty);
            }

            OnLogMessage("Start processing for scene: " + sceneName);

            return(photosceneId);
        }