Adds unlit color to hidden file system browser dialog elements.

This commit is contained in:
BinaryAlley committed 2026-11-15 13:53:23 +02:00
1 parent 3f7cc2c60f
commit b46dce745b
58 files changed
+855 -360

No files matched your search

@@ -23,14 +23,16 @@ public class FileSystemTreeNodeResponseFixture
/// <param name="currentDepth">The current depth in the tree structure. Default is 0 (root level).</param>
/// <param name="maxDepth">The maximum depth of the tree structure. Default is 2.</param>
/// <param name="maxChildren">The maximum number of children for each node. Default is 3.</param>
/// <param name="isHidden">Optional. Whether the node is hidden. If not provided, a random value is generated.</param>
/// <returns>A <see cref="FileSystemTreeNodeResponse"/> with a nested structure.</returns>
public FileSystemTreeNodeResponse Create(int currentDepth = 0, int maxDepth = 2, int maxChildren = 3)
public FileSystemTreeNodeResponse Create(int currentDepth = 0, int maxDepth = 2, int maxChildren = 3, bool? isHidden = null)
{
FileSystemTreeNodeResponse response = new()
{
Path = _faker.System.FilePath(),
Name = _faker.System.FileName(),
ItemType = FileSystemItemType.Directory,
IsHidden = isHidden ?? _faker.Random.Bool(),
IsExpanded = _faker.Random.Bool(),
ChildrenLoaded = true,
Children = []
@@ -22,15 +22,17 @@ public class DirectoryResponseFixture
/// Creates a random valid <see cref="DirectoryResponse"/>.
/// </summary>
/// <param name="itemCount">Optional. The number of children elements to create.</param>
/// <param name="isHidden">Optional. Whether the directory is hidden. If not provided, a random value is generated.</param>
/// <returns>The created <see cref="DirectoryResponse"/>.</returns>
public DirectoryResponse Create(int itemCount = 3)
public DirectoryResponse Create(int itemCount = 3, bool? isHidden = null)
{
return new DirectoryResponse(
_faker.System.FilePath(),
_faker.System.FileName(),
_faker.Date.Past(),
_faker.Date.Recent(),
_fileSystemItemDtoFixture.CreateMany(itemCount)
_fileSystemItemDtoFixture.CreateMany(itemCount),
isHidden ?? _faker.Random.Bool()
);
}
@@ -19,15 +19,17 @@ public class FileResponseFixture
/// <summary>
/// Creates a random valid <see cref="FileResponse"/>.
/// </summary>
/// <param name="isHidden">Optional. Whether the file is hidden. If not provided, a random value is generated.</param>
/// <returns>The created <see cref="FileResponse"/>.</returns>
public FileResponse Create()
public FileResponse Create(bool? isHidden = null)
{
return new FileResponse(
_faker.System.FilePath(),
_faker.System.FileName(),
_faker.Date.Past(),
_faker.Date.Recent(),
_faker.Random.Long()
_faker.Random.Long(),
isHidden ?? _faker.Random.Bool()
);
}