public override void OnImportsSatisfied() { base.OnImportsSatisfied(); EventAggregator.GetEvent <EntityImportedEvent <CustomRegion> >().Subscribe(OnCustomRegionImported); EventAggregator.GetEvent <GeographicalContextChangeEvent>().Subscribe(empty => RefreshCollection()); RegionImporter.Imported += delegate { EventAggregator.GetEvent <ResumeNormalProcessingEvent>().Publish(Empty.Value); }; RegionImporter.Importing += delegate { EventAggregator.GetEvent <PleaseStandByEvent>().Publish(RegionImporter.CreatePleaseStandByEventPayload()); }; EventAggregator.GetEvent <SimpleImportCompletedEvent>().Subscribe(Requery); EventAggregator.GetEvent <ContextAppliedEvent>().Subscribe(s => { if (s.Equals("Saved") && IsActive) { OnLoad(); } }); }
private void _initData() { RegionImporter.Imported += delegate { EventAggregator.GetEvent <ResumeNormalProcessingEvent>().Publish(Empty.Value); }; RegionImporter.Importing += delegate { EventAggregator.GetEvent <PleaseStandByEvent>().Publish(RegionImporter.CreatePleaseStandByEventPayload()); }; // RegionViewModels.CollectionChanged += (o, e) => RegionCollectionChanged(this, e); }
public void OnImportsSatisfied() { RegionImporter.Imported += delegate { EventAggregator.GetEvent <ResumeNormalProcessingEvent>().Publish(Empty.Value); }; RegionImporter.Importing += delegate { EventAggregator.GetEvent <PleaseStandByEvent>().Publish(RegionImporter.CreatePleaseStandByEventPayload()); }; ImportDataFileCommand.RaiseCanExecuteChanged(); }