private void PushStep(IPublishDialogStep step) { RemoveStepEvents(); _stack.Push(step); AddStepEvents(); step.OnPushedToDialog(this); CurrentStepChanged(); }
public PublishDialogWindowViewModel(ISolutionProject project, IPublishDialogStep initialStep, PublishDialogWindow owner) { _owner = owner; _project = project; PrevCommand = new ProtectedCommand(OnPrevCommand); NextCommand = new ProtectedCommand(OnNextCommand); PublishCommand = new ProtectedCommand(OnPublishCommand); PushStep(initialStep); }
/// <summary> /// Called every time this step moves on to the top of the navigation stack. /// </summary> /// <param name="previousStep">The previously shown dialog step.</param> public void OnVisible(IPublishDialogStep previousStep) { if (previousStep == _nextStepContent.ViewModel) { // Skip this step when going back, but ensure this warning will be shown next time. _publishDialog.Project.DeleteUserProperty(ChoiceStepViewModel.GoogleCloudPublishChoicePropertyName); _publishDialog.PopStep(); } else if (Options.DoNotShowAspNetCoreGceWarning) { // Skip this step if the user suppressed it. _publishDialog.NavigateToStep(_nextStepContent); } else { string previousChoiceId = _publishDialog.Project.GetUserProperty(ChoiceStepViewModel.GoogleCloudPublishChoicePropertyName); // Skip this warning step if the dialog was previously completed on the GCE step. if (Enum.TryParse(previousChoiceId, out ChoiceType previousChoice) && previousChoice == ChoiceType.Gce) { _publishDialog.NavigateToStep(_nextStepContent); } } }
void IPublishDialog.NavigateToStep(IPublishDialogStep step) { PushStep(step); }