Team Registration view v1

This commit is contained in:
2026-05-06 09:02:00 +02:00
parent 1e25ca809b
commit a14cc8a0d9
12 changed files with 1120 additions and 25 deletions
@@ -1,9 +1,41 @@
using CommunityToolkit.Mvvm.ComponentModel;
namespace TournamentOrganizer.ViewModels;
public partial class MainViewModel : ViewModelBase
{
[ObservableProperty]
private string _greeting = "Welcome to Avalonia!";
}
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
namespace TournamentOrganizer.ViewModels;
public partial class MainViewModel : ViewModelBase
{
[ObservableProperty]
private ViewModelBase _currentView;
[ObservableProperty]
private string _title = "Tournament Organizer";
public MainViewModel()
{
CurrentView = new HomeViewModel();
}
[RelayCommand]
private void NavigateToHome()
{
CurrentView = new HomeViewModel();
Title = "Tournament Organizer";
}
[RelayCommand]
private async Task NavigateToTeams()
{
var teamsVm = new TeamsViewModel();
CurrentView = teamsVm;
Title = "Teams Management";
await teamsVm.LoadTeams();
}
}
public partial class HomeViewModel : ViewModelBase
{
[ObservableProperty]
private string _welcomeMessage = "Welcome to Tournament Organizer!";
}