public UCIndexDetail( IEventAggregator eventAggregator, UCIndexDetailViewModel viewModel, ResolverFactory resolverFactory) { InitializeComponent(); this.viewModel = viewModel; this.resolverFactory = resolverFactory; DataContext = this.viewModel; Loaded += async(s, e) => await viewModel.Loaded(); cbbEntities.SelectionChanged += (s, e) => { viewModel.FilterProcessors(); viewModel.LoadOptions(); }; cbbSourceConnections.SelectionChanged += (s, e) => { viewModel.FilterProcessors(); viewModel.LoadOptions(); }; cbbDestinationConnections.SelectionChanged += (s, e) => { viewModel.FilterProcessors(); viewModel.LoadOptions(); }; cbbSourceProcessors.SelectionChanged += (s, e) => { viewModel.LoadOptions(); }; cbbDestinationProcessors.SelectionChanged += (s, e) => { viewModel.LoadOptions(); }; eventAggregator.GetEvent <SelectIndexEvent>().Subscribe(OnSelectIndex); eventAggregator.GetEvent <OpenManageIndexPageEvent>().Subscribe(OnManageIndex); eventAggregator.GetEvent <OpenIndexPreviewPageEvent>().Subscribe(OnOpenPreviewPage); }
public UCIndexDetail( IEventAggregator eventAggregator, UCIndexDetailViewModel viewModel, ResolverFactory resolverFactory) { InitializeComponent(); this.viewModel = viewModel; this.resolverFactory = resolverFactory; DataContext = this.viewModel; Loaded += (s, e) => viewModel.Loaded(); eventAggregator.GetEvent <SelectIndexEvent>().Subscribe(OnSelectIndex); eventAggregator.GetEvent <OpenManageIndexPageEvent>().Subscribe(OnManageIndex); eventAggregator.GetEvent <OpenIndexPreviewPageEvent>().Subscribe(OnOpenPreviewPage); }