예제 #1
0
        private async void listView_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
        {
            if (e.IsSelected)
            {
                _currentListViewItem = e.Item;

                var history = e.Item.Tag as ScanHistory;

                if (String.IsNullOrWhiteSpace(history.path))
                {
                    history.path = String.Format("{0}\\{1}", _downloadDir, history.name);

                    ShowProcessingPane();
                    this.Cursor = Cursors.WaitCursor;

                    try
                    {
                        var docMetadata = await DokuFlexService.GetDocumentMetadadaAsync(_ticket, history.id);

                        metadataControl.BindMetadata(docMetadata.elements);
                        await DokuFlexService.DownloadAsync(_ticket, history.id, history.path);
                    }
                    finally
                    {
                        HideProcessingPane();
                        this.Cursor = Cursors.Default;
                    }
                }

                webBrowser.Navigate(history.path);

                //ShowPreviewNoSupportedPane(history.path);
            }
            else
            {
                _currentListViewItem = null;
            }
        }