public ChangesSummaryPage(NewItemGenerationResult output) { _output = output; DataContext = MainViewModel.Instance; InitializeComponent(); }
public ChangesSummaryView(NewItemGenerationResult output) { ViewModel = MainViewModel.Current; DataContext = ViewModel; InitializeComponent(); Loaded += (sender, args) => { ViewModel.ChangesSummary.Initialize(output); }; }
public ChangesSummaryPage(NewItemGenerationResult output) { DataContext = MainViewModel.Instance; InitializeComponent(); Loaded += (sender, args) => { MainViewModel.Instance.ChangesSummary.Initialize(output); }; }
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)); }