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