ConsoleUI container size text

This commit is contained in:
2023-08-16 12:00:07 +02:00
parent e35702c8e6
commit cbbf7b3704
27 changed files with 191 additions and 46 deletions

View File

@@ -28,6 +28,7 @@
xmlns:interactions="using:FileTime.Core.Interactions"
xmlns:itemPreview="clr-namespace:FileTime.App.Core.ViewModels.ItemPreview;assembly=FileTime.App.Core"
xmlns:local="using:FileTime.GuiApp.App.Views"
xmlns:local1="clr-namespace:FileTime.Providers.Local;assembly=FileTime.Providers.Local.Abstractions"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:sizePreview="clr-namespace:FileTime.App.ContainerSizeScanner;assembly=FileTime.App.ContainerSizeScanner"
xmlns:vm="using:FileTime.GuiApp.App.ViewModels"
@@ -108,7 +109,7 @@
<ItemsRepeater Grid.Row="1" ItemsSource="{Binding AppState.RootDriveInfos}">
<ItemsRepeater.ItemTemplate>
<DataTemplate x:DataType="vm:RootDriveInfo">
<DataTemplate x:DataType="local1:RootDriveInfo">
<Grid
Classes="SidebarContainerPresenter"
Cursor="Hand"

View File

@@ -10,6 +10,7 @@ using FileTime.Core.Models;
using FileTime.GuiApp.App.Models;
using FileTime.GuiApp.App.Services;
using FileTime.GuiApp.App.ViewModels;
using FileTime.Providers.Local;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
@@ -117,14 +118,18 @@ public partial class MainWindow : Window, IUiAccessor
&& sender is StyledElement control)
{
FullName? path = null;
if (control.DataContext is IHaveFullPath {Path: { }} hasFullPath)
{
path = hasFullPath.Path;
}
else if (control.DataContext is FullName p)
if (control.DataContext is FullName p)
{
path = p;
}
else if (control.DataContext is RootDriveInfo {Path: { } rootDriveInfoPath})
{
path = rootDriveInfoPath;
}
else if (control.DataContext is PlaceInfo {Path: { } placeInfoPath})
{
path = placeInfoPath;
}
/*else if (control.DataContext is IElement element && element.GetParent() is IContainer parentContainer)
{
Task.Run(async () =>