Multi instance, tab handling

This commit is contained in:
2023-08-29 18:03:22 +02:00
parent 85488c293d
commit 28640e5dd2
33 changed files with 1430 additions and 436 deletions

View File

@@ -0,0 +1,7 @@
using FileTime.Core.Models;
namespace FileTime.App.Core.Models;
public record TabToOpen(int? TabNumber, NativePath Path);
public record TabsToOpenOnStart(List<TabToOpen> TabsToOpen);

View File

@@ -0,0 +1,27 @@
using FileTime.Core.Models;
namespace FileTime.App.Core.UserCommand;
public class NewTabCommand : IUserCommand
{
public NewTabCommand(FullName? path)
{
Path = path;
}
public FullName? Path { get; }
public bool Open { get; init; } = true;
}
public class IdentifiableNewTabCommand : NewTabCommand, IIdentifiableUserCommand
{
public const string CommandName = "new_tab";
public static IdentifiableNewTabCommand Instance { get; } = new();
private IdentifiableNewTabCommand():base(null)
{
}
public string UserCommandID => CommandName;
public string Title => "New tab";
}

View File

@@ -0,0 +1,15 @@
namespace FileTime.App.Core.UserCommand;
public class SelectNextTabCommand : IIdentifiableUserCommand
{
public const string CommandName = "next_tab";
public static SelectNextTabCommand Instance { get; } = new();
private SelectNextTabCommand()
{
}
public string UserCommandID => CommandName;
public string Title => "Next tab";
}

View File

@@ -0,0 +1,15 @@
namespace FileTime.App.Core.UserCommand;
public class SelectPreviousTabCommand : IIdentifiableUserCommand
{
public const string CommandName = "previous_tab";
public static SelectPreviousTabCommand Instance { get; } = new();
private SelectPreviousTabCommand()
{
}
public string UserCommandID => CommandName;
public string Title => "New tab";
}