MainWindow skeleton

This commit is contained in:
2022-04-03 09:22:24 +02:00
parent 7ff3898bd9
commit b6b8a7b3f8
28 changed files with 432 additions and 105 deletions

View File

@@ -1,3 +1,5 @@
using System.Reactive.Linq;
using System.Reactive.Subjects;
using FileTime.Core.Enums;
using FileTime.Core.Models;
@@ -5,9 +7,9 @@ namespace FileTime.Core.Services
{
public abstract class ContentProviderBase : IContentProvider
{
protected List<IAbsolutePath> Items { get; set; } = new List<IAbsolutePath>();
protected BehaviorSubject<IReadOnlyList<IAbsolutePath>> Items { get; } = new BehaviorSubject<IReadOnlyList<IAbsolutePath>>(new List<IAbsolutePath>());
IReadOnlyList<IAbsolutePath> IContainer.Items => Items;
IObservable<IReadOnlyList<IAbsolutePath>> IContainer.Items => Items;
public string Name { get; }
@@ -33,6 +35,10 @@ namespace FileTime.Core.Services
public string? Attributes => null;
protected BehaviorSubject<bool> IsLoading { get; } = new(false);
IObservable<bool> IContainer.IsLoading => IsLoading.AsObservable();
protected ContentProviderBase(string name)
{
DisplayName = Name = name;