Finish LoadingSpinner
This commit is contained in:
@@ -11,7 +11,6 @@ using System.Threading.Tasks;
|
|||||||
namespace Apollon.EntityFramework.Commands
|
namespace Apollon.EntityFramework.Commands
|
||||||
{
|
{
|
||||||
public class CreateTournamentCommand : ICreateTournamentCommand
|
public class CreateTournamentCommand : ICreateTournamentCommand
|
||||||
|
|
||||||
{
|
{
|
||||||
private readonly TournamentsDbContextFactory _contextFactory;
|
private readonly TournamentsDbContextFactory _contextFactory;
|
||||||
|
|
||||||
@@ -23,7 +22,7 @@ namespace Apollon.EntityFramework.Commands
|
|||||||
public async Task Execute(Tournament tournament)
|
public async Task Execute(Tournament tournament)
|
||||||
{
|
{
|
||||||
using (TournamentsDbContext context = _contextFactory.Create())
|
using (TournamentsDbContext context = _contextFactory.Create())
|
||||||
{
|
{
|
||||||
TournamentDto tournamentDto = new TournamentDto()
|
TournamentDto tournamentDto = new TournamentDto()
|
||||||
{
|
{
|
||||||
Id = tournament.Id,
|
Id = tournament.Id,
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace Apollon.EntityFramework.Commands
|
|||||||
public async Task Execute(Tournament tournament)
|
public async Task Execute(Tournament tournament)
|
||||||
{
|
{
|
||||||
using (TournamentsDbContext context = _contextFactory.Create())
|
using (TournamentsDbContext context = _contextFactory.Create())
|
||||||
{
|
{
|
||||||
TournamentDto tournamentDto = new TournamentDto()
|
TournamentDto tournamentDto = new TournamentDto()
|
||||||
{
|
{
|
||||||
Id = tournament.Id,
|
Id = tournament.Id,
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ namespace Apollon.EntityFramework
|
|||||||
public TournamentsDbContext(DbContextOptions options) : base(options)
|
public TournamentsDbContext(DbContextOptions options) : base(options)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public DbSet<TournamentDto> Tournaments { get; set; }
|
public DbSet<TournamentDto> Tournaments { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="LoadingSpinner.WPF" Version="1.0.0" />
|
||||||
<PackageReference Include="MahApps.Metro.IconPacks.Material" Version="4.11.0" />
|
<PackageReference Include="MahApps.Metro.IconPacks.Material" Version="4.11.0" />
|
||||||
<PackageReference Include="SimpleModal.WPF" Version="1.0.0" />
|
<PackageReference Include="SimpleModal.WPF" Version="1.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -30,8 +30,7 @@ namespace Apollon.WPF
|
|||||||
private readonly IUpdateTournamentCommand _updateTournamentCommand;
|
private readonly IUpdateTournamentCommand _updateTournamentCommand;
|
||||||
private readonly IDeleteTournamentCommand _deleteTournamentCommand;
|
private readonly IDeleteTournamentCommand _deleteTournamentCommand;
|
||||||
private readonly TournamentsStore _tournamentStore;
|
private readonly TournamentsStore _tournamentStore;
|
||||||
private readonly SelectedTournamentsStore _selectedTournamentStore;
|
private readonly SelectedTournamentsStore _selectedTournamentStore;
|
||||||
|
|
||||||
|
|
||||||
public App()
|
public App()
|
||||||
{
|
{
|
||||||
@@ -61,10 +60,10 @@ namespace Apollon.WPF
|
|||||||
_tournamentStore,
|
_tournamentStore,
|
||||||
_navigationStore);
|
_navigationStore);
|
||||||
|
|
||||||
_navigationStore.CurrentViewModel = new OverviewViewModel(
|
_navigationStore.CurrentViewModel = OverviewViewModel.LoadViewModel(
|
||||||
_tournamentStore,
|
|
||||||
_selectedTournamentStore,
|
_selectedTournamentStore,
|
||||||
_modalNavigationStore,
|
_modalNavigationStore,
|
||||||
|
_tournamentStore,
|
||||||
_navigationStore);
|
_navigationStore);
|
||||||
|
|
||||||
MainWindow = new MainWindow()
|
MainWindow = new MainWindow()
|
||||||
|
|||||||
@@ -13,8 +13,7 @@ namespace Apollon.WPF.Commands
|
|||||||
{
|
{
|
||||||
private readonly TournamentsStore _tournamentStore;
|
private readonly TournamentsStore _tournamentStore;
|
||||||
private readonly ModalNavigationStore _modalNavigationStore;
|
private readonly ModalNavigationStore _modalNavigationStore;
|
||||||
private AddTournamentViewModel _addTournamentViewModel;
|
private AddTournamentViewModel _addTournamentViewModel;
|
||||||
|
|
||||||
|
|
||||||
public AddTournamentCommand(TournamentsStore tournamentStore, ModalNavigationStore modalNavigationStore)
|
public AddTournamentCommand(TournamentsStore tournamentStore, ModalNavigationStore modalNavigationStore)
|
||||||
{
|
{
|
||||||
@@ -32,6 +31,9 @@ namespace Apollon.WPF.Commands
|
|||||||
public override async Task ExecuteAsync(object parameter)
|
public override async Task ExecuteAsync(object parameter)
|
||||||
{
|
{
|
||||||
AddEditDetailsViewModel detailsViewModel = _addTournamentViewModel.AddEditDetailsViewModel;
|
AddEditDetailsViewModel detailsViewModel = _addTournamentViewModel.AddEditDetailsViewModel;
|
||||||
|
|
||||||
|
detailsViewModel.IsSubmitting = true;
|
||||||
|
|
||||||
Tournament tournament = new Tournament(
|
Tournament tournament = new Tournament(
|
||||||
Guid.NewGuid(),
|
Guid.NewGuid(),
|
||||||
detailsViewModel.Organisation,
|
detailsViewModel.Organisation,
|
||||||
@@ -51,9 +53,12 @@ namespace Apollon.WPF.Commands
|
|||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
detailsViewModel.IsSubmitting = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,13 +8,35 @@ namespace Apollon.WPF.Commands
|
|||||||
{
|
{
|
||||||
public abstract class AsyncCommandBase : CommandBase
|
public abstract class AsyncCommandBase : CommandBase
|
||||||
{
|
{
|
||||||
|
private bool _isExecuring;
|
||||||
|
public bool IsExecuting
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _isExecuring;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_isExecuring = value;
|
||||||
|
OnCanExecutedChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public override bool CanExecute(object parameter)
|
||||||
|
{
|
||||||
|
return !IsExecuting && base.CanExecute(parameter);
|
||||||
|
}
|
||||||
public override async void Execute(object parameter)
|
public override async void Execute(object parameter)
|
||||||
{
|
{
|
||||||
|
IsExecuting = true;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await ExecuteAsync(parameter);
|
await ExecuteAsync(parameter);
|
||||||
}
|
}
|
||||||
catch (Exception) { }
|
catch (Exception) { }
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
IsExecuting = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public abstract Task ExecuteAsync(object parameter);
|
public abstract Task ExecuteAsync(object parameter);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,20 +10,29 @@ using System.Threading.Tasks;
|
|||||||
namespace Apollon.WPF.Commands
|
namespace Apollon.WPF.Commands
|
||||||
{
|
{
|
||||||
public class DeleteTournamentCommand : AsyncCommandBase
|
public class DeleteTournamentCommand : AsyncCommandBase
|
||||||
{
|
{
|
||||||
private readonly OverviewListingItemViewModel _overviewListingItemViewModel;
|
private readonly OverviewListingItemViewModel _overviewListingItemViewModel;
|
||||||
private readonly TournamentsStore _tournamentStore;
|
private readonly TournamentsStore _tournamentStore;
|
||||||
private readonly ModalNavigationStore _modalNavigationStore;
|
private readonly ModalNavigationStore _modalNavigationStore;
|
||||||
|
private readonly WarningDeleteViewModel _warningDeleteViewModel;
|
||||||
|
|
||||||
public DeleteTournamentCommand(OverviewListingItemViewModel overviewListingItemViewModel, TournamentsStore tournamentStore, ModalNavigationStore modalNavigationStore)
|
public DeleteTournamentCommand(WarningDeleteViewModel warningDeleteViewModel, OverviewListingItemViewModel overviewListingItemViewModel, TournamentsStore tournamentsStore, ModalNavigationStore modalNavigationStore)
|
||||||
{
|
{
|
||||||
|
_warningDeleteViewModel = warningDeleteViewModel;
|
||||||
_overviewListingItemViewModel = overviewListingItemViewModel;
|
_overviewListingItemViewModel = overviewListingItemViewModel;
|
||||||
_tournamentStore = tournamentStore;
|
_tournamentStore = tournamentsStore;
|
||||||
_modalNavigationStore = modalNavigationStore;
|
_modalNavigationStore = modalNavigationStore;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public OverviewListingItemViewModel OverviewListingItemViewModel { get; }
|
||||||
|
public TournamentsStore TournamentsStore { get; }
|
||||||
|
public ModalNavigationStore ModalNavigationStore { get; }
|
||||||
|
public WarningDeleteViewModel WarningDeleteViewModel { get; }
|
||||||
|
|
||||||
public override async Task ExecuteAsync(object parameter)
|
public override async Task ExecuteAsync(object parameter)
|
||||||
{
|
{
|
||||||
|
_warningDeleteViewModel.IsDeleting = true;
|
||||||
|
|
||||||
Tournament tournament = _overviewListingItemViewModel.Tournament;
|
Tournament tournament = _overviewListingItemViewModel.Tournament;
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -35,7 +44,12 @@ namespace Apollon.WPF.Commands
|
|||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
_warningDeleteViewModel.IsDeleting = false;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,9 @@ namespace Apollon.WPF.Commands
|
|||||||
public override async Task ExecuteAsync(object parameter)
|
public override async Task ExecuteAsync(object parameter)
|
||||||
{
|
{
|
||||||
AddEditDetailsViewModel detailsViewModel = _editTournamentViewModel.AddEditDetailsViewModel;
|
AddEditDetailsViewModel detailsViewModel = _editTournamentViewModel.AddEditDetailsViewModel;
|
||||||
|
|
||||||
|
detailsViewModel.IsSubmitting = true;
|
||||||
|
|
||||||
Tournament tournament = new Tournament(
|
Tournament tournament = new Tournament(
|
||||||
_editTournamentViewModel.TournamentId,
|
_editTournamentViewModel.TournamentId,
|
||||||
detailsViewModel.Organisation,
|
detailsViewModel.Organisation,
|
||||||
@@ -46,6 +49,10 @@ namespace Apollon.WPF.Commands
|
|||||||
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
detailsViewModel.IsSubmitting = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ using System.Threading.Tasks;
|
|||||||
namespace Apollon.WPF.Commands
|
namespace Apollon.WPF.Commands
|
||||||
{
|
{
|
||||||
public class OpenWarningDeleteCommand : CommandBase
|
public class OpenWarningDeleteCommand : CommandBase
|
||||||
{
|
{
|
||||||
private readonly OverviewListingItemViewModel _overviewListingItemViewModel;
|
private readonly OverviewListingItemViewModel _overviewListingItemViewModel;
|
||||||
private readonly ModalNavigationStore _modalNavigationStore;
|
private readonly ModalNavigationStore _modalNavigationStore;
|
||||||
private readonly TournamentsStore _tournamentsStore;
|
private readonly TournamentsStore _tournamentsStore;
|
||||||
@@ -24,7 +24,6 @@ namespace Apollon.WPF.Commands
|
|||||||
|
|
||||||
public override void Execute(object parameter)
|
public override void Execute(object parameter)
|
||||||
{
|
{
|
||||||
Tournament tournament =_overviewListingItemViewModel.Tournament;
|
|
||||||
WarningDeleteViewModel warningDeleteViewModel = new WarningDeleteViewModel(_modalNavigationStore,_tournamentsStore,_overviewListingItemViewModel);
|
WarningDeleteViewModel warningDeleteViewModel = new WarningDeleteViewModel(_modalNavigationStore,_tournamentsStore,_overviewListingItemViewModel);
|
||||||
_modalNavigationStore.CurrentViewModel = warningDeleteViewModel;
|
_modalNavigationStore.CurrentViewModel = warningDeleteViewModel;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,8 +21,7 @@ namespace Apollon.WPF.ViewModels
|
|||||||
_organisation = value;
|
_organisation = value;
|
||||||
OnPropertyChanged(nameof(Organisation));
|
OnPropertyChanged(nameof(Organisation));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private string _tournamentName;
|
private string _tournamentName;
|
||||||
public 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
|
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 SubmitCommand { get; }
|
||||||
public ICommand CancelCommand { get; }
|
public ICommand CancelCommand { get; }
|
||||||
@@ -125,8 +135,6 @@ namespace Apollon.WPF.ViewModels
|
|||||||
SubmitCommand = submitCommand;
|
SubmitCommand = submitCommand;
|
||||||
CancelCommand = cancelCommand;
|
CancelCommand = cancelCommand;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,19 +15,16 @@ namespace Apollon.WPF.ViewModels
|
|||||||
public ViewModelBase CurrentModalViewModel => _modalNavigationStore.CurrentViewModel;
|
public ViewModelBase CurrentModalViewModel => _modalNavigationStore.CurrentViewModel;
|
||||||
public ViewModelBase CurrentViewModel => _navigationStore.CurrentViewModel;
|
public ViewModelBase CurrentViewModel => _navigationStore.CurrentViewModel;
|
||||||
public bool IsModalOpen => _modalNavigationStore.IsOpen;
|
public bool IsModalOpen => _modalNavigationStore.IsOpen;
|
||||||
public OverviewViewModel OverviewViewModel { get; }
|
public OverviewViewModel OverviewViewModel { get; }
|
||||||
|
|
||||||
|
|
||||||
public MainViewModel(ModalNavigationStore modalNavigationStore, OverviewViewModel overviewViewModel, NavigationStore navigationStore)
|
public MainViewModel(ModalNavigationStore modalNavigationStore, OverviewViewModel overviewViewModel, NavigationStore navigationStore)
|
||||||
{
|
{
|
||||||
_navigationStore = navigationStore;
|
_navigationStore = navigationStore;
|
||||||
_modalNavigationStore = modalNavigationStore;
|
_modalNavigationStore = modalNavigationStore;
|
||||||
OverviewViewModel = overviewViewModel;
|
OverviewViewModel = overviewViewModel;
|
||||||
|
|
||||||
|
|
||||||
_navigationStore.CurrentViewModelChanged += NavigationStore_CurrentViewModelChanged;
|
_navigationStore.CurrentViewModelChanged += NavigationStore_CurrentViewModelChanged;
|
||||||
_modalNavigationStore.CurrentViewModelChanged += ModalNavigationStore_CurrentViewModelChanged;
|
_modalNavigationStore.CurrentViewModelChanged += ModalNavigationStore_CurrentViewModelChanged;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose()
|
protected override void Dispose()
|
||||||
@@ -45,7 +42,6 @@ namespace Apollon.WPF.ViewModels
|
|||||||
{
|
{
|
||||||
OnPropertyChanged(nameof(CurrentModalViewModel));
|
OnPropertyChanged(nameof(CurrentModalViewModel));
|
||||||
OnPropertyChanged(nameof(IsModalOpen));
|
OnPropertyChanged(nameof(IsModalOpen));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ namespace Apollon.WPF.ViewModels
|
|||||||
public class OverviewDetailsViewModel : ViewModelBase
|
public class OverviewDetailsViewModel : ViewModelBase
|
||||||
{
|
{
|
||||||
private readonly SelectedTournamentsStore _selectedTournamentStore;
|
private readonly SelectedTournamentsStore _selectedTournamentStore;
|
||||||
|
|
||||||
private Tournament SelectedTournament => _selectedTournamentStore.SelectedTournament;
|
private Tournament SelectedTournament => _selectedTournamentStore.SelectedTournament;
|
||||||
|
|
||||||
public bool HasSelectedTournament => SelectedTournament != null;
|
public bool HasSelectedTournament => SelectedTournament != null;
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ namespace Apollon.WPF.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public OverviewListingViewModel(SelectedTournamentsStore selectedTournamentStore, ModalNavigationStore modalNavigationStore, TournamentsStore tournamentStore)
|
public OverviewListingViewModel(SelectedTournamentsStore selectedTournamentStore, ModalNavigationStore modalNavigationStore, TournamentsStore tournamentStore)
|
||||||
{
|
{
|
||||||
_tournamentStore = tournamentStore;
|
_tournamentStore = tournamentStore;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace Apollon.WPF.ViewModels
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return IsLoading;
|
return _isLoading;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,12 +11,25 @@ namespace Apollon.WPF.ViewModels
|
|||||||
{
|
{
|
||||||
public class WarningDeleteViewModel : ViewModelBase
|
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 ICommand DeleteCommand { get; }
|
||||||
public WarningDeleteViewModel(ModalNavigationStore modalNavigationStore,TournamentsStore tournamentsStore, OverviewListingItemViewModel overviewListingItemViewModel)
|
public WarningDeleteViewModel(ModalNavigationStore modalNavigationStore,TournamentsStore tournamentsStore, OverviewListingItemViewModel overviewListingItemViewModel)
|
||||||
{
|
{
|
||||||
WarningCloseCommand = new CloseModalCommand(modalNavigationStore);
|
WarningCloseCommand = new CloseModalCommand(modalNavigationStore);
|
||||||
DeleteCommand = new DeleteTournamentCommand(overviewListingItemViewModel, tournamentsStore, modalNavigationStore);
|
DeleteCommand = new DeleteTournamentCommand(this, overviewListingItemViewModel, tournamentsStore, modalNavigationStore);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:Apollon.WPF.Views.Components"
|
xmlns:local="clr-namespace:Apollon.WPF.Views.Components"
|
||||||
|
xmlns:custom="clr-namespace:LoadingSpinnerControl;assembly=LoadingSpinnerControl"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
@@ -133,6 +134,7 @@
|
|||||||
HorizontalAlignment="Center">
|
HorizontalAlignment="Center">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="35"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
@@ -150,7 +152,12 @@
|
|||||||
Width="120"
|
Width="120"
|
||||||
Height="35"
|
Height="35"
|
||||||
FontSize="16"
|
FontSize="16"
|
||||||
Grid.Column="1"/>
|
Grid.Column="2"/>
|
||||||
|
<custom:LoadingSpinner Grid.Column="1"
|
||||||
|
Diameter="25"
|
||||||
|
Thickness="2"
|
||||||
|
Color="{StaticResource BrushPrimary1}"
|
||||||
|
IsLoading="{Binding IsSubmitting}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -65,15 +65,11 @@
|
|||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Foreground="Red"/>
|
Foreground="Red"/>
|
||||||
</Button>
|
</Button>
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListView.ItemTemplate>
|
</ListView.ItemTemplate>
|
||||||
</ListView>
|
</ListView>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:Apollon.WPF.Views"
|
xmlns:local="clr-namespace:Apollon.WPF.Views"
|
||||||
xmlns:components="clr-namespace:Apollon.WPF.Views.Components"
|
xmlns:components="clr-namespace:Apollon.WPF.Views.Components"
|
||||||
|
xmlns:custom="clr-namespace:LoadingSpinnerControl;assembly=LoadingSpinnerControl"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="680" d:DesignWidth="1080"
|
d:DesignHeight="680" d:DesignWidth="1080"
|
||||||
Background="Transparent">
|
Background="Transparent">
|
||||||
@@ -18,20 +19,7 @@
|
|||||||
<ColumnDefinition Width="auto"/>
|
<ColumnDefinition Width="auto"/>
|
||||||
<ColumnDefinition Width="auto"/>
|
<ColumnDefinition Width="auto"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<!--<Border BorderThickness="4"
|
|
||||||
BorderBrush="#0000a0"
|
|
||||||
CornerRadius="5"
|
|
||||||
Grid.RowSpan="2"
|
|
||||||
Grid.ColumnSpan="3">
|
|
||||||
<Border.Background>
|
|
||||||
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
|
||||||
<GradientStop Color="{StaticResource ColorPrimary4}" Offset="0.2"/>
|
|
||||||
<GradientStop Color="{StaticResource ColorPrimary5}" Offset="0.8"/>
|
|
||||||
</LinearGradientBrush>
|
|
||||||
</Border.Background>
|
|
||||||
</Border>-->
|
|
||||||
|
|
||||||
<StackPanel Grid.ColumnSpan="3">
|
<StackPanel Grid.ColumnSpan="3">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
@@ -54,7 +42,7 @@
|
|||||||
FontSize="20"
|
FontSize="20"
|
||||||
Foreground="{StaticResource BrushPrimary1}">
|
Foreground="{StaticResource BrushPrimary1}">
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Grid.Row="2"
|
<StackPanel Grid.Row="2"
|
||||||
VerticalAlignment="Stretch">
|
VerticalAlignment="Stretch">
|
||||||
@@ -75,39 +63,75 @@
|
|||||||
Cursor="Hand"
|
Cursor="Hand"
|
||||||
Command="{Binding AddTournamentCommand}"/>
|
Command="{Binding AddTournamentCommand}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Grid.Column="1"
|
<Grid Grid.Column="1"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Margin="20">
|
Margin="20">
|
||||||
|
<StackPanel>
|
||||||
<TextBlock Margin="20"
|
|
||||||
|
<TextBlock Margin="20"
|
||||||
Text="Liste der erstellten Turniere"
|
Text="Liste der erstellten Turniere"
|
||||||
TextAlignment="Center"
|
TextAlignment="Center"
|
||||||
FontFamily="Arial"
|
FontFamily="Arial"
|
||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
FontSize="16"
|
FontSize="16"
|
||||||
Foreground="{StaticResource BrushPrimary1}"/>
|
Foreground="{StaticResource BrushPrimary1}"/>
|
||||||
|
|
||||||
<components:OverViewListing Height="400"
|
|
||||||
|
<components:OverViewListing Height="400"
|
||||||
Width="400"
|
Width="400"
|
||||||
DataContext="{Binding OverviewListingViewModel}"/>
|
DataContext="{Binding OverviewListingViewModel}"/>
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel Grid.Column="2"
|
</StackPanel>
|
||||||
|
<StackPanel VerticalAlignment="Center">
|
||||||
|
<StackPanel.Style>
|
||||||
|
<Style TargetType="StackPanel">
|
||||||
|
<Setter Property="Visibility" Value="Collapsed"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding IsLoading}" Value="true">
|
||||||
|
<Setter Property="Visibility" Value="Visible"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</StackPanel.Style>
|
||||||
|
<TextBlock Text="Daten werden geladen...."
|
||||||
|
TextAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Foreground="{StaticResource BrushPrimary1}"
|
||||||
|
Margin="0 0 0 30"
|
||||||
|
FontSize="14">
|
||||||
|
</TextBlock>
|
||||||
|
<custom:LoadingSpinner Diameter="50" IsLoading="True" Thickness="3" Color="{StaticResource BrushPrimary1}"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Grid Grid.Column="2"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
VerticalAlignment="Center">
|
VerticalAlignment="Center">
|
||||||
|
<Grid.Style>
|
||||||
<TextBlock Margin="20"
|
<Style TargetType="Grid">
|
||||||
|
<Setter Property="Visibility" Value="Hidden"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding IsLoading}" Value="false">
|
||||||
|
<Setter Property="Visibility" Value="Visible"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Grid.Style>
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock Margin="20"
|
||||||
Text="Turnieredetails"
|
Text="Turnieredetails"
|
||||||
TextAlignment="Center"
|
TextAlignment="Center"
|
||||||
FontFamily="Arial"
|
FontFamily="Arial"
|
||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
FontSize="16"
|
FontSize="16"
|
||||||
Foreground="{StaticResource BrushPrimary1}"/>
|
Foreground="{StaticResource BrushPrimary1}"/>
|
||||||
<components:OverviewDetails Width="320"
|
|
||||||
|
<components:OverviewDetails Width="320"
|
||||||
DataContext="{Binding OverviewDetailsViewModel}"/>
|
DataContext="{Binding OverviewDetailsViewModel}"/>
|
||||||
|
|
||||||
<Button Style="{StaticResource ModernButton}"
|
<Button Style="{StaticResource ModernButton}"
|
||||||
Content="Namensliste"
|
Content="Namensliste"
|
||||||
FontSize="16"
|
FontSize="16"
|
||||||
Height="40"
|
Height="40"
|
||||||
@@ -115,7 +139,9 @@
|
|||||||
Margin="40"
|
Margin="40"
|
||||||
Cursor="Hand"
|
Cursor="Hand"
|
||||||
Command="{Binding NavigateNavBarCommand}"/>
|
Command="{Binding NavigateNavBarCommand}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:Apollon.WPF.Views"
|
xmlns:local="clr-namespace:Apollon.WPF.Views"
|
||||||
|
xmlns:custom="clr-namespace:LoadingSpinnerControl;assembly=LoadingSpinnerControl"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
<Grid>
|
<Grid>
|
||||||
@@ -25,6 +26,7 @@
|
|||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
|
<ColumnDefinition Width="35"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button Grid.Column="0"
|
<Button Grid.Column="0"
|
||||||
@@ -36,13 +38,18 @@
|
|||||||
FontSize="14"
|
FontSize="14"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Button Grid.Column="1"
|
<Button Grid.Column="2"
|
||||||
Content="Abbrechen"
|
Content="Abbrechen"
|
||||||
Command="{Binding WarningCloseCommand}"
|
Command="{Binding WarningCloseCommand}"
|
||||||
Style="{StaticResource ModernButton}"
|
Style="{StaticResource ModernButton}"
|
||||||
Width="100"
|
Width="100"
|
||||||
Height="30"
|
Height="30"
|
||||||
FontSize="14"/>
|
FontSize="14"/>
|
||||||
|
<custom:LoadingSpinner Grid.Column="1"
|
||||||
|
Diameter="25"
|
||||||
|
Thickness="2"
|
||||||
|
Color="{StaticResource BrushPrimary1}"
|
||||||
|
IsLoading="{Binding IsDeleting}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
Reference in New Issue
Block a user