Ready for Commands
This commit is contained in:
@@ -20,6 +20,9 @@
|
|||||||
<DataTemplate DataType="{x:Type vms:AddTournametViewModel}">
|
<DataTemplate DataType="{x:Type vms:AddTournametViewModel}">
|
||||||
<views:AddTournamentView/>
|
<views:AddTournamentView/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type vms:EditTournamentViewModel}">
|
||||||
|
<views:EditTournamentView/>
|
||||||
|
</DataTemplate>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
<ScrollViewer HorizontalScrollBarVisibility="Auto"
|
<ScrollViewer HorizontalScrollBarVisibility="Auto"
|
||||||
VerticalScrollBarVisibility="Auto">
|
VerticalScrollBarVisibility="Auto">
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ namespace Apollon.WPF.ViewModels
|
|||||||
}
|
}
|
||||||
|
|
||||||
private string _tournamentname;
|
private string _tournamentname;
|
||||||
public string Tounamentname
|
public string Tournamentname
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@@ -33,7 +33,7 @@ namespace Apollon.WPF.ViewModels
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
_tournamentname = value;
|
_tournamentname = value;
|
||||||
OnPropertyChanged(nameof(Tounamentname));
|
OnPropertyChanged(nameof(Tournamentname));
|
||||||
OnPropertyChanged(nameof(CanSubmit));
|
OnPropertyChanged(nameof(CanSubmit));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -94,9 +94,9 @@ namespace Apollon.WPF.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool CanSubmit => !string.IsNullOrEmpty(Tounamentname);
|
public bool CanSubmit => !string.IsNullOrEmpty(Tournamentname);
|
||||||
public ICommand SubmitCommand { get; }
|
public ICommand SubmitCommand { get; }
|
||||||
public ICommand CancleCommand { get; }
|
public ICommand CancelCommand { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
17
Apollon.WPF/ViewModels/EditTournamentViewModel.cs
Normal file
17
Apollon.WPF/ViewModels/EditTournamentViewModel.cs
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Apollon.WPF.ViewModels
|
||||||
|
{
|
||||||
|
public class EditTournamentViewModel : ViewModelBase
|
||||||
|
{
|
||||||
|
public AddEditDetailsViewModel AddEditDetailsViewModel { get; }
|
||||||
|
public EditTournamentViewModel()
|
||||||
|
{
|
||||||
|
AddEditDetailsViewModel = new AddEditDetailsViewModel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -21,8 +21,6 @@ namespace Apollon.WPF.ViewModels
|
|||||||
OverviewViewModel = overviewViewModel;
|
OverviewViewModel = overviewViewModel;
|
||||||
|
|
||||||
_modalNavigationStore.CurrentViewModelChanged += ModalNavigationStore_CurrentViewModelChanged;
|
_modalNavigationStore.CurrentViewModelChanged += ModalNavigationStore_CurrentViewModelChanged;
|
||||||
|
|
||||||
//_modalNavigationStore.CurrentViewModel = new AddTournametViewModel();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose()
|
protected override void Dispose()
|
||||||
|
|||||||
Reference in New Issue
Block a user