select logo
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Apollon.Domain.Models;
|
||||
using Apollon.WPF.Commands;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -15,7 +16,20 @@ namespace Apollon.WPF.ViewModels
|
||||
{
|
||||
public class AddEditDetailsViewModel : ViewModelBase
|
||||
{
|
||||
|
||||
private string logo;
|
||||
public string Logo
|
||||
{
|
||||
get
|
||||
{
|
||||
return logo;
|
||||
}
|
||||
set
|
||||
{
|
||||
logo = value;
|
||||
OnPropertyChanged(nameof(Logo));
|
||||
}
|
||||
}
|
||||
|
||||
private string _organisation;
|
||||
public string Organisation
|
||||
{
|
||||
@@ -183,13 +197,16 @@ namespace Apollon.WPF.ViewModels
|
||||
|
||||
public ICommand SubmitCommand { get; }
|
||||
public ICommand CancelCommand { get; }
|
||||
public ICommand ChooseLogoCommand { get; }
|
||||
|
||||
public ObservableCollection<Competition> CompetitionList { get; set; }
|
||||
|
||||
public AddEditDetailsViewModel(ICommand submitCommand, ICommand cancelCommand)
|
||||
public ObservableCollection<Competition> CompetitionList { get; }
|
||||
|
||||
|
||||
public AddEditDetailsViewModel(ICommand submitCommand, ICommand cancelCommand)
|
||||
{
|
||||
SubmitCommand = submitCommand;
|
||||
CancelCommand = cancelCommand;
|
||||
ChooseLogoCommand = new ChooseLogoCommand(this);
|
||||
|
||||
CompetitionList = new ObservableCollection<Competition>
|
||||
{
|
||||
@@ -214,9 +231,7 @@ namespace Apollon.WPF.ViewModels
|
||||
CompetitionName = "3D",
|
||||
CompetitionImage = @"\Images\3d.png"
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ 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 Organisation => SelectedTournament?.Organisation ?? "keine Organisation";
|
||||
public string TournamentName => SelectedTournament?.TournamentName ?? "kein Name";
|
||||
public string Competition => SelectedTournament?.Competition ?? "keine Kategorie";
|
||||
@@ -47,6 +48,7 @@ namespace Apollon.WPF.ViewModels
|
||||
private void SelectedTournamentStore_SelectedTournamentChanged()
|
||||
{
|
||||
OnPropertyChanged(nameof(HasSelectedTournament));
|
||||
OnPropertyChanged(nameof(Logo));
|
||||
OnPropertyChanged(nameof(Organisation));
|
||||
OnPropertyChanged(nameof(TournamentName));
|
||||
OnPropertyChanged(nameof(Competition));
|
||||
|
||||
@@ -18,6 +18,7 @@ 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 Organisation => SelectedTournament?.Organisation ?? "keine Organisation";
|
||||
public string TournamentName => SelectedTournament?.TournamentName ?? "kein Name";
|
||||
public string Competition => SelectedTournament?.Competition ?? "keine Kategorie";
|
||||
|
||||
Reference in New Issue
Block a user