async void AddScene_Click(object sender, RoutedEventArgs e)
        {
            SceneSettingsDlg settingsDlg = new SceneSettingsDlg();

            settingsDlg.Owner = this.Parent as Window;

            settingsDlg.ShowDialog();

            if (!settingsDlg.DialogResult.HasValue || !settingsDlg.DialogResult.Value)
            {
                return;
            }

            ReCapPhotosceneOptionsBuilder options =
                new ReCapPhotosceneOptionsBuilder(
                    settingsDlg.MeshQuality,
                    settingsDlg.MeshFormat);

            var id = await CreateNewPhotoscene(
                settingsDlg.SceneName,
                options);

            if (id != string.Empty)
            {
                ShowProgressDlg(settingsDlg.SceneName, id);
            }
        }
        async void DownloadSceneResultAs_Click(object sender, RoutedEventArgs e)
        {
            var scene = SelectedItem.Photoscene;

            SceneSettingsDlg settingsDlg = new SceneSettingsDlg(
                scene.SceneName,
                scene.MeshQuality,
                MeshFormatEnumExtensions.FromString(scene.ConvertFormat));

            settingsDlg.ShowDialog();

            if (!settingsDlg.DialogResult.HasValue || !settingsDlg.DialogResult.Value)
            {
                return;
            }

            var linkResult = await _reCapClient.GetPhotosceneLinkAsync(
                scene.PhotosceneId,
                settingsDlg.MeshFormat);

            if (!linkResult.IsOk())
            {
                OnLogReCapError(linkResult.Error);
                return;
            }

            scene = linkResult.Photoscene;

            if (scene.Progress != 100.0)
            {
                OnLogMessage("Start processing for scene: " + scene.SceneName);

                ShowProgressDlg(scene.SceneName, scene.PhotosceneId);
            }
            else
            {
                DownloadSceneResult(scene);
            }
        }
        async void AddScene_Click(object sender, RoutedEventArgs e)
        {
            SceneSettingsDlg settingsDlg = new SceneSettingsDlg();

            settingsDlg.Owner = this.Parent as Window;

            settingsDlg.ShowDialog();

            if (!settingsDlg.DialogResult.HasValue || !settingsDlg.DialogResult.Value)
            {
                return;
            }

            ReCapPhotosceneOptionsBuilder options =
                new ReCapPhotosceneOptionsBuilder(
                    settingsDlg.MeshQuality,
                    settingsDlg.MeshFormat);

            var id = await CreateNewPhotoscene(
                settingsDlg.SceneName,
                options);

            if (id != string.Empty)
            {
                var sceneWithInfo = await RetrieveSceneInfo(id);

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

                ShowProgressDlg(settingsDlg.SceneName, id);
            }
        }