public void Catalog(CatalogMediaTaskViewModel catalogViewModel) { if (catalogViewModel == null) { throw new ArgumentNullException("catalogViewModel"); } try { if (!tabMap.ContainsKey(catalogViewModel.Id)) { var catalogResultView = new CatalogResultView(); catalogResultView.Initialize(logger); catalogViewModel.AddProgressCallback(progress => catalogResultView.AddProgressDetail(progress)); catalogViewModel.AddErrorCallback(error => catalogResultView.AddErrorDetail(error)); var tabItem = new TabItem(); //TextBlock header = new TextBlock(); //header.Inlines.Add(catalogViewModel.Name); //header.ToolTip = catalogViewModel.Description; tabItem.Header = new TaskHeader(logger, catalogViewModel); tabItem.Content = catalogResultView; resultControl.Items.Add(tabItem); tabItem.IsSelected = true; AddViewModel(catalogViewModel, tabItem); } } catch (Exception ex) { logger.Error(" TaskResultView.Catalog", ex); } }
public void Catalog(CatalogMediaTaskViewModel catalogViewModel) { if (catalogViewModel == null) throw new ArgumentNullException("catalogViewModel"); try { if (!tabMap.ContainsKey(catalogViewModel.Id)) { var catalogResultView = new CatalogResultView(); catalogResultView.Initialize(logger); catalogViewModel.AddProgressCallback(progress => catalogResultView.AddProgressDetail(progress)); catalogViewModel.AddErrorCallback(error => catalogResultView.AddErrorDetail(error)); var tabItem = new TabItem(); //TextBlock header = new TextBlock(); //header.Inlines.Add(catalogViewModel.Name); //header.ToolTip = catalogViewModel.Description; tabItem.Header = new TaskHeader(logger, catalogViewModel); tabItem.Content = catalogResultView; resultControl.Items.Add(tabItem); tabItem.IsSelected = true; AddViewModel(catalogViewModel, tabItem); } } catch (Exception ex) { logger.Error(" TaskResultView.Catalog", ex); } }