finish addedit
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace Apollon.WPF.ViewModels
|
||||
@@ -56,13 +57,13 @@ namespace Apollon.WPF.ViewModels
|
||||
public string CompetitionImage
|
||||
{
|
||||
get
|
||||
{
|
||||
{
|
||||
return _competitionImage;
|
||||
}
|
||||
set
|
||||
{
|
||||
_competitionImage = value;
|
||||
OnPropertyChanged(nameof(CompetitionImage));
|
||||
OnPropertyChanged(nameof(CompetitionImage));;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@ namespace Apollon.WPF.ViewModels
|
||||
{
|
||||
public AddEditDetailsViewModel AddEditDetailsViewModel { get; }
|
||||
|
||||
public AddTournamentViewModel(TournamentsStore tournamentStore, ModalNavigationStore modalNavigationStore, NavigationStore navigationStore)
|
||||
public AddTournamentViewModel(TournamentsStore tournamentStore, ModalNavigationStore modalNavigationStore, NavigationStore navigationStore,SelectedTournamentsStore selectedTournamentsStore)
|
||||
{
|
||||
ICommand submitCommand = new AddTournamentCommand(this, tournamentStore,modalNavigationStore,navigationStore);
|
||||
ICommand submitCommand = new AddTournamentCommand(this, tournamentStore,modalNavigationStore,navigationStore, selectedTournamentsStore);
|
||||
ICommand cancelCommand = new CloseModalCommand(modalNavigationStore);
|
||||
AddEditDetailsViewModel = new AddEditDetailsViewModel(submitCommand, cancelCommand);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,8 @@ namespace Apollon.WPF.ViewModels
|
||||
{
|
||||
Organisation = tournament.Organisation,
|
||||
TournamentName = tournament.TournamentName,
|
||||
Competition = tournament.Competition,
|
||||
Competition = tournament.Competition,
|
||||
CompetitionImage = tournament.CompetitionImage,
|
||||
StartDate = tournament.StartDate,
|
||||
EndDate = tournament.EndDate,
|
||||
Location = tournament.Location,
|
||||
|
||||
@@ -1,16 +1,23 @@
|
||||
using Apollon.WPF.Stores;
|
||||
using Apollon.WPF.Commands;
|
||||
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
|
||||
{
|
||||
public class NavBarViewModel : ViewModelBase
|
||||
|
||||
{
|
||||
public NavBarViewModel(NavigationStore navigationStore)
|
||||
|
||||
public ICommand NavigateOverviewCommand { get; }
|
||||
public NavBarViewModel(NavigationStore navigationStore, SelectedTournamentsStore selectedTournamentsStore, ModalNavigationStore modalNavigationStore, TournamentsStore tournamentsStore)
|
||||
{
|
||||
NavigateOverviewCommand = new NavigateCommand<OverviewViewModel>(navigationStore, () => new OverviewViewModel(tournamentsStore, selectedTournamentsStore, modalNavigationStore,navigationStore));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Apollon.WPF.ViewModels
|
||||
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 ?? "kein Bild";
|
||||
public string CompetitionImage => SelectedTournament?.CompetitionImage ?? "D:\\Projekte\\Apollon\\Apollon\\Apollon.WPF\\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";
|
||||
|
||||
@@ -57,8 +57,8 @@ namespace Apollon.WPF.ViewModels
|
||||
OverviewDetailsViewModel = new OverviewDetailsViewModel(selectedTournamentStore);
|
||||
|
||||
LoadTournamentsCommand = new LoadTournamentsCommand(this, tournamentStore);
|
||||
AddTournamentCommand = new OpenAddTournamentCommand(tournamentStore, modalNavigationStore, navigationStore);
|
||||
NavigateNavBarCommand = new NavigateCommand<NavBarViewModel>(navigationStore, () => new NavBarViewModel(navigationStore));
|
||||
AddTournamentCommand = new OpenAddTournamentCommand(tournamentStore, modalNavigationStore, navigationStore, selectedTournamentStore);
|
||||
NavigateNavBarCommand = new NavigateCommand<NavBarViewModel>(navigationStore, () => new NavBarViewModel(navigationStore,selectedTournamentStore,modalNavigationStore,tournamentStore));
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user