Ejemplo n.º 1
0
        protected override void CompleteDialogExtention()
        {
            LoadingViewModel.IsLoading = false;
            IsProcessing = true;

            var progressControlViewModel = new ProgressControlViewModel(ApplicationController);

            Controller.LoadToUi(progressControlViewModel);
            var progressControlViewModelLevel2 = new ProgressControlViewModel(ApplicationController);

            Controller.LoadToUi(progressControlViewModelLevel2);
            LogController = new LogController(progressControlViewModel);
            LogController.AddLevel2Ui(progressControlViewModelLevel2);
            var serviceRequestController = new ServiceRequestController(LogController, (o) => AddObjectToUi(o), RemoveObjectFromUi);

            Response = Service.Execute(Request, serviceRequestController);

            CompletionItem = Response;

            if (Response.Success)
            {
                ProcessCompletionExtention();
            }

            Controller.RemoveFromUi(progressControlViewModel);
            Controller.RemoveFromUi(progressControlViewModelLevel2);

            IsProcessing = false;

            if (!Response.Success)
            {
                ProcessError(Response.Exception);
            }
        }
        public LogController CreateLogControllerFor()
        {
            var logController = new LogController(this);

            logController.AddLevel2Ui(Level2ProgressControlViewModel);
            return(logController);
        }
Ejemplo n.º 3
0
        protected override void CompleteDialogExtention()
        {
            LoadingViewModel.IsLoading = false;
            IsProcessing = true;

            var progressControlViewModel = new ProgressControlViewModel(ApplicationController);

            Controller.LoadToUi(progressControlViewModel);
            var progressControlViewModelLevel2 = new ProgressControlViewModel(ApplicationController);

            Controller.LoadToUi(progressControlViewModelLevel2);
            LogController = new LogController(progressControlViewModel);
            LogController.AddLevel2Ui(progressControlViewModelLevel2);

            Response = Service.Execute(Request, LogController);

            CompletionItem = Response;

            if (Response.Success)
            {
                ProcessCompletionExtention();
            }

            Controller.RemoveFromUi(progressControlViewModel);
            Controller.RemoveFromUi(progressControlViewModelLevel2);

            IsProcessing = false;

            if (!Response.Success)
            {
                ProcessError(Response.Exception);
            }
            else if (CompletionMessage.IsNullOrWhiteSpace())
            {
                CompletionMessage = "Process Finished";
            }
        }