Exemplo n.º 1
0
        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();
                }
            });
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        public void OnImportsSatisfied()
        {
            RegionImporter.Imported += delegate
            {
                EventAggregator.GetEvent <ResumeNormalProcessingEvent>().Publish(Empty.Value);
            };

            RegionImporter.Importing += delegate
            {
                EventAggregator.GetEvent <PleaseStandByEvent>().Publish(RegionImporter.CreatePleaseStandByEventPayload());
            };

            ImportDataFileCommand.RaiseCanExecuteChanged();
        }