implementet ErrorMessages
This commit is contained in:
@@ -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; }
|
||||
|
||||
@@ -29,6 +29,23 @@ namespace Apollon.WPF.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
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 ICommand AddTournamentCommand { get; }
|
||||
public ICommand LoadTournamentsCommand { get; }
|
||||
public ICommand NavigateNavBarCommand { get; }
|
||||
|
||||
@@ -24,7 +24,25 @@ namespace Apollon.WPF.ViewModels
|
||||
OnPropertyChanged(nameof(IsDeleting));
|
||||
}
|
||||
}
|
||||
public ICommand WarningCloseCommand { get;}
|
||||
|
||||
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 ICommand WarningCloseCommand { get;}
|
||||
public ICommand DeleteCommand { get; }
|
||||
public WarningDeleteViewModel(ModalNavigationStore modalNavigationStore,TournamentsStore tournamentsStore, OverviewListingItemViewModel overviewListingItemViewModel)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user