Beispiel #1
0
 public DomainsListViewModel(IDomainsManagementServices domainsServices, IEventAggregator eventAggregator, ILoggerFacade logger) : base("Data Domains")
 {
     m_EventAggregator = eventAggregator;
     m_Logger          = logger;
     m_domainsServices = domainsServices;
     Action[] m_ButtonsActions = new Action[] { NewCommandHandler, AddCommandHandler, EditCommandHandler, RemoveSelectedCommandHandler };
     ButtonsPanelViewModel = new ButtonsViewModel("Create", "Add", "Edit", "Delete", m_ButtonsActions);
     SetCanExecuteButtonState();
     this.DomainsObservableCollection = m_domainsServices.GetAvailableDomains();
     logger.Log($"Created {nameof(DomainsListViewModel)}", Category.Debug, Priority.None);
 }
 internal DataSetListViewModel
     (IDomainsManagementServices domainsService, IAssociationServices associationServices, IDataSetModelServices dataSetModelServices, IRegionManager regionManager, IEventAggregator eventAggregator, ILoggerFacade logger) :
     base(Properties.Resources.DataSetsListPanelHeader)
 {
     this.m_DomainsService       = domainsService;
     this.m_AssociationServices  = associationServices;
     this.m_DataSetModelServices = dataSetModelServices;
     this.m_RegionManager        = regionManager;
     this.m_EventAggregator      = eventAggregator;
     this.m_Logger             = logger;
     this.DataSetListItems     = m_DataSetModelServices.GetDataSets();
     this.RemoveDataSetCommand = new DelegateCommand <string>(this.RemoveDataSetCommandHandler);
     this.b_DataSetListItems.CollectionChanged += this.WatchListItems_CollectionChanged;
     Action[] m_ButtonsActions = new Action[] { AddDataSetCommandHandler, EditDataSetCommandHandler, RemoveSelectedDataSetCommandHandler, () => { } };
     ButtonsPanelViewModel = new ButtonsViewModel("Add", "Edit", "Delete", "", m_ButtonsActions);
     SetCanExecuteButtonState();
     logger.Log($"Created {nameof(DataSetListViewModel)}", Category.Debug, Priority.None);
 }