Ejemplo n.º 1
0
        public ChangesSummaryPage(NewItemGenerationResult output)
        {
            _output     = output;
            DataContext = MainViewModel.Instance;

            InitializeComponent();
        }
Ejemplo n.º 2
0
        public ChangesSummaryView(NewItemGenerationResult output)
        {
            ViewModel   = MainViewModel.Current;
            DataContext = ViewModel;
            InitializeComponent();

            Loaded += (sender, args) => { ViewModel.ChangesSummary.Initialize(output); };
        }
Ejemplo n.º 3
0
        public ChangesSummaryPage(NewItemGenerationResult output)
        {
            DataContext = MainViewModel.Instance;

            InitializeComponent();
            Loaded += (sender, args) =>
            {
                MainViewModel.Instance.ChangesSummary.Initialize(output);
            };
        }
Ejemplo n.º 4
0
        private async Task <bool> IsStepAvailableAsync(StepData step)
        {
            if (step.Id == NewItemStepChangesSummary && !WizardStatus.HasValidationErrors)
            {
                _output = await CleanupAndGenerateNewItemAsync();

                if (!_output.HasChangesToApply)
                {
                    var message = GetNewItemHasNoChangesMessage(TemplateType);
                    message = string.Format(message, TemplateSelection.Name);
                    var notification = Notification.Warning(message, Category.RightClickItemHasNoChanges);
                    NotificationsControl.AddNotificationAsync(notification).FireAndForget();
                }

                return(_output.HasChangesToApply);
            }

            return(true);
        }
        protected override async Task <bool> IsStepAvailableAsync(int step)
        {
            if (step == 1)
            {
                _output = await CleanupAndGenerateNewItemAsync();

                if (!_output.HasChangesToApply)
                {
                    var message = TemplateType == TemplateType.Page ? StringRes.NewItemHasNoChangesPage : StringRes.NewItemHasNoChangesFeature;
                    message = string.Format(message, TemplateSelection.Name);
                    var notification = Notification.Warning(message, Category.RightClickItemHasNoChanges);
                    NotificationsControl.Instance.AddNotificationAsync(notification).FireAndForget();
                }

                return(_output.HasChangesToApply);
            }

            return(await base.IsStepAvailableAsync(step));
        }