Multi instance, tab handling
This commit is contained in:
@@ -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);
|
||||
@@ -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";
|
||||
}
|
||||
@@ -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";
|
||||
}
|
||||
@@ -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";
|
||||
}
|
||||
Reference in New Issue
Block a user