Places (Windows only currently)

This commit is contained in:
2022-05-27 22:27:53 +02:00
parent 96158160bd
commit 03c8e3a36b
7 changed files with 111 additions and 35 deletions

View File

@@ -12,4 +12,5 @@ public interface IGuiAppState : IAppState
string? MessageBoxText { get; set; }
List<CommandBindingConfiguration> PossibleCommands { get; set; }
BindedCollection<RootDriveInfo, string> RootDriveInfos { get; set; }
IReadOnlyList<PlaceInfo> Places { get; set; }
}

View File

@@ -0,0 +1,20 @@
using FileTime.Core.Models;
using FileTime.GuiApp.Models;
namespace FileTime.GuiApp.ViewModels;
public class PlaceInfo : IHaveFullPath
{
public IContainer Container { get; }
public string DisplayName { get; }
public PlaceInfo(IContainer container, string displayName)
{
if (container.FullName is null) throw new ArgumentNullException($"{nameof(container.FullName)} of container can not be null");
Container = container;
DisplayName = displayName;
}
public FullName Path => Container.FullName!;
}