Namelist to navbar

This commit is contained in:
Natlinux
2023-02-04 19:00:42 +01:00
parent b6a427ca29
commit 7ac59d15b3
12 changed files with 61 additions and 35 deletions

View File

@@ -134,16 +134,16 @@ namespace Apollon.WPF.ViewModels
}
}
private int _rounds;
private int _groups;
public int Groups
{
get
{
return _rounds;
return _groups;
}
set
{
_rounds = value;
_groups = value;
OnPropertyChanged(nameof(Groups));
}
}

View File

@@ -78,8 +78,8 @@ namespace Apollon.WPF.ViewModels
}
}
private string _birthday;
public string Birthday
private DateTime _birthday;
public DateTime Birthday
{
get
{
@@ -119,5 +119,19 @@ namespace Apollon.WPF.ViewModels
OnPropertyChanged(nameof(Qualification));
}
}
private bool _isreadOnly;
public bool IsReadOnly
{
get
{
return _isreadOnly;
}
set
{
_isreadOnly = value;
OnPropertyChanged(nameof(IsReadOnly));
}
}
}
}

View File

@@ -14,14 +14,19 @@ namespace Apollon.WPF.ViewModels
public ICommand NavigateOverviewCommand { get; }
public ICommand NavigateGroupsCommand { get;}
public ICommand NavigateClassesCommand { get;}
public ICommand NavigateNamelistCommand { get;}
public ICommand NavigateArchersCommand { get;}
public NavBarPreparationViewModel(NavigationService<OverviewViewModel> overviewNavigationService, NavigationService<GroupsViewModel> groupNavigationService,
NavigationService<ClassesViewModel> classNavigationService, NavigationService<ArchersViewModel> archersNavigationService)
public NavBarPreparationViewModel(NavigationService<OverviewViewModel> overviewNavigationService,
NavigationService<GroupsViewModel> groupNavigationService,
NavigationService<NameListViewModel> namelistNavigationService,
NavigationService<ClassesViewModel> classNavigationService,
NavigationService<ArchersViewModel> archersNavigationService)
{
NavigateOverviewCommand = new NavigateCommand<OverviewViewModel>(overviewNavigationService);
NavigateGroupsCommand = new NavigateCommand<GroupsViewModel>(groupNavigationService);
NavigateClassesCommand = new NavigateCommand<ClassesViewModel>(classNavigationService);
NavigateNamelistCommand = new NavigateCommand<NameListViewModel>(namelistNavigationService);
NavigateArchersCommand = new NavigateCommand<ArchersViewModel>(archersNavigationService);
}
}

View File

@@ -2,11 +2,6 @@
using Apollon.WPF.Commands;
using Apollon.WPF.Services;
using Apollon.WPF.Stores;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
namespace Apollon.WPF.ViewModels
@@ -17,11 +12,11 @@ namespace Apollon.WPF.ViewModels
private Tournament SelectedTournament => _selectedTournamentStore.SelectedTournament;
public bool HasSelectedTournament => SelectedTournament != null;
public string Logo => SelectedTournament?.Logo ?? "D:\\Projekte\\Apollon\\Apollon\\Apollon.WPF\\Images\\Archery.png";
public string Logo => SelectedTournament?.Logo ?? @"\images\Archery.png";
public string Organisation => SelectedTournament?.Organisation ?? "keine Organisation";
public string TournamentName => SelectedTournament?.TournamentName ?? "kein Name";
public string Competition => SelectedTournament?.Competition ?? "keine Kategorie";
public string CompetitionImage => SelectedTournament?.CompetitionImage ?? "D:\\Projekte\\Apollon\\Apollon\\Apollon.WPF\\Images\\Archery.png";
public string CompetitionImage => SelectedTournament?.CompetitionImage ?? @"\images\Archery.png";
public string StartDate => SelectedTournament?.StartDate.ToString("d") ?? "kein Datum";
public string EndDate => SelectedTournament?.EndDate.ToString("d") ?? "kein Datum";
public string Location => SelectedTournament?.Location ?? "kein Ort";

View File

@@ -16,11 +16,11 @@ namespace Apollon.WPF.ViewModels
private Tournament SelectedTournament => _selectedTournamentsStore.SelectedTournament;
public bool HasSelectedTournament => SelectedTournament != null;
public string Logo => SelectedTournament?.Logo ?? "D:\\Projekte\\Apollon\\Apollon\\Apollon.WPF\\Images\\Archery.png";
public string Logo => SelectedTournament?.Logo ?? @"\images\Archery.png";
public string Organisation => SelectedTournament?.Organisation ?? "keine Organisation";
public string TournamentName => SelectedTournament?.TournamentName ?? "kein Name";
public string Competition => SelectedTournament?.Competition ?? "keine Kategorie";
public string CompetitionImage => SelectedTournament?.CompetitionImage ?? "D:\\Projekte\\Apollon\\Apollon\\Apollon.WPF\\Images\\Archery.png";
public string CompetitionImage => SelectedTournament?.CompetitionImage ?? @"\images\Archery.png";
public string StartDate => SelectedTournament?.StartDate.ToString("d") ?? "kein Datum";
public string EndDate => SelectedTournament?.EndDate.ToString("d") ?? "kein Datum";
public string Location => SelectedTournament?.Location ?? "kein Ort";