Initial commit

This commit is contained in:
2026-08-22 19:11:00 +03:00 Unverified
commit db368674d4
74 changed files with 2739 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using WinWARP.Core.Services;
namespace WinWARP.Core.ViewModels;
public partial class MainViewModel : ObservableObject
{
private readonly INavigationService _navigationService;
public MainViewModel(INavigationService navigationService)
{
_navigationService = navigationService;
}
[ObservableProperty]
public partial string Title { get; set; } = "WinWARP";
[ObservableProperty]
public partial Type CurrentViewModelType { get; set; }
[RelayCommand]
private void Navigate(object? tagParameter)
{
if (tagParameter is Type viewModelType)
{
var method = _navigationService.GetType().GetMethod("NavigateTo")?.MakeGenericMethod(viewModelType);
method?.Invoke(_navigationService, [null]);
}
}
}