Exemple #1
0
        /////////////////////////////////////////////////////////////////////////////////
        //
        //
        /////////////////////////////////////////////////////////////////////////////////
        async void ShowViewable_Click(object sender, RoutedEventArgs e)
        {
            if (!(SelectedItem.Tag is ObjectDetails))
            {
                return;
            }

            var objectDetails = SelectedItem.Tag as ObjectDetails;

            var viewableResponse = await _viewDataClient.GetViewableAsync(
                objectDetails.FileId,
                ViewableOptionEnum.kAll);

            if (!viewableResponse.IsOk())
            {
                _logger.LogError("Viewable request for " +
                                 objectDetails.ObjectKey + " failed: " +
                                 viewableResponse.Error.StatusCode.ToString());

                return;
            }

            _logger.LogMessage("Viewable request for " +
                               objectDetails.ObjectKey + " : Success");

            ViewableDlg viewableDlg = new ViewableDlg(
                objectDetails.ObjectKey,
                viewableResponse);

            viewableDlg.Owner = this.Parent as Window;

            viewableDlg.Show();
        }
        /////////////////////////////////////////////////////////////////////////////////
        //
        //
        /////////////////////////////////////////////////////////////////////////////////
        async void ShowViewable_Click(object sender, RoutedEventArgs e)
        {
            if (!(SelectedItem.Tag is ObjectDetails))
                return;

            var objectDetails = SelectedItem.Tag as ObjectDetails;

            var viewableResponse = await _viewDataClient.GetViewableAsync(
                objectDetails.FileId,
                ViewableOptionEnum.kAll);

            if (!viewableResponse.IsOk())
            {
                _logger.LogError("Viewable request for " +
                    objectDetails.ObjectKey + " failed: " +
                    viewableResponse.Error.StatusCode.ToString());

                return;
            }

            _logger.LogMessage("Viewable request for " +
                objectDetails.ObjectKey + " : Success");

            ViewableDlg viewableDlg = new ViewableDlg(
                objectDetails.ObjectKey,
                viewableResponse);

            viewableDlg.Owner = this.Parent as Window;

            viewableDlg.Show();
        }