implementet ErrorMessages

This commit is contained in:
Natlinux81
2022-08-29 22:20:55 +02:00
parent a655efdc8c
commit f395258832
14 changed files with 118 additions and 12 deletions

View File

@@ -139,7 +139,24 @@ namespace Apollon.WPF.ViewModels
}
}
public bool CanSubmit => !string.IsNullOrEmpty(TournamentName);
private string _errorMessage;
public string ErrorMessage
{
get
{
return _errorMessage;
}
set
{
_errorMessage = value;
OnPropertyChanged(nameof(ErrorMessage));
OnPropertyChanged(nameof(HasErrorMessage));
}
}
public bool HasErrorMessage => !string.IsNullOrEmpty(ErrorMessage);
public bool CanSubmit => !string.IsNullOrEmpty(TournamentName);
public ICommand SubmitCommand { get; }
public ICommand CancelCommand { get; }