Started UI Rework for target game setup, started adding a Game master record and a CSV Loader service
This commit is contained in:
		@@ -3,6 +3,8 @@ using System.Reactive.Disposables;
 | 
			
		||||
using System.Reactive.Linq;
 | 
			
		||||
using ReactiveUI;
 | 
			
		||||
using ReactiveUI.SourceGenerators;
 | 
			
		||||
using Splat;
 | 
			
		||||
using StarsAssistant.Model;
 | 
			
		||||
 | 
			
		||||
namespace StarsAssistant.ViewModels;
 | 
			
		||||
 | 
			
		||||
@@ -11,13 +13,13 @@ public partial class MainWindowViewModel : ViewModelBase, IActivatableViewModel
 | 
			
		||||
    public ViewModelActivator Activator { get; } = new ViewModelActivator();
 | 
			
		||||
 | 
			
		||||
    [ObservableAsProperty]
 | 
			
		||||
    private string _welcomeMessage;
 | 
			
		||||
    private string _dbPath = "";
 | 
			
		||||
 | 
			
		||||
    public MainWindowViewModel()
 | 
			
		||||
    {
 | 
			
		||||
        _welcomeMessage = "Lorem Ipsum";
 | 
			
		||||
        _welcomeMessageHelper = Observable.Return("Dolor sit amet")
 | 
			
		||||
            .ToProperty(this, x => x.WelcomeMessage);
 | 
			
		||||
        using var db = Locator.Current.GetService<StarsDatabase>()!;
 | 
			
		||||
        _dbPathHelper = Observable.Return(Path.GetFullPath(db.DbPath))
 | 
			
		||||
            .ToProperty(this, x => x.DbPath);
 | 
			
		||||
 | 
			
		||||
        this.WhenActivated((CompositeDisposable disposables) => 
 | 
			
		||||
        {
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,8 @@ namespace StarsAssistant.ViewModels;
 | 
			
		||||
 | 
			
		||||
public partial class PlanetViewModel(Planet planet) : ViewModelBase
 | 
			
		||||
{
 | 
			
		||||
    public static ObservableCollection<PlanetViewModel> LoadAll() {
 | 
			
		||||
    public static ObservableCollection<PlanetViewModel>  LoadAll() 
 | 
			
		||||
    {
 | 
			
		||||
        using var db = Locator.Current.GetService<StarsDatabase>()!;
 | 
			
		||||
        var result = new ObservableCollection<PlanetViewModel>();
 | 
			
		||||
        foreach (Planet planet in db.Planet.Where(p => p.OwnerId == "Atlantis").ToList())
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user