private async void LoadDataAsync()
        {
            ///FIRST GET THE ANALYSIS
            var vm = (SimpleProgressViewModel)ContentViewModel;

            var targetId = Guid.NewGuid();

            History.Events.ThinkingAboutTargetEvent.Publish(targetId);
            var description = "SimpleProgressPage.LoadDataAsync";

            IncrementContentBusyEventMessage.Publish(description);
            //DisableNavigationRequestedEventMessage.Publish();
            try
            {
                await vm.InitializeData();
            }
            finally
            {
                DecrementContentBusyEventMessage.Publish(description);
                //EnableNavigationRequestedEventMessage.Publish();
                History.Events.ThinkedAboutTargetEvent.Publish(targetId);
            }

            ///WHILE THE USER IS ON THIS PAGE, CONTINUE TO REFINE IT
            while (PageIsActive)
            {
                //#region Thinking (try..)
                //targetId = Guid.NewGuid();
                //History.Events.ThinkingAboutTargetEvent.Publish(targetId);
                //try
                //{
                //#endregion
                await vm.RefineAnalysis(0);

                //#region (...finally) Thinked
                //}
                //finally
                //{
                //  History.Events.ThinkedAboutTargetEvent.Publish(targetId);
                //}
                //  #endregion
            }
        }
Exemplo n.º 2
0
 public void Handle(DecrementContentBusyEventMessage message)
 {
     RemoveContentBusyDescription(message.Description);
     DecrementContentBusy();
 }