Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
StepDescriptor.cs
1using System;
2using System.ComponentModel;
3using System.Globalization;
4using System.Threading.Tasks;
5
7{
11 public class StepDescriptor : INotifyPropertyChanged
12 {
13 public required string Key { get; init; }
14 public required string Title { get; init; }
15 public int Index { get; init; }
16 private bool isCurrent;
17 private bool isVisited;
18 private bool isComplete;
19 private bool isEnabled = true;
20
21 public bool IsCurrent { get => this.isCurrent; set { if (this.isCurrent != value) { this.isCurrent = value; this.OnPropertyChanged(nameof(this.IsCurrent)); } } }
22 public bool IsVisited { get => this.isVisited; set { if (this.isVisited != value) { this.isVisited = value; this.OnPropertyChanged(nameof(this.IsVisited)); } } }
23 public bool IsComplete { get => this.isComplete; set { if (this.isComplete != value) { this.isComplete = value; this.OnPropertyChanged(nameof(this.IsComplete)); } } }
24 public bool IsEnabled { get => this.isEnabled; set { if (this.isEnabled != value) { this.isEnabled = value; this.OnPropertyChanged(nameof(this.IsEnabled)); } } }
25
26 public string DisplayNumber => (this.Index + 1).ToString(CultureInfo.InvariantCulture);
27 public Func<Task<bool>>? ValidateAsync { get; init; }
28 public Func<bool>? CanNavigateTo { get; init; }
29
30 public override string ToString() => this.Key;
31
32 public event PropertyChangedEventHandler? PropertyChanged;
33 private void OnPropertyChanged(string propertyName) => this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
34 }
35}
Describes a wizard step in the new contract flow.