protected async Task <string> GetPhotosceneResult(string photosceneid, AdskReCap.Format format = AdskReCap.Format.OBJ, bool bForPreview = false)
        {
            if (photosceneid == "" || !await ConnectWithReCapServer())
            {
                return("");
            }

            // Get Photoscene result (mesh)
            LogInfo("Getting the Photoscene result (mesh)", LogIndent.PostIndent);
            if (!await _recap.GetPointCloudArchive(photosceneid, format))
            {
                LogError("GetPointCloudArchive failed", LogIndent.PostUnindent);
                MessageBox.Show("GetPointCloudArchive failed", "WpfReCap", MessageBoxButton.OK, MessageBoxImage.Error);
                return("");
            }
            dynamic response = _recap.response();

            LogInfo(string.Format("GetPhotosceneResult succeeded - {0}", response.Photoscene.scenelink), LogIndent.PostUnindent);
            if (response.Photoscene.scenelink == "")
            {
                // That means there is a conversion happening and we need to wait
                if (bForPreview)
                {
                    _forPreview.Add(photosceneid);
                }
                _requestedFormat.Add(photosceneid, format);
                JobProgress jobWnd = new JobProgress(photosceneid);
                jobWnd.Owner     = this;
                jobWnd._callback = new ProcessPhotosceneCompletedDelegate(this.ConvertPhotosceneCompleted);
                jobWnd.Show();
                return("");                   // Return "" to not continue processing the command
            }
            return(response.Photoscene.scenelink);
        }
        private async void PhotoScenes_ProcessPhotoscene(object sender, RoutedEventArgs e)
        {
            e.Handled = true;
            if (PhotoScenes.SelectedItems.Count != 1)
            {
                return;
            }
            ReCapPhotosceneProject item = PhotoScenes.SelectedItem as ReCapPhotosceneProject;

            if (await ProcessPhotoscene(item.Name))
            {
                JobProgress jobWnd = new JobProgress(item.Name);
                jobWnd._callback = new ProcessPhotosceneCompletedDelegate(this.ProcessPhotosceneCompleted);
                jobWnd.Owner     = this;
                jobWnd.Show();
            }
        }