@page "/MedicalHistoryTemplateActionPage" @inject NavigationManager NavigationManager @if(!medicalHistorySubmited){ @if (_currentStep == 4) { تـــکمیل } else { مرحله بعد } @_stepCounter مرحله قبل } @code { private MudCarousel? _carousel; private int _currentStep = 0; private string _stepCounter = "1 / 5"; private bool medicalHistorySubmited = false; private void CompleteStepClicked() { _carousel?.MoveTo(++_currentStep); _stepCounter = string.Format("{0} / 5", _currentStep + 1); if (_currentStep == 5) medicalHistorySubmited = true; } private void RollBackStepClicked() { _carousel?.MoveTo(--_currentStep); _stepCounter = string.Format("{0} / 5", _currentStep + 1); } private void CompleteCreateMedicalHistory() { NavigationManager.NavigateTo("HomePage"); } }
@_stepCounter