You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Returns the next enabled <see cref="WizardStep"/> after the current step. Takes into account steps which are
@@ -223,9 +224,9 @@ public void AddStep (WizardStep newStep)
223
224
/// The next step after the current step, if there is one; otherwise returns <c>null</c>, which indicates either
224
225
/// there are no enabled steps or the current step is the last enabled step.
225
226
/// </returns>
226
-
publicWizardStepGetNextStep()
227
+
publicWizardStep?GetNextStep()
227
228
{
228
-
LinkedListNode<WizardStep>step=null;
229
+
LinkedListNode<WizardStep>?step=null;
229
230
230
231
if(CurrentStepisnull)
231
232
{
@@ -265,9 +266,9 @@ public WizardStep GetNextStep ()
265
266
/// The first step ahead of the current step, if there is one; otherwise returns <c>null</c>, which indicates
266
267
/// either there are no enabled steps or the current step is the first enabled step.
267
268
/// </returns>
268
-
publicWizardStepGetPreviousStep()
269
+
publicWizardStep?GetPreviousStep()
269
270
{
270
-
LinkedListNode<WizardStep>step=null;
271
+
LinkedListNode<WizardStep>?step=null;
271
272
272
273
if(CurrentStepisnull)
273
274
{
@@ -303,36 +304,42 @@ public WizardStep GetPreviousStep ()
303
304
/// Causes the wizard to move to the previous enabled step (or first step if <see cref="CurrentStep"/> is not set).
304
305
/// If there is no previous step, does nothing.
305
306
/// </summary>
306
-
publicvoidGoBack()
307
+
/// <returns><see langword="true"/> if the transition to the step succeeded. <see langword="false"/> if the step was not found or the operation was cancelled.</returns>
308
+
publicboolGoBack()
307
309
{
308
-
WizardStepprevious=GetPreviousStep();
310
+
WizardStep?previous=GetPreviousStep();
309
311
310
312
if(previousis{})
311
313
{
312
-
GoToStep(previous);
314
+
returnGoToStep(previous);
313
315
}
316
+
317
+
returnfalse;
314
318
}
315
319
316
320
/// <summary>
317
321
/// Causes the wizard to move to the next enabled step (or last step if <see cref="CurrentStep"/> is not set). If
318
322
/// there is no previous step, does nothing.
319
323
/// </summary>
320
-
publicvoidGoNext()
324
+
/// <returns><see langword="true"/> if the transition to the step succeeded. <see langword="false"/> if the step was not found or the operation was cancelled.</returns>
325
+
publicboolGoNext()
321
326
{
322
-
WizardStepnextStep=GetNextStep();
327
+
WizardStep?nextStep=GetNextStep();
323
328
324
329
if(nextStepis{})
325
330
{
326
-
GoToStep(nextStep);
331
+
returnGoToStep(nextStep);
327
332
}
333
+
334
+
returnfalse;
328
335
}
329
336
330
337
/// <summary>Changes to the specified <see cref="WizardStep"/>.</summary>
331
338
/// <param name="newStep">The step to go to.</param>
332
-
/// <returns>True if the transition to the step succeeded. False if the step was not found or the operation was cancelled.</returns>
333
-
publicboolGoToStep(WizardStepnewStep)
339
+
/// <returns><see langword="true"/> if the transition to the step succeeded. <see langword="false"/> if the step was not found or the operation was cancelled.</returns>
0 commit comments