Console Binary file preview

This commit is contained in:
2023-08-20 07:37:28 +02:00
parent 570ecd3f83
commit 845a37050f
23 changed files with 391 additions and 23 deletions

View File

@@ -4,4 +4,6 @@ public class ConsoleApplicationConfiguration
{
public string? ConsoleDriver { get; set; }
public bool DisableUtf8 { get; set; }
public string? ClipboardSingleIcon { get; set; }
public string? ClipboardMultipleIcon { get; set; }
}

View File

@@ -1,5 +1,6 @@
using System.Collections.ObjectModel;
using FileTime.App.Core.ViewModels;
using FileTime.ConsoleUI.App.Preview;
namespace FileTime.ConsoleUI.App;
@@ -7,4 +8,5 @@ public interface IConsoleAppState : IAppState
{
string ErrorText { get; set; }
ObservableCollection<string> PopupTexts { get; }
ItemPreviewType? PreviewType { get; set; }
}

View File

@@ -22,5 +22,6 @@ public interface IRootViewModel
IDeclarativeProperty<VolumeSizeInfo?> VolumeSizeInfo { get; }
IFrequencyNavigationViewModel FrequencyNavigation { get; }
IItemPreviewService ItemPreviewService { get; }
IClipboardService ClipboardService { get; }
event Action<IInputElement>? FocusReadInputElement;
}

View File

@@ -0,0 +1,7 @@
namespace FileTime.ConsoleUI.App.Preview;
public enum ItemPreviewType
{
Text,
Binary
}

View File

@@ -0,0 +1,17 @@
using FileTime.App.Core.UserCommand;
namespace FileTime.ConsoleUI.App.UserCommand;
public class NextPreviewUserCommand : IIdentifiableUserCommand
{
public const string CommandId = "console_next_preview";
public static NextPreviewUserCommand Instance = new();
private NextPreviewUserCommand()
{
}
public string UserCommandID => CommandId;
public string Title => "Next preview";
}

View File

@@ -0,0 +1,17 @@
using FileTime.App.Core.UserCommand;
namespace FileTime.ConsoleUI.App.UserCommand;
public class PreviousPreviewUserCommand : IIdentifiableUserCommand
{
public const string CommandId = "console_previous_preview";
public static PreviousPreviewUserCommand Instance = new();
private PreviousPreviewUserCommand()
{
}
public string UserCommandID => CommandId;
public string Title => "Previous preview";
}