Finish LoadingSpinner

This commit is contained in:
Natlinux81
2022-08-28 01:58:33 +02:00
parent 7fe2fd08ea
commit dfe0f72d04
20 changed files with 181 additions and 85 deletions

View File

@@ -21,8 +21,7 @@ namespace Apollon.WPF.ViewModels
_organisation = value;
OnPropertyChanged(nameof(Organisation));
}
}
}
private string _tournamentName;
public string TournamentName
@@ -53,10 +52,7 @@ namespace Apollon.WPF.ViewModels
}
}
private DateTime _startDate = DateTime.Today;
private DateTime _startDate = DateTime.Today;
public DateTime StartDate
{
@@ -115,7 +111,21 @@ namespace Apollon.WPF.ViewModels
}
}
public bool CanSubmit => !string.IsNullOrEmpty(TournamentName);
private bool _isSubmitting;
public bool IsSubmitting
{
get
{
return _isSubmitting;
}
set
{
_isSubmitting = value;
OnPropertyChanged(nameof(IsSubmitting));
}
}
public bool CanSubmit => !string.IsNullOrEmpty(TournamentName);
public ICommand SubmitCommand { get; }
public ICommand CancelCommand { get; }
@@ -125,8 +135,6 @@ namespace Apollon.WPF.ViewModels
SubmitCommand = submitCommand;
CancelCommand = cancelCommand;
}
}
}
}

View File

@@ -15,19 +15,16 @@ namespace Apollon.WPF.ViewModels
public ViewModelBase CurrentModalViewModel => _modalNavigationStore.CurrentViewModel;
public ViewModelBase CurrentViewModel => _navigationStore.CurrentViewModel;
public bool IsModalOpen => _modalNavigationStore.IsOpen;
public OverviewViewModel OverviewViewModel { get; }
public OverviewViewModel OverviewViewModel { get; }
public MainViewModel(ModalNavigationStore modalNavigationStore, OverviewViewModel overviewViewModel, NavigationStore navigationStore)
{
_navigationStore = navigationStore;
_modalNavigationStore = modalNavigationStore;
OverviewViewModel = overviewViewModel;
OverviewViewModel = overviewViewModel;
_navigationStore.CurrentViewModelChanged += NavigationStore_CurrentViewModelChanged;
_modalNavigationStore.CurrentViewModelChanged += ModalNavigationStore_CurrentViewModelChanged;
_modalNavigationStore.CurrentViewModelChanged += ModalNavigationStore_CurrentViewModelChanged;
}
protected override void Dispose()
@@ -45,7 +42,6 @@ namespace Apollon.WPF.ViewModels
{
OnPropertyChanged(nameof(CurrentModalViewModel));
OnPropertyChanged(nameof(IsModalOpen));
}
}
}

View File

@@ -11,7 +11,6 @@ namespace Apollon.WPF.ViewModels
public class OverviewDetailsViewModel : ViewModelBase
{
private readonly SelectedTournamentsStore _selectedTournamentStore;
private Tournament SelectedTournament => _selectedTournamentStore.SelectedTournament;
public bool HasSelectedTournament => SelectedTournament != null;

View File

@@ -33,7 +33,6 @@ namespace Apollon.WPF.ViewModels
}
}
public OverviewListingViewModel(SelectedTournamentsStore selectedTournamentStore, ModalNavigationStore modalNavigationStore, TournamentsStore tournamentStore)
{
_tournamentStore = tournamentStore;

View File

@@ -20,7 +20,7 @@ namespace Apollon.WPF.ViewModels
{
get
{
return IsLoading;
return _isLoading;
}
set
{

View File

@@ -11,12 +11,25 @@ namespace Apollon.WPF.ViewModels
{
public class WarningDeleteViewModel : ViewModelBase
{
public ICommand WarningCloseCommand { get;}
private bool _isDeleting;
public bool IsDeleting
{
get
{
return _isDeleting;
}
set
{
_isDeleting = value;
OnPropertyChanged(nameof(IsDeleting));
}
}
public ICommand WarningCloseCommand { get;}
public ICommand DeleteCommand { get; }
public WarningDeleteViewModel(ModalNavigationStore modalNavigationStore,TournamentsStore tournamentsStore, OverviewListingItemViewModel overviewListingItemViewModel)
{
WarningCloseCommand = new CloseModalCommand(modalNavigationStore);
DeleteCommand = new DeleteTournamentCommand(overviewListingItemViewModel, tournamentsStore, modalNavigationStore);
DeleteCommand = new DeleteTournamentCommand(this, overviewListingItemViewModel, tournamentsStore, modalNavigationStore);
}
}
}