private void SetViewButtonStatus(IRValueInfo result) { _detailsViewer = _aggregator.GetViewer(result); _title = result.Name; CanShowDetail = _detailsViewer != null; if (CanShowDetail) { ShowDetailCommand = new DelegateCommand(o => _detailsViewer.ViewAsync(result.Expression, _title).DoNotWait(), o => CanShowDetail); ShowDetailCommandTooltip = Resources.ShowDetailCommandTooltip; } CanShowOpenCsv = result.CanCoerceToDataFrame && (result.Length > 1 || result.TypeName == "S4"); if (CanShowOpenCsv) { OpenInCsvAppCommand = new DelegateCommand(OpenInCsvApp, o => CanShowOpenCsv); OpenInCsvAppCommandTooltip = Resources.OpenCsvAppCommandTooltip; } }
private void SetViewButtonStatus(IRValueInfo result) { _detailsViewer = _aggregator.GetViewer(result); _title = result.Name; CanShowDetail = _detailsViewer != null; if (CanShowDetail) { ShowDetailCommand = new DelegateCommand(o => _detailsViewer.ViewAsync(result.Expression, _title).DoNotWait(), o => CanShowDetail); ShowDetailCommandTooltip = Resources.ShowDetailCommandTooltip; } var tableCaps = (ViewerCapabilities.Table | ViewerCapabilities.List); CanShowOpenCsv = CanShowDetail && (_detailsViewer.Capabilities & tableCaps) != 0 && result.Length > 0; if (CanShowOpenCsv) { OpenInCsvAppCommand = new DelegateCommand(OpenInCsvApp, o => CanShowOpenCsv); OpenInCsvAppCommandTooltip = Resources.OpenCsvAppCommandTooltip; } }