File scoped namespace
This commit is contained in:
@@ -1,2 +1,4 @@
|
|||||||
[*.cs]
|
[*.cs]
|
||||||
dotnet_diagnostic.RCS1196.severity = none
|
dotnet_diagnostic.RCS1196.severity = none
|
||||||
|
csharp_style_namespace_declarations = file_scoped:error
|
||||||
|
dotnet_diagnostic.IDE0161.severity = error
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
namespace FileTime.App.Core.Command
|
namespace FileTime.App.Core.Command;
|
||||||
{
|
|
||||||
public enum Commands
|
public enum Commands
|
||||||
{
|
{
|
||||||
None,
|
None,
|
||||||
@@ -63,4 +63,3 @@ namespace FileTime.App.Core.Command
|
|||||||
ToggleAdvancedIcons,
|
ToggleAdvancedIcons,
|
||||||
ToggleHidden,
|
ToggleHidden,
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -6,6 +6,10 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="System.Reactive" Version="5.0.0" />
|
<PackageReference Include="System.Reactive" Version="5.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using DynamicData;
|
using DynamicData;
|
||||||
|
|
||||||
namespace FileTime.App.Core.Models
|
namespace FileTime.App.Core.Models;
|
||||||
{
|
|
||||||
public class BindedCollection<T> : IDisposable
|
public class BindedCollection<T> : IDisposable
|
||||||
{
|
{
|
||||||
private readonly IDisposable _disposable;
|
private readonly IDisposable _disposable;
|
||||||
@@ -23,4 +23,3 @@ namespace FileTime.App.Core.Models
|
|||||||
GC.SuppressFinalize(this);
|
GC.SuppressFinalize(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
namespace FileTime.App.Core.Models.Enums
|
namespace FileTime.App.Core.Models.Enums;
|
||||||
{
|
|
||||||
public enum ItemAttributeType
|
public enum ItemAttributeType
|
||||||
{
|
{
|
||||||
File,
|
File,
|
||||||
@@ -7,4 +7,3 @@ namespace FileTime.App.Core.Models.Enums
|
|||||||
Container,
|
Container,
|
||||||
SizeContainer
|
SizeContainer
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
namespace FileTime.App.Core.Models.Enums
|
namespace FileTime.App.Core.Models.Enums;
|
||||||
{
|
|
||||||
public enum ItemViewMode
|
public enum ItemViewMode
|
||||||
{
|
{
|
||||||
Default,
|
Default,
|
||||||
@@ -9,4 +9,3 @@ namespace FileTime.App.Core.Models.Enums
|
|||||||
MarkedSelected,
|
MarkedSelected,
|
||||||
MarkedAlternative
|
MarkedAlternative
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
namespace FileTime.App.Core.Models.Enums
|
namespace FileTime.App.Core.Models.Enums;
|
||||||
{
|
|
||||||
public enum ViewMode
|
public enum ViewMode
|
||||||
{
|
{
|
||||||
Default,
|
Default,
|
||||||
RapidTravel
|
RapidTravel
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
namespace FileTime.App.Core.Models
|
namespace FileTime.App.Core.Models;
|
||||||
{
|
|
||||||
public class ItemNamePart
|
public class ItemNamePart
|
||||||
{
|
{
|
||||||
public string Text { get; set; }
|
public string Text { get; set; }
|
||||||
@@ -11,4 +11,3 @@ namespace FileTime.App.Core.Models
|
|||||||
IsSpecial = isSpecial;
|
IsSpecial = isSpecial;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using FileTime.Core.Command;
|
using FileTime.Core.Command;
|
||||||
using FileTime.Core.Models;
|
using FileTime.Core.Models;
|
||||||
|
|
||||||
namespace FileTime.App.Core.Services
|
namespace FileTime.App.Core.Services;
|
||||||
{
|
|
||||||
public interface IClipboardService
|
public interface IClipboardService
|
||||||
{
|
{
|
||||||
Type? CommandType { get; }
|
Type? CommandType { get; }
|
||||||
@@ -13,4 +13,3 @@ namespace FileTime.App.Core.Services
|
|||||||
void Clear();
|
void Clear();
|
||||||
void SetCommand<T>() where T : ITransportationCommand;
|
void SetCommand<T>() where T : ITransportationCommand;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
using FileTime.App.Core.Command;
|
using FileTime.App.Core.Command;
|
||||||
|
|
||||||
namespace FileTime.App.Core.Services
|
namespace FileTime.App.Core.Services;
|
||||||
{
|
|
||||||
public interface ICommandHandler
|
public interface ICommandHandler
|
||||||
{
|
{
|
||||||
bool CanHandleCommand(Commands command);
|
bool CanHandleCommand(Commands command);
|
||||||
Task HandleCommandAsync(Commands command);
|
Task HandleCommandAsync(Commands command);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
using FileTime.App.Core.Command;
|
using FileTime.App.Core.Command;
|
||||||
|
|
||||||
namespace FileTime.App.Core.Services
|
namespace FileTime.App.Core.Services;
|
||||||
{
|
|
||||||
public interface ICommandHandlerService
|
public interface ICommandHandlerService
|
||||||
{
|
{
|
||||||
Task HandleCommandAsync(Commands command);
|
Task HandleCommandAsync(Commands command);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
using FileTime.App.Core.Models;
|
using FileTime.App.Core.Models;
|
||||||
|
|
||||||
namespace FileTime.App.Core.Services
|
namespace FileTime.App.Core.Services;
|
||||||
{
|
|
||||||
public interface IItemNameConverterService
|
public interface IItemNameConverterService
|
||||||
{
|
{
|
||||||
List<ItemNamePart> GetDisplayName(string name, string? searchText);
|
List<ItemNamePart> GetDisplayName(string name, string? searchText);
|
||||||
string GetFileExtension(string fullName);
|
string GetFileExtension(string fullName);
|
||||||
string GetFileName(string fullName);
|
string GetFileName(string fullName);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
using System.Reactive.Concurrency;
|
using System.Reactive.Concurrency;
|
||||||
|
|
||||||
namespace FileTime.App.Core.Services
|
namespace FileTime.App.Core.Services;
|
||||||
{
|
|
||||||
public interface IRxSchedulerService
|
public interface IRxSchedulerService
|
||||||
{
|
{
|
||||||
IScheduler GetWorkerScheduler();
|
IScheduler GetWorkerScheduler();
|
||||||
IScheduler GetUIScheduler();
|
IScheduler GetUIScheduler();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using FileTime.App.Core.Models.Enums;
|
using FileTime.App.Core.Models.Enums;
|
||||||
|
|
||||||
namespace FileTime.App.Core.ViewModels
|
namespace FileTime.App.Core.ViewModels;
|
||||||
{
|
|
||||||
public interface IAppState
|
public interface IAppState
|
||||||
{
|
{
|
||||||
ObservableCollection<ITabViewModel> Tabs { get; }
|
ObservableCollection<ITabViewModel> Tabs { get; }
|
||||||
@@ -14,4 +14,3 @@ namespace FileTime.App.Core.ViewModels
|
|||||||
void RemoveTab(ITabViewModel tabViewModel);
|
void RemoveTab(ITabViewModel tabViewModel);
|
||||||
void SetSearchText(string? searchText);
|
void SetSearchText(string? searchText);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
using FileTime.Core.Models;
|
using FileTime.Core.Models;
|
||||||
using InitableService;
|
using InitableService;
|
||||||
|
|
||||||
namespace FileTime.App.Core.ViewModels
|
namespace FileTime.App.Core.ViewModels;
|
||||||
{
|
|
||||||
public interface IContainerSizeContainerViewModel : IItemViewModel, IInitable<IContainer, ITabViewModel>
|
public interface IContainerSizeContainerViewModel : IItemViewModel, IInitable<IContainer, ITabViewModel>
|
||||||
{
|
{
|
||||||
long Size { get; set; }
|
long Size { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
using FileTime.Core.Models;
|
using FileTime.Core.Models;
|
||||||
using InitableService;
|
using InitableService;
|
||||||
|
|
||||||
namespace FileTime.App.Core.ViewModels
|
namespace FileTime.App.Core.ViewModels;
|
||||||
{
|
|
||||||
public interface IContainerViewModel : IItemViewModel, IInitable<IContainer, ITabViewModel>
|
public interface IContainerViewModel : IItemViewModel, IInitable<IContainer, ITabViewModel>
|
||||||
{
|
{
|
||||||
IContainer? Container { get; }
|
IContainer? Container { get; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
using FileTime.Core.Models;
|
using FileTime.Core.Models;
|
||||||
using InitableService;
|
using InitableService;
|
||||||
|
|
||||||
namespace FileTime.App.Core.ViewModels
|
namespace FileTime.App.Core.ViewModels;
|
||||||
{
|
|
||||||
public interface IElementViewModel : IItemViewModel, IInitable<IElement, ITabViewModel>
|
public interface IElementViewModel : IItemViewModel, IInitable<IElement, ITabViewModel>
|
||||||
{
|
{
|
||||||
long? Size { get; set; }
|
long? Size { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
using FileTime.Core.Models;
|
using FileTime.Core.Models;
|
||||||
using InitableService;
|
using InitableService;
|
||||||
|
|
||||||
namespace FileTime.App.Core.ViewModels
|
namespace FileTime.App.Core.ViewModels;
|
||||||
{
|
|
||||||
public interface IFileViewModel : IElementViewModel, IInitable<IFileElement, ITabViewModel>
|
public interface IFileViewModel : IElementViewModel, IInitable<IFileElement, ITabViewModel>
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -3,8 +3,8 @@ using FileTime.App.Core.Models.Enums;
|
|||||||
using FileTime.Core.Models;
|
using FileTime.Core.Models;
|
||||||
using InitableService;
|
using InitableService;
|
||||||
|
|
||||||
namespace FileTime.App.Core.ViewModels
|
namespace FileTime.App.Core.ViewModels;
|
||||||
{
|
|
||||||
public interface IItemViewModel : IInitable<IItem, ITabViewModel>
|
public interface IItemViewModel : IInitable<IItem, ITabViewModel>
|
||||||
{
|
{
|
||||||
IItem? BaseItem { get; set; }
|
IItem? BaseItem { get; set; }
|
||||||
@@ -18,4 +18,3 @@ namespace FileTime.App.Core.ViewModels
|
|||||||
string? Attributes { get; set; }
|
string? Attributes { get; set; }
|
||||||
bool EqualsTo(IItemViewModel? itemViewModel);
|
bool EqualsTo(IItemViewModel? itemViewModel);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -5,8 +5,8 @@ using FileTime.Core.Models;
|
|||||||
using FileTime.Core.Services;
|
using FileTime.Core.Services;
|
||||||
using InitableService;
|
using InitableService;
|
||||||
|
|
||||||
namespace FileTime.App.Core.ViewModels
|
namespace FileTime.App.Core.ViewModels;
|
||||||
{
|
|
||||||
public interface ITabViewModel : IInitable<ITab, int>
|
public interface ITabViewModel : IInitable<ITab, int>
|
||||||
{
|
{
|
||||||
ITab? Tab { get; }
|
ITab? Tab { get; }
|
||||||
@@ -27,4 +27,3 @@ namespace FileTime.App.Core.ViewModels
|
|||||||
void AddMarkedItem(IAbsolutePath item);
|
void AddMarkedItem(IAbsolutePath item);
|
||||||
void ToggleMarkedItem(IAbsolutePath item);
|
void ToggleMarkedItem(IAbsolutePath item);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
using System.Reactive.Linq;
|
using System.Reactive.Linq;
|
||||||
|
|
||||||
namespace FileTime.App.Core.Extensions
|
namespace FileTime.App.Core.Extensions;
|
||||||
{
|
|
||||||
public static class ObservableExtensions
|
public static class ObservableExtensions
|
||||||
{
|
{
|
||||||
public static IObservable<T> WhereNotNull<T>(this IObservable<T?> source) => source.Where(c => c != null)!;
|
public static IObservable<T> WhereNotNull<T>(this IObservable<T?> source) => source.Where(c => c != null)!;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using FileTime.App.Core.ViewModels;
|
using FileTime.App.Core.ViewModels;
|
||||||
using FileTime.Core.Models;
|
using FileTime.Core.Models;
|
||||||
|
|
||||||
namespace FileTime.App.Core.Extensions
|
namespace FileTime.App.Core.Extensions;
|
||||||
{
|
|
||||||
public static class ViewModelExtensions
|
public static class ViewModelExtensions
|
||||||
{
|
{
|
||||||
public static IAbsolutePath ToAbsolutePath(this IItemViewModel itemViewModel)
|
public static IAbsolutePath ToAbsolutePath(this IItemViewModel itemViewModel)
|
||||||
@@ -11,4 +11,3 @@ namespace FileTime.App.Core.Extensions
|
|||||||
return new AbsolutePath(item);
|
return new AbsolutePath(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -6,6 +6,10 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="morelinq" Version="3.3.2" />
|
<PackageReference Include="morelinq" Version="3.3.2" />
|
||||||
<PackageReference Include="MvvmGen" Version="1.1.5" />
|
<PackageReference Include="MvvmGen" Version="1.1.5" />
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using FileTime.Core.Command;
|
using FileTime.Core.Command;
|
||||||
using FileTime.Core.Models;
|
using FileTime.Core.Models;
|
||||||
|
|
||||||
namespace FileTime.App.Core.Services
|
namespace FileTime.App.Core.Services;
|
||||||
{
|
|
||||||
public class ClipboardService : IClipboardService
|
public class ClipboardService : IClipboardService
|
||||||
{
|
{
|
||||||
private List<IAbsolutePath> _content;
|
private List<IAbsolutePath> _content;
|
||||||
@@ -48,4 +48,3 @@ namespace FileTime.App.Core.Services
|
|||||||
CommandType = typeof(T);
|
CommandType = typeof(T);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -4,8 +4,8 @@ using FileTime.App.Core.Command;
|
|||||||
using FileTime.App.Core.ViewModels;
|
using FileTime.App.Core.ViewModels;
|
||||||
using FileTime.Core.Models;
|
using FileTime.Core.Models;
|
||||||
|
|
||||||
namespace FileTime.App.Core.Services.CommandHandler
|
namespace FileTime.App.Core.Services.CommandHandler;
|
||||||
{
|
|
||||||
public abstract class CommandHandlerBase : ICommandHandler
|
public abstract class CommandHandlerBase : ICommandHandler
|
||||||
{
|
{
|
||||||
private readonly Dictionary<Commands, Func<Task>> _commandHandlers = new();
|
private readonly Dictionary<Commands, Func<Task>> _commandHandlers = new();
|
||||||
@@ -51,4 +51,3 @@ namespace FileTime.App.Core.Services.CommandHandler
|
|||||||
return act(_appState);
|
return act(_appState);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -6,8 +6,8 @@ using FileTime.Core.Command;
|
|||||||
using FileTime.Core.Command.Copy;
|
using FileTime.Core.Command.Copy;
|
||||||
using FileTime.Core.Models;
|
using FileTime.Core.Models;
|
||||||
|
|
||||||
namespace FileTime.App.Core.Services.CommandHandler
|
namespace FileTime.App.Core.Services.CommandHandler;
|
||||||
{
|
|
||||||
public class ItemManipulationCommandHandler : CommandHandlerBase
|
public class ItemManipulationCommandHandler : CommandHandlerBase
|
||||||
{
|
{
|
||||||
private ITabViewModel? _selectedTab;
|
private ITabViewModel? _selectedTab;
|
||||||
@@ -93,4 +93,3 @@ namespace FileTime.App.Core.Services.CommandHandler
|
|||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -4,8 +4,8 @@ using FileTime.App.Core.Extensions;
|
|||||||
using FileTime.App.Core.ViewModels;
|
using FileTime.App.Core.ViewModels;
|
||||||
using FileTime.Core.Models;
|
using FileTime.Core.Models;
|
||||||
|
|
||||||
namespace FileTime.App.Core.Services.CommandHandler
|
namespace FileTime.App.Core.Services.CommandHandler;
|
||||||
{
|
|
||||||
public class NavigationCommandHandler : CommandHandlerBase
|
public class NavigationCommandHandler : CommandHandlerBase
|
||||||
{
|
{
|
||||||
private ITabViewModel? _selectedTab;
|
private ITabViewModel? _selectedTab;
|
||||||
@@ -65,4 +65,3 @@ namespace FileTime.App.Core.Services.CommandHandler
|
|||||||
_selectedTab.Tab?.SetSelectedItem(newSelectedItem.ToAbsolutePath());
|
_selectedTab.Tab?.SetSelectedItem(newSelectedItem.ToAbsolutePath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using FileTime.App.Core.Command;
|
using FileTime.App.Core.Command;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
namespace FileTime.App.Core.Services
|
namespace FileTime.App.Core.Services;
|
||||||
{
|
|
||||||
public class CommandHandlerService : ICommandHandlerService
|
public class CommandHandlerService : ICommandHandlerService
|
||||||
{
|
{
|
||||||
private readonly Lazy<IEnumerable<ICommandHandler>> _commandHandlers;
|
private readonly Lazy<IEnumerable<ICommandHandler>> _commandHandlers;
|
||||||
@@ -77,4 +77,3 @@ namespace FileTime.App.Core.Services
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using FileTime.App.Core.Models;
|
using FileTime.App.Core.Models;
|
||||||
|
|
||||||
namespace FileTime.App.Core.Services
|
namespace FileTime.App.Core.Services;
|
||||||
{
|
|
||||||
public class ItemNameConverterService : IItemNameConverterService
|
public class ItemNameConverterService : IItemNameConverterService
|
||||||
{
|
{
|
||||||
public List<ItemNamePart> GetDisplayName(string name, string? searchText)
|
public List<ItemNamePart> GetDisplayName(string name, string? searchText)
|
||||||
@@ -53,4 +53,3 @@ namespace FileTime.App.Core.Services
|
|||||||
return parts.Length == 1 || (parts.Length == 2 && string.IsNullOrEmpty(parts[0])) ? "" : parts[^1];
|
return parts.Length == 1 || (parts.Length == 2 && string.IsNullOrEmpty(parts[0])) ? "" : parts[^1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ using FileTime.App.Core.Services.CommandHandler;
|
|||||||
using FileTime.App.Core.ViewModels;
|
using FileTime.App.Core.ViewModels;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
namespace FileTime.App.Core
|
namespace FileTime.App.Core;
|
||||||
{
|
|
||||||
public static class Startup
|
public static class Startup
|
||||||
{
|
{
|
||||||
public static IServiceCollection AddCoreAppServices(this IServiceCollection serviceCollection)
|
public static IServiceCollection AddCoreAppServices(this IServiceCollection serviceCollection)
|
||||||
@@ -26,4 +26,3 @@ namespace FileTime.App.Core
|
|||||||
.AddSingleton<ICommandHandler, ItemManipulationCommandHandler>();
|
.AddSingleton<ICommandHandler, ItemManipulationCommandHandler>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -5,8 +5,8 @@ using FileTime.App.Core.Models.Enums;
|
|||||||
using MvvmGen;
|
using MvvmGen;
|
||||||
using MoreLinq;
|
using MoreLinq;
|
||||||
|
|
||||||
namespace FileTime.App.Core.ViewModels
|
namespace FileTime.App.Core.ViewModels;
|
||||||
{
|
|
||||||
[ViewModel]
|
[ViewModel]
|
||||||
public abstract partial class AppStateBase : IAppState
|
public abstract partial class AppStateBase : IAppState
|
||||||
{
|
{
|
||||||
@@ -51,4 +51,3 @@ namespace FileTime.App.Core.ViewModels
|
|||||||
return prefered.Concat(others).FirstOrDefault();
|
return prefered.Concat(others).FirstOrDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -2,8 +2,8 @@ using FileTime.App.Core.Services;
|
|||||||
using FileTime.Core.Models;
|
using FileTime.Core.Models;
|
||||||
using MvvmGen;
|
using MvvmGen;
|
||||||
|
|
||||||
namespace FileTime.App.Core.ViewModels
|
namespace FileTime.App.Core.ViewModels;
|
||||||
{
|
|
||||||
[ViewModel(GenerateConstructor = false)]
|
[ViewModel(GenerateConstructor = false)]
|
||||||
public partial class ContainerSizeContainerViewModel : ItemViewModel, IContainerSizeContainerViewModel
|
public partial class ContainerSizeContainerViewModel : ItemViewModel, IContainerSizeContainerViewModel
|
||||||
{
|
{
|
||||||
@@ -19,4 +19,3 @@ namespace FileTime.App.Core.ViewModels
|
|||||||
Init((IItem)item, parentTab);
|
Init((IItem)item, parentTab);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -2,8 +2,8 @@ using FileTime.App.Core.Services;
|
|||||||
using FileTime.Core.Models;
|
using FileTime.Core.Models;
|
||||||
using MvvmGen;
|
using MvvmGen;
|
||||||
|
|
||||||
namespace FileTime.App.Core.ViewModels
|
namespace FileTime.App.Core.ViewModels;
|
||||||
{
|
|
||||||
[ViewModel(GenerateConstructor = false)]
|
[ViewModel(GenerateConstructor = false)]
|
||||||
public partial class ContainerViewModel : ItemViewModel, IContainerViewModel
|
public partial class ContainerViewModel : ItemViewModel, IContainerViewModel
|
||||||
{
|
{
|
||||||
@@ -18,4 +18,3 @@ namespace FileTime.App.Core.ViewModels
|
|||||||
Init((IItem)item, parentTab);
|
Init((IItem)item, parentTab);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -2,8 +2,8 @@ using FileTime.App.Core.Services;
|
|||||||
using FileTime.Core.Models;
|
using FileTime.Core.Models;
|
||||||
using MvvmGen;
|
using MvvmGen;
|
||||||
|
|
||||||
namespace FileTime.App.Core.ViewModels
|
namespace FileTime.App.Core.ViewModels;
|
||||||
{
|
|
||||||
[ViewModel(GenerateConstructor = false)]
|
[ViewModel(GenerateConstructor = false)]
|
||||||
public partial class ElementViewModel : ItemViewModel, IElementViewModel
|
public partial class ElementViewModel : ItemViewModel, IElementViewModel
|
||||||
{
|
{
|
||||||
@@ -19,4 +19,3 @@ namespace FileTime.App.Core.ViewModels
|
|||||||
Init((IItem)item, parentTab);
|
Init((IItem)item, parentTab);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -2,8 +2,8 @@ using FileTime.App.Core.Services;
|
|||||||
using FileTime.Core.Models;
|
using FileTime.Core.Models;
|
||||||
using MvvmGen;
|
using MvvmGen;
|
||||||
|
|
||||||
namespace FileTime.App.Core.ViewModels
|
namespace FileTime.App.Core.ViewModels;
|
||||||
{
|
|
||||||
[ViewModel(GenerateConstructor = false)]
|
[ViewModel(GenerateConstructor = false)]
|
||||||
public partial class FileViewModel : ElementViewModel, IFileViewModel
|
public partial class FileViewModel : ElementViewModel, IFileViewModel
|
||||||
{
|
{
|
||||||
@@ -16,4 +16,3 @@ namespace FileTime.App.Core.ViewModels
|
|||||||
Init((IElement)item, parentTab);
|
Init((IElement)item, parentTab);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -7,8 +7,8 @@ using FileTime.Core.Models;
|
|||||||
using MoreLinq;
|
using MoreLinq;
|
||||||
using MvvmGen;
|
using MvvmGen;
|
||||||
|
|
||||||
namespace FileTime.App.Core.ViewModels
|
namespace FileTime.App.Core.ViewModels;
|
||||||
{
|
|
||||||
[ViewModel]
|
[ViewModel]
|
||||||
[Inject(typeof(IAppState), "_appState")]
|
[Inject(typeof(IAppState), "_appState")]
|
||||||
[Inject(typeof(IItemNameConverterService), "_itemNameConverterService")]
|
[Inject(typeof(IItemNameConverterService), "_itemNameConverterService")]
|
||||||
@@ -70,4 +70,3 @@ namespace FileTime.App.Core.ViewModels
|
|||||||
return BaseItem?.FullName?.Path is string path && path == itemViewModel?.BaseItem?.FullName?.Path;
|
return BaseItem?.FullName?.Path is string path && path == itemViewModel?.BaseItem?.FullName?.Path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -9,8 +9,8 @@ using FileTime.Tools.Extensions;
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using MvvmGen;
|
using MvvmGen;
|
||||||
|
|
||||||
namespace FileTime.App.Core.ViewModels
|
namespace FileTime.App.Core.ViewModels;
|
||||||
{
|
|
||||||
[ViewModel]
|
[ViewModel]
|
||||||
public partial class TabViewModel : ITabViewModel, IDisposable
|
public partial class TabViewModel : ITabViewModel, IDisposable
|
||||||
{
|
{
|
||||||
@@ -243,4 +243,3 @@ namespace FileTime.App.Core.ViewModels
|
|||||||
disposed = true;
|
disposed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -3,8 +3,8 @@ using FileTime.Core.Services;
|
|||||||
using FileTime.Providers.Local;
|
using FileTime.Providers.Local;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
namespace FileTime.App.DependencyInjection
|
namespace FileTime.App.DependencyInjection;
|
||||||
{
|
|
||||||
public static class DependencyInjection
|
public static class DependencyInjection
|
||||||
{
|
{
|
||||||
public static IServiceCollection RegisterDefaultServices(IServiceCollection? serviceCollection = null)
|
public static IServiceCollection RegisterDefaultServices(IServiceCollection? serviceCollection = null)
|
||||||
@@ -17,4 +17,3 @@ namespace FileTime.App.DependencyInjection
|
|||||||
.AddLocalServices();
|
.AddLocalServices();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -5,6 +5,11 @@
|
|||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -6,4 +6,8 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -7,6 +7,10 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\FileTime.ConsoleUI.App\FileTime.ConsoleUI.App.csproj" />
|
<ProjectReference Include="..\FileTime.ConsoleUI.App\FileTime.ConsoleUI.App.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
namespace FileTime.Core.Behaviors
|
namespace FileTime.Core.Behaviors;
|
||||||
{
|
|
||||||
public interface IOnContainerEnter
|
public interface IOnContainerEnter
|
||||||
{
|
{
|
||||||
Task OnEnter();
|
Task OnEnter();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
namespace FileTime.Core.Command
|
namespace FileTime.Core.Command;
|
||||||
{
|
|
||||||
public interface ICommand
|
public interface ICommand
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
namespace FileTime.Core.Command
|
namespace FileTime.Core.Command;
|
||||||
{
|
|
||||||
public interface ITransportationCommand : ICommand
|
public interface ITransportationCommand : ICommand
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
namespace FileTime.Core.Enums
|
namespace FileTime.Core.Enums;
|
||||||
{
|
|
||||||
public enum AbsolutePathType
|
public enum AbsolutePathType
|
||||||
{
|
{
|
||||||
Unknown,
|
Unknown,
|
||||||
Container,
|
Container,
|
||||||
Element
|
Element
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
namespace FileTime.Core.Enums
|
namespace FileTime.Core.Enums;
|
||||||
{
|
|
||||||
public enum SupportsDelete
|
public enum SupportsDelete
|
||||||
{
|
{
|
||||||
False,
|
False,
|
||||||
True,
|
True,
|
||||||
HardDeleteOnly,
|
HardDeleteOnly,
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -6,6 +6,10 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DynamicData" Version="7.6.7" />
|
<PackageReference Include="DynamicData" Version="7.6.7" />
|
||||||
<PackageReference Include="System.Reactive" Version="5.0.0" />
|
<PackageReference Include="System.Reactive" Version="5.0.0" />
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
namespace FileTime.Core.Models
|
namespace FileTime.Core.Models;
|
||||||
{
|
|
||||||
public static class Constants
|
public static class Constants
|
||||||
{
|
{
|
||||||
public const char SeparatorChar = '/';
|
public const char SeparatorChar = '/';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
namespace FileTime.Core.Models
|
namespace FileTime.Core.Models;
|
||||||
{
|
|
||||||
public record FullName(string Path)
|
public record FullName(string Path)
|
||||||
{
|
{
|
||||||
public FullName? GetParent()
|
public FullName? GetParent()
|
||||||
@@ -14,4 +14,3 @@ namespace FileTime.Core.Models
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using FileTime.Core.Enums;
|
using FileTime.Core.Enums;
|
||||||
using FileTime.Core.Services;
|
using FileTime.Core.Services;
|
||||||
|
|
||||||
namespace FileTime.Core.Models
|
namespace FileTime.Core.Models;
|
||||||
{
|
|
||||||
public interface IAbsolutePath
|
public interface IAbsolutePath
|
||||||
{
|
{
|
||||||
IContentProvider ContentProvider { get; }
|
IContentProvider ContentProvider { get; }
|
||||||
@@ -13,4 +13,3 @@ namespace FileTime.Core.Models
|
|||||||
Task<IItem> ResolveAsync(bool forceResolve = false, ItemInitializationSettings itemInitializationSettings = default);
|
Task<IItem> ResolveAsync(bool forceResolve = false, ItemInitializationSettings itemInitializationSettings = default);
|
||||||
Task<IItem?> ResolveAsyncSafe(bool forceResolve = false, ItemInitializationSettings itemInitializationSettings = default);
|
Task<IItem?> ResolveAsyncSafe(bool forceResolve = false, ItemInitializationSettings itemInitializationSettings = default);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
using DynamicData;
|
using DynamicData;
|
||||||
|
|
||||||
namespace FileTime.Core.Models
|
namespace FileTime.Core.Models;
|
||||||
{
|
|
||||||
public interface IContainer : IItem
|
public interface IContainer : IItem
|
||||||
{
|
{
|
||||||
IObservable<IObservable<IChangeSet<IAbsolutePath>>?> Items { get; }
|
IObservable<IObservable<IChangeSet<IAbsolutePath>>?> Items { get; }
|
||||||
IObservable<bool> IsLoading { get; }
|
IObservable<bool> IsLoading { get; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
namespace FileTime.Core.Models
|
namespace FileTime.Core.Models;
|
||||||
{
|
|
||||||
public interface IElement : IItem
|
public interface IElement : IItem
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
namespace FileTime.Core.Models
|
namespace FileTime.Core.Models;
|
||||||
{
|
|
||||||
public interface IFileElement : IElement
|
public interface IFileElement : IElement
|
||||||
{
|
{
|
||||||
long Size { get; }
|
long Size { get; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using FileTime.Core.Enums;
|
using FileTime.Core.Enums;
|
||||||
using FileTime.Core.Services;
|
using FileTime.Core.Services;
|
||||||
|
|
||||||
namespace FileTime.Core.Models
|
namespace FileTime.Core.Models;
|
||||||
{
|
|
||||||
public interface IItem
|
public interface IItem
|
||||||
{
|
{
|
||||||
string Name { get; }
|
string Name { get; }
|
||||||
@@ -20,4 +20,3 @@ namespace FileTime.Core.Models
|
|||||||
AbsolutePathType Type { get; }
|
AbsolutePathType Type { get; }
|
||||||
IObservable<IEnumerable<Exception>> Exceptions { get; }
|
IObservable<IEnumerable<Exception>> Exceptions { get; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
namespace FileTime.Core.Models
|
namespace FileTime.Core.Models;
|
||||||
{
|
|
||||||
public readonly struct ItemInitializationSettings
|
public readonly struct ItemInitializationSettings
|
||||||
{
|
{
|
||||||
public readonly bool SkipChildInitialization;
|
public readonly bool SkipChildInitialization;
|
||||||
@@ -9,4 +9,3 @@ namespace FileTime.Core.Models
|
|||||||
SkipChildInitialization = skipChildInitialization;
|
SkipChildInitialization = skipChildInitialization;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
namespace FileTime.Core.Models
|
namespace FileTime.Core.Models;
|
||||||
{
|
|
||||||
public record ItemsTransformator(
|
public record ItemsTransformator(
|
||||||
string Name,
|
string Name,
|
||||||
Func<IEnumerable<IItem>, Task<IEnumerable<IItem>>> Transformator
|
Func<IEnumerable<IItem>, Task<IEnumerable<IItem>>> Transformator
|
||||||
);
|
);
|
||||||
}
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
namespace FileTime.Core.Models
|
namespace FileTime.Core.Models;
|
||||||
{
|
|
||||||
public record NativePath(string Path);
|
public record NativePath(string Path);
|
||||||
}
|
|
||||||
@@ -2,8 +2,8 @@ using FileTime.Core.Behaviors;
|
|||||||
using FileTime.Core.Enums;
|
using FileTime.Core.Enums;
|
||||||
using FileTime.Core.Models;
|
using FileTime.Core.Models;
|
||||||
|
|
||||||
namespace FileTime.Core.Services
|
namespace FileTime.Core.Services;
|
||||||
{
|
|
||||||
public interface IContentProvider : IContainer, IOnContainerEnter
|
public interface IContentProvider : IContainer, IOnContainerEnter
|
||||||
{
|
{
|
||||||
Task<IItem> GetItemByFullNameAsync(
|
Task<IItem> GetItemByFullNameAsync(
|
||||||
@@ -20,4 +20,3 @@ namespace FileTime.Core.Services
|
|||||||
|
|
||||||
Task<List<IAbsolutePath>> GetItemsByContainerAsync(FullName fullName);
|
Task<List<IAbsolutePath>> GetItemsByContainerAsync(FullName fullName);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -2,8 +2,8 @@ using DynamicData;
|
|||||||
using FileTime.Core.Models;
|
using FileTime.Core.Models;
|
||||||
using InitableService;
|
using InitableService;
|
||||||
|
|
||||||
namespace FileTime.Core.Services
|
namespace FileTime.Core.Services;
|
||||||
{
|
|
||||||
public interface ITab : IInitable<IContainer>
|
public interface ITab : IInitable<IContainer>
|
||||||
{
|
{
|
||||||
IObservable<IContainer?> CurrentLocation { get; }
|
IObservable<IContainer?> CurrentLocation { get; }
|
||||||
@@ -16,4 +16,3 @@ namespace FileTime.Core.Services
|
|||||||
void RemoveSelectedItemsTransformatorByName(string name);
|
void RemoveSelectedItemsTransformatorByName(string name);
|
||||||
void SetSelectedItem(IAbsolutePath newSelectedItem);
|
void SetSelectedItem(IAbsolutePath newSelectedItem);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
namespace FileTime.Core.Command.Copy
|
namespace FileTime.Core.Command.Copy;
|
||||||
{
|
|
||||||
public class CopyCommand : ITransportationCommand
|
public class CopyCommand : ITransportationCommand
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -4,6 +4,10 @@
|
|||||||
<ProjectReference Include="..\FileTime.Core.Abstraction\FileTime.Core.Abstraction.csproj" />
|
<ProjectReference Include="..\FileTime.Core.Abstraction\FileTime.Core.Abstraction.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
namespace FileTime.Core.Command
|
namespace FileTime.Core.Command;
|
||||||
{
|
|
||||||
public enum TransportMode
|
public enum TransportMode
|
||||||
{
|
{
|
||||||
Merge,
|
Merge,
|
||||||
Overwrite,
|
Overwrite,
|
||||||
Skip
|
Skip
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using FileTime.Core.Enums;
|
using FileTime.Core.Enums;
|
||||||
using FileTime.Core.Services;
|
using FileTime.Core.Services;
|
||||||
|
|
||||||
namespace FileTime.Core.Models
|
namespace FileTime.Core.Models;
|
||||||
{
|
|
||||||
public class AbsolutePath : IAbsolutePath
|
public class AbsolutePath : IAbsolutePath
|
||||||
{
|
{
|
||||||
public IContentProvider ContentProvider { get; }
|
public IContentProvider ContentProvider { get; }
|
||||||
@@ -42,4 +42,3 @@ namespace FileTime.Core.Models
|
|||||||
catch { return null; }
|
catch { return null; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -4,8 +4,8 @@ using DynamicData;
|
|||||||
using FileTime.Core.Enums;
|
using FileTime.Core.Enums;
|
||||||
using FileTime.Core.Services;
|
using FileTime.Core.Services;
|
||||||
|
|
||||||
namespace FileTime.Core.Models
|
namespace FileTime.Core.Models;
|
||||||
{
|
|
||||||
public record Container(
|
public record Container(
|
||||||
string Name,
|
string Name,
|
||||||
string DisplayName,
|
string DisplayName,
|
||||||
@@ -26,4 +26,3 @@ namespace FileTime.Core.Models
|
|||||||
IObservable<bool> IContainer.IsLoading => IsLoading.AsObservable();
|
IObservable<bool> IContainer.IsLoading => IsLoading.AsObservable();
|
||||||
public AbsolutePathType Type => AbsolutePathType.Container;
|
public AbsolutePathType Type => AbsolutePathType.Container;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using FileTime.Core.Enums;
|
using FileTime.Core.Enums;
|
||||||
using FileTime.Core.Services;
|
using FileTime.Core.Services;
|
||||||
|
|
||||||
namespace FileTime.Core.Models
|
namespace FileTime.Core.Models;
|
||||||
{
|
|
||||||
public record Element(
|
public record Element(
|
||||||
string Name,
|
string Name,
|
||||||
string DisplayName,
|
string DisplayName,
|
||||||
@@ -20,4 +20,3 @@ namespace FileTime.Core.Models
|
|||||||
{
|
{
|
||||||
public AbsolutePathType Type => AbsolutePathType.Element;
|
public AbsolutePathType Type => AbsolutePathType.Element;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using FileTime.Core.Enums;
|
using FileTime.Core.Enums;
|
||||||
using FileTime.Core.Services;
|
using FileTime.Core.Services;
|
||||||
|
|
||||||
namespace FileTime.Core.Models
|
namespace FileTime.Core.Models;
|
||||||
{
|
|
||||||
public record FileElement(
|
public record FileElement(
|
||||||
string Name,
|
string Name,
|
||||||
string DisplayName,
|
string DisplayName,
|
||||||
@@ -33,4 +33,3 @@ namespace FileTime.Core.Models
|
|||||||
Provider,
|
Provider,
|
||||||
Exceptions
|
Exceptions
|
||||||
), IFileElement;
|
), IFileElement;
|
||||||
}
|
|
||||||
@@ -6,6 +6,10 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\FileTime.Core.Abstraction\FileTime.Core.Abstraction.csproj" />
|
<ProjectReference Include="..\FileTime.Core.Abstraction\FileTime.Core.Abstraction.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ using DynamicData;
|
|||||||
using FileTime.Core.Enums;
|
using FileTime.Core.Enums;
|
||||||
using FileTime.Core.Models;
|
using FileTime.Core.Models;
|
||||||
|
|
||||||
namespace FileTime.Core.Services
|
namespace FileTime.Core.Services;
|
||||||
{
|
|
||||||
public abstract class ContentProviderBase : IContentProvider
|
public abstract class ContentProviderBase : IContentProvider
|
||||||
{
|
{
|
||||||
protected BehaviorSubject<IObservable<IChangeSet<IAbsolutePath>>?> Items { get; } = new (null);
|
protected BehaviorSubject<IObservable<IChangeSet<IAbsolutePath>>?> Items { get; } = new (null);
|
||||||
@@ -64,4 +64,3 @@ namespace FileTime.Core.Services
|
|||||||
public abstract Task<List<IAbsolutePath>> GetItemsByContainerAsync(FullName fullName);
|
public abstract Task<List<IAbsolutePath>> GetItemsByContainerAsync(FullName fullName);
|
||||||
public abstract NativePath GetNativePath(FullName fullName);
|
public abstract NativePath GetNativePath(FullName fullName);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -6,6 +6,10 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="System.Interactive.Async" Version="6.0.1" />
|
<PackageReference Include="System.Interactive.Async" Version="6.0.1" />
|
||||||
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
|
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ using System.Reactive.Subjects;
|
|||||||
using DynamicData;
|
using DynamicData;
|
||||||
using FileTime.Core.Models;
|
using FileTime.Core.Models;
|
||||||
|
|
||||||
namespace FileTime.Core.Services
|
namespace FileTime.Core.Services;
|
||||||
{
|
|
||||||
public class Tab : ITab
|
public class Tab : ITab
|
||||||
{
|
{
|
||||||
private readonly BehaviorSubject<IContainer?> _currentLocation = new(null);
|
private readonly BehaviorSubject<IContainer?> _currentLocation = new(null);
|
||||||
@@ -92,4 +92,3 @@ namespace FileTime.Core.Services
|
|||||||
SetCurrentLocation(resolvedContainer);
|
SetCurrentLocation(resolvedContainer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using Avalonia.Input;
|
using Avalonia.Input;
|
||||||
using FileTime.App.Core.Command;
|
using FileTime.App.Core.Command;
|
||||||
|
|
||||||
namespace FileTime.GuiApp.Configuration
|
namespace FileTime.GuiApp.Configuration;
|
||||||
{
|
|
||||||
public class CommandBindingConfiguration
|
public class CommandBindingConfiguration
|
||||||
{
|
{
|
||||||
public List<KeyConfig> Keys { get; set; } = new List<KeyConfig>();
|
public List<KeyConfig> Keys { get; set; } = new List<KeyConfig>();
|
||||||
@@ -86,4 +86,3 @@ namespace FileTime.GuiApp.Configuration
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
namespace FileTime.GuiApp.Configuration
|
namespace FileTime.GuiApp.Configuration;
|
||||||
{
|
|
||||||
public class KeyBindingConfiguration
|
public class KeyBindingConfiguration
|
||||||
{
|
{
|
||||||
public bool UseDefaultBindings { get; set; } = true;
|
public bool UseDefaultBindings { get; set; } = true;
|
||||||
public List<CommandBindingConfiguration> DefaultKeyBindings { get; set; } = new();
|
public List<CommandBindingConfiguration> DefaultKeyBindings { get; set; } = new();
|
||||||
public List<CommandBindingConfiguration> KeyBindings { get; set; } = new();
|
public List<CommandBindingConfiguration> KeyBindings { get; set; } = new();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using Avalonia.Input;
|
using Avalonia.Input;
|
||||||
|
|
||||||
namespace FileTime.GuiApp.Configuration
|
namespace FileTime.GuiApp.Configuration;
|
||||||
{
|
|
||||||
public class KeyConfig
|
public class KeyConfig
|
||||||
{
|
{
|
||||||
public Key Key { get; set; }
|
public Key Key { get; set; }
|
||||||
@@ -29,4 +29,3 @@ namespace FileTime.GuiApp.Configuration
|
|||||||
&& Shift == otherKeyConfig.Shift
|
&& Shift == otherKeyConfig.Shift
|
||||||
&& Ctrl == otherKeyConfig.Ctrl;
|
&& Ctrl == otherKeyConfig.Ctrl;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -3,8 +3,8 @@ using FileTime.App.Core.Command;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace FileTime.GuiApp.Configuration
|
namespace FileTime.GuiApp.Configuration;
|
||||||
{
|
|
||||||
public static class MainConfiguration
|
public static class MainConfiguration
|
||||||
{
|
{
|
||||||
private static readonly Lazy<List<CommandBindingConfiguration>> _defaultKeybindings = new(InitDefaultKeyBindings);
|
private static readonly Lazy<List<CommandBindingConfiguration>> _defaultKeybindings = new(InitDefaultKeyBindings);
|
||||||
@@ -125,4 +125,3 @@ namespace FileTime.GuiApp.Configuration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
namespace FileTime.GuiApp.Configuration
|
namespace FileTime.GuiApp.Configuration;
|
||||||
{
|
|
||||||
public class ProgramConfiguration
|
public class ProgramConfiguration
|
||||||
{
|
{
|
||||||
public string? Path { get; set; }
|
public string? Path { get; set; }
|
||||||
@@ -13,4 +13,3 @@ namespace FileTime.GuiApp.Configuration
|
|||||||
Arguments = arguments;
|
Arguments = arguments;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace FileTime.GuiApp.Configuration
|
namespace FileTime.GuiApp.Configuration;
|
||||||
{
|
|
||||||
public class ProgramsConfiguration
|
public class ProgramsConfiguration
|
||||||
{
|
{
|
||||||
public List<ProgramConfiguration> DefaultEditorPrograms { get; set; } = new();
|
public List<ProgramConfiguration> DefaultEditorPrograms { get; set; } = new();
|
||||||
public List<ProgramConfiguration> EditorPrograms { get; set; } = new();
|
public List<ProgramConfiguration> EditorPrograms { get; set; } = new();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
namespace FileTime.GuiApp.Configuration
|
namespace FileTime.GuiApp.Configuration;
|
||||||
{
|
|
||||||
public static class SectionNames
|
public static class SectionNames
|
||||||
{
|
{
|
||||||
public const string KeybindingSectionName = "KeyBindings";
|
public const string KeybindingSectionName = "KeyBindings";
|
||||||
public const string ProgramsSectionName = "Programs";
|
public const string ProgramsSectionName = "Programs";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -6,6 +6,10 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia" Version="0.10.13" />
|
<PackageReference Include="Avalonia" Version="0.10.13" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
namespace FileTime.GuiApp.Models
|
namespace FileTime.GuiApp.Models;
|
||||||
{
|
|
||||||
public record SpecialKeysStatus(bool IsAltPressed, bool IsShiftPressed, bool IsCtrlPressed);
|
public record SpecialKeysStatus(bool IsAltPressed, bool IsShiftPressed, bool IsCtrlPressed);
|
||||||
}
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
namespace FileTime.GuiApp.Services
|
namespace FileTime.GuiApp.Services;
|
||||||
{
|
|
||||||
public interface IDefaultModeKeyInputHandler : IKeyInputHandler { }
|
public interface IDefaultModeKeyInputHandler : IKeyInputHandler { }
|
||||||
}
|
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
using Avalonia.Input;
|
using Avalonia.Input;
|
||||||
using FileTime.GuiApp.Models;
|
using FileTime.GuiApp.Models;
|
||||||
|
|
||||||
namespace FileTime.GuiApp.Services
|
namespace FileTime.GuiApp.Services;
|
||||||
{
|
|
||||||
public interface IKeyInputHandler
|
public interface IKeyInputHandler
|
||||||
{
|
{
|
||||||
Task HandleInputKey(Key key, SpecialKeysStatus specialKeysStatus, Action<bool> setHandled);
|
Task HandleInputKey(Key key, SpecialKeysStatus specialKeysStatus, Action<bool> setHandled);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
using Avalonia.Input;
|
using Avalonia.Input;
|
||||||
|
|
||||||
namespace FileTime.GuiApp.Services
|
namespace FileTime.GuiApp.Services;
|
||||||
{
|
|
||||||
public interface IKeyInputHandlerService
|
public interface IKeyInputHandlerService
|
||||||
{
|
{
|
||||||
Task ProcessKeyDown(Key key, KeyModifiers keyModifiers, Action<bool> setHandled);
|
Task ProcessKeyDown(Key key, KeyModifiers keyModifiers, Action<bool> setHandled);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
using FileTime.GuiApp.Configuration;
|
using FileTime.GuiApp.Configuration;
|
||||||
|
|
||||||
namespace FileTime.GuiApp.Services
|
namespace FileTime.GuiApp.Services;
|
||||||
{
|
|
||||||
public interface IKeyboardConfigurationService
|
public interface IKeyboardConfigurationService
|
||||||
{
|
{
|
||||||
IReadOnlyList<CommandBindingConfiguration> CommandBindings { get; }
|
IReadOnlyList<CommandBindingConfiguration> CommandBindings { get; }
|
||||||
IReadOnlyList<CommandBindingConfiguration> UniversalCommandBindings { get; }
|
IReadOnlyList<CommandBindingConfiguration> UniversalCommandBindings { get; }
|
||||||
IReadOnlyList<CommandBindingConfiguration> AllShortcut { get; }
|
IReadOnlyList<CommandBindingConfiguration> AllShortcut { get; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
namespace FileTime.GuiApp.Services
|
namespace FileTime.GuiApp.Services;
|
||||||
{
|
|
||||||
public interface IRapidTravelModeKeyInputHandler : IKeyInputHandler { }
|
public interface IRapidTravelModeKeyInputHandler : IKeyInputHandler { }
|
||||||
}
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using FileTime.App.Core.ViewModels;
|
using FileTime.App.Core.ViewModels;
|
||||||
using FileTime.GuiApp.Configuration;
|
using FileTime.GuiApp.Configuration;
|
||||||
|
|
||||||
namespace FileTime.GuiApp.ViewModels
|
namespace FileTime.GuiApp.ViewModels;
|
||||||
{
|
|
||||||
public interface IGuiAppState : IAppState
|
public interface IGuiAppState : IAppState
|
||||||
{
|
{
|
||||||
List<KeyConfig> PreviousKeys { get; }
|
List<KeyConfig> PreviousKeys { get; }
|
||||||
@@ -11,4 +11,3 @@ namespace FileTime.GuiApp.ViewModels
|
|||||||
string? MessageBoxText { get; set; }
|
string? MessageBoxText { get; set; }
|
||||||
List<CommandBindingConfiguration> PossibleCommands { get; set; }
|
List<CommandBindingConfiguration> PossibleCommands { get; set; }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -7,8 +7,8 @@ using FileTime.GuiApp.Views;
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace FileTime.GuiApp
|
namespace FileTime.GuiApp;
|
||||||
{
|
|
||||||
public partial class App : Application
|
public partial class App : Application
|
||||||
{
|
{
|
||||||
static App()
|
static App()
|
||||||
@@ -43,4 +43,3 @@ namespace FileTime.GuiApp
|
|||||||
base.OnFrameworkInitializationCompleted();
|
base.OnFrameworkInitializationCompleted();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -9,6 +9,11 @@
|
|||||||
<ApplicationIcon>filetime.ico</ApplicationIcon>
|
<ApplicationIcon>filetime.ico</ApplicationIcon>
|
||||||
<Version>0.0.1</Version>
|
<Version>0.0.1</Version>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="filetime.ico" />
|
<Content Include="filetime.ico" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ using System.IO;
|
|||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.ReactiveUI;
|
using Avalonia.ReactiveUI;
|
||||||
|
|
||||||
namespace FileTime.GuiApp
|
namespace FileTime.GuiApp;
|
||||||
{
|
|
||||||
public static class Program
|
public static class Program
|
||||||
{
|
{
|
||||||
public static string AppDataRoot { get; }
|
public static string AppDataRoot { get; }
|
||||||
@@ -59,4 +59,3 @@ namespace FileTime.GuiApp
|
|||||||
.UseReactiveUI()
|
.UseReactiveUI()
|
||||||
.LogToTrace();
|
.LogToTrace();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ using Microsoft.Extensions.DependencyInjection;
|
|||||||
using Serilog;
|
using Serilog;
|
||||||
using Serilog.Configuration;
|
using Serilog.Configuration;
|
||||||
|
|
||||||
namespace FileTime.GuiApp
|
namespace FileTime.GuiApp;
|
||||||
{
|
|
||||||
public static class Startup
|
public static class Startup
|
||||||
{
|
{
|
||||||
internal static IServiceCollection AddViewModels(this IServiceCollection serviceCollection)
|
internal static IServiceCollection AddViewModels(this IServiceCollection serviceCollection)
|
||||||
@@ -77,4 +77,3 @@ namespace FileTime.GuiApp
|
|||||||
return loggerConfiguration.Sink(serviceProvider.GetService<ToastMessageSink>());
|
return loggerConfiguration.Sink(serviceProvider.GetService<ToastMessageSink>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -6,6 +6,10 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\..\AppCommon\FileTime.App.Core\FileTime.App.Core.csproj" />
|
<ProjectReference Include="..\..\..\AppCommon\FileTime.App.Core\FileTime.App.Core.csproj" />
|
||||||
<ProjectReference Include="..\FileTime.GuiApp.Abstractions\FileTime.GuiApp.Abstractions.csproj" />
|
<ProjectReference Include="..\FileTime.GuiApp.Abstractions\FileTime.GuiApp.Abstractions.csproj" />
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ using FileTime.App.Core.ViewModels;
|
|||||||
using FileTime.GuiApp.Configuration;
|
using FileTime.GuiApp.Configuration;
|
||||||
using MvvmGen;
|
using MvvmGen;
|
||||||
|
|
||||||
namespace FileTime.GuiApp.ViewModels
|
namespace FileTime.GuiApp.ViewModels;
|
||||||
{
|
|
||||||
[ViewModel]
|
[ViewModel]
|
||||||
public partial class GuiAppState : AppStateBase, IGuiAppState
|
public partial class GuiAppState : AppStateBase, IGuiAppState
|
||||||
{
|
{
|
||||||
@@ -21,4 +21,3 @@ namespace FileTime.GuiApp.ViewModels
|
|||||||
|
|
||||||
public List<KeyConfig> PreviousKeys { get; } = new();
|
public List<KeyConfig> PreviousKeys { get; } = new();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using Avalonia.Data.Converters;
|
using Avalonia.Data.Converters;
|
||||||
|
|
||||||
namespace FileTime.GuiApp.Converters
|
namespace FileTime.GuiApp.Converters;
|
||||||
{
|
|
||||||
public enum ComparisonCondition
|
public enum ComparisonCondition
|
||||||
{
|
{
|
||||||
Equal,
|
Equal,
|
||||||
@@ -51,4 +51,3 @@ namespace FileTime.GuiApp.Converters
|
|||||||
return value == parameter;
|
return value == parameter;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using Avalonia.Data.Converters;
|
using Avalonia.Data.Converters;
|
||||||
|
|
||||||
namespace FileTime.GuiApp.Converters
|
namespace FileTime.GuiApp.Converters;
|
||||||
{
|
|
||||||
public class DateTimeConverter : IValueConverter
|
public class DateTimeConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) =>
|
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture) =>
|
||||||
@@ -15,4 +15,3 @@ namespace FileTime.GuiApp.Converters
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using Avalonia.Data.Converters;
|
using Avalonia.Data.Converters;
|
||||||
|
|
||||||
namespace FileTime.GuiApp.Converters
|
namespace FileTime.GuiApp.Converters;
|
||||||
{
|
|
||||||
public class ExceptionToStringConverter : IValueConverter
|
public class ExceptionToStringConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||||
@@ -42,4 +42,3 @@ namespace FileTime.GuiApp.Converters
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using Avalonia.Data.Converters;
|
using Avalonia.Data.Converters;
|
||||||
|
|
||||||
namespace FileTime.GuiApp.Converters
|
namespace FileTime.GuiApp.Converters;
|
||||||
{
|
|
||||||
public class FormatSizeConverter : IValueConverter
|
public class FormatSizeConverter : IValueConverter
|
||||||
{
|
{
|
||||||
private const long OneKiloByte = 1024;
|
private const long OneKiloByte = 1024;
|
||||||
@@ -44,4 +44,3 @@ namespace FileTime.GuiApp.Converters
|
|||||||
return result + " " + suffix;
|
return result + " " + suffix;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -3,8 +3,8 @@ using Avalonia.Data.Converters;
|
|||||||
using FileTime.App.Core.Services;
|
using FileTime.App.Core.Services;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
namespace FileTime.GuiApp.Converters
|
namespace FileTime.GuiApp.Converters;
|
||||||
{
|
|
||||||
public class GetFileExtensionConverter : IValueConverter
|
public class GetFileExtensionConverter : IValueConverter
|
||||||
{
|
{
|
||||||
private IItemNameConverterService? _itemNameConverterService;
|
private IItemNameConverterService? _itemNameConverterService;
|
||||||
@@ -21,4 +21,3 @@ namespace FileTime.GuiApp.Converters
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -3,8 +3,8 @@ using Avalonia.Data.Converters;
|
|||||||
using Avalonia.Media;
|
using Avalonia.Media;
|
||||||
using FileTime.App.Core.Models.Enums;
|
using FileTime.App.Core.Models.Enums;
|
||||||
|
|
||||||
namespace FileTime.GuiApp.Converters
|
namespace FileTime.GuiApp.Converters;
|
||||||
{
|
|
||||||
public class ItemViewModeToBrushConverter : IValueConverter
|
public class ItemViewModeToBrushConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public Brush? DefaultBrush { get; set; }
|
public Brush? DefaultBrush { get; set; }
|
||||||
@@ -38,4 +38,3 @@ namespace FileTime.GuiApp.Converters
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -3,8 +3,8 @@ using Avalonia.Data.Converters;
|
|||||||
using FileTime.App.Core.Models.Enums;
|
using FileTime.App.Core.Models.Enums;
|
||||||
using FileTime.App.Core.ViewModels;
|
using FileTime.App.Core.ViewModels;
|
||||||
|
|
||||||
namespace FileTime.GuiApp.Converters
|
namespace FileTime.GuiApp.Converters;
|
||||||
{
|
|
||||||
public class ItemViewModelIsAttributeTypeConverter : IValueConverter
|
public class ItemViewModelIsAttributeTypeConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public bool Invert { get; set; }
|
public bool Invert { get; set; }
|
||||||
@@ -34,4 +34,3 @@ namespace FileTime.GuiApp.Converters
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -4,8 +4,8 @@ using Avalonia.Media;
|
|||||||
using FileTime.App.Core.Models;
|
using FileTime.App.Core.Models;
|
||||||
using FileTime.GuiApp.ViewModels;
|
using FileTime.GuiApp.ViewModels;
|
||||||
|
|
||||||
namespace FileTime.GuiApp.Converters
|
namespace FileTime.GuiApp.Converters;
|
||||||
{
|
|
||||||
public class NamePartShrinkerConverter : IMultiValueConverter
|
public class NamePartShrinkerConverter : IMultiValueConverter
|
||||||
{
|
{
|
||||||
private const int PixelPerChar = 8;
|
private const int PixelPerChar = 8;
|
||||||
@@ -112,4 +112,3 @@ namespace FileTime.GuiApp.Converters
|
|||||||
return newNameParts;
|
return newNameParts;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using Avalonia.Data.Converters;
|
using Avalonia.Data.Converters;
|
||||||
|
|
||||||
namespace FileTime.GuiApp.Converters
|
namespace FileTime.GuiApp.Converters;
|
||||||
{
|
|
||||||
public class SplitStringConverter : IValueConverter
|
public class SplitStringConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||||
@@ -24,4 +24,3 @@ namespace FileTime.GuiApp.Converters
|
|||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user