private ICatalogItemViewModel CreateReportCatalogItem(CatalogItemInfo catalogItemInfo)
        {
            switch (catalogItemInfo.Type)
            {
            case CatalogItemType.Report:
                var reportViewModel = new ReportCatalogItemViewModel(catalogItemInfo, _promptsViewModel);
                return(reportViewModel);

            case CatalogItemType.Folder:
                var folderViewModel = new FolderCatalogItemViewModel(catalogItemInfo);
                return(folderViewModel);

            default:
                throw new Exception();
            }
        }
 private ICatalogItemViewModel CreateReportCatalogItem(CatalogItemInfo catalogItemInfo)
 {
     switch (catalogItemInfo.Type)
     {
         case CatalogItemType.Report:
             var reportViewModel = new ReportCatalogItemViewModel(catalogItemInfo, _promptsViewModel);
             return reportViewModel;
         case CatalogItemType.Folder:
             var folderViewModel = new FolderCatalogItemViewModel(catalogItemInfo);
             return folderViewModel;
         default:
             throw new Exception();
     }
 }
 public void Setup()
 {
     _promptsViewModel = new Mock<IPromptsViewModel>();
     _catalogItemInfo = new CatalogItemInfo {Name = "Name", Path = "Path", Type = CatalogItemType.Report};
     _reportCatalogItemViewModel = new ReportCatalogItemViewModel(_catalogItemInfo, _promptsViewModel.Object);
 }
Beispiel #4
0
 public ReportView(ReportCatalogItemViewModel viewModel, Brush textBrush)
 {
     DataContext = viewModel;
     InitializeComponent();
     Label.Foreground = textBrush;
 }