mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 18:21:10 +00:00
Adds unlit color to hidden file system browser dialog elements.
This commit is contained in:
1 parent
3f7cc2c60f
commit
b46dce745b
58 files changed
+855
-360
No files matched your search
+4
-2
@@ -19,14 +19,16 @@ public class FileSystemItemDtoFixture
|
||||
/// <summary>
|
||||
/// Creates a random valid <see cref="FileSystemItemDto"/>.
|
||||
/// </summary>
|
||||
/// <param name="isHidden">Optional. Whether the file system item is hidden. If not provided, a random value is generated.</param>
|
||||
/// <returns>The created <see cref="FileSystemItemDto"/>.</returns>
|
||||
public FileSystemItemDto Create()
|
||||
public FileSystemItemDto Create(bool? isHidden = null)
|
||||
{
|
||||
return new FileSystemItemDto(
|
||||
_faker.System.FilePath(),
|
||||
_faker.System.FileName(),
|
||||
_faker.Date.Past(),
|
||||
_faker.Date.Recent()
|
||||
_faker.Date.Recent(),
|
||||
isHidden ?? _faker.Random.Bool()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -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 = []
|
||||
|
||||
+4
-2
@@ -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()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+4
-2
@@ -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()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user