Esempio n. 1
0
        public async Task ResetSelection()
        {
            IsLoadedData   = false;
            IsWizardFinish = false;

            SelectionHistory = new LinkedList <WizardItem>();
            SelectedItem     = null;

            var id = _wizardId;

            _wizardId = null;
            if (id != null && this.HyperStore != null)
            {
                await this.HyperStore.ExecuteAsync(new StepAheadWizardArgs()
                {
                    JobId = id, Abort = true
                });
            }

            _pendingConfig = null;
            _currentStage  = null;


            MessageDescription = "Select Wizard";
            TextBlockStatus    = String.Empty;

            if (this.HyperStore != null)
            {
                var args        = new GetHyperJobTypesArgs();
                var wizardTypes = await this.HyperStore.ExecuteAsync(args);

                if (wizardTypes != null)
                {
                    var wTypes = wizardTypes.Where(it => it.Name.ToLower().Contains("wizard")).ToArray();

                    if (wTypes != null)
                    {
                        Items = wTypes.Select(it => new WizardItem {
                            TypeSource = it
                        }).ToList();
                    }
                }
            }

            IsLoadedData = true;
        }
Esempio n. 2
0
        public async Task InitWizzard()
        {
            if (HyperStore == null)
            {
                return;
            }

            if (!string.IsNullOrWhiteSpace(_wizardId))
            {
                await this.HyperStore.ExecuteAsync(new StepAheadWizardArgs()
                {
                    JobId = _wizardId, Abort = true
                });

                _wizardId = null;
            }

            _pendingConfig = null;
            _currentStage  = null;

            var args        = new GetHyperJobTypesArgs();
            var wizardTypes = await this.HyperStore.ExecuteAsync(args);

            if (wizardTypes != null)
            {
                var wTypes = wizardTypes.Where(it => it.Name.ToLower().Contains("wizard")).ToArray();

                if (wTypes != null)
                {
                    Items = wTypes.Select(it => new WizardItem {
                        TypeSource = it
                    }).ToList();
                }
            }

            IsLoadedData = true;
        }