mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 20:54:59 +00:00
code_style: remove all IDE warnings
This commit is contained in:
parent
9ac550242e
commit
a807aa9e12
94 changed files with 785 additions and 807 deletions
32
src/ViewModels/RevisionFileTreeNode.cs
Normal file
32
src/ViewModels/RevisionFileTreeNode.cs
Normal file
|
@ -0,0 +1,32 @@
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
namespace SourceGit.ViewModels
|
||||
{
|
||||
public class RevisionFileTreeNode : ObservableObject
|
||||
{
|
||||
public Models.Object Backend { get; set; } = null;
|
||||
public int Depth { get; set; } = 0;
|
||||
public List<RevisionFileTreeNode> Children { get; set; } = new List<RevisionFileTreeNode>();
|
||||
|
||||
public string Name
|
||||
{
|
||||
get => Backend == null ? string.Empty : Path.GetFileName(Backend.Path);
|
||||
}
|
||||
|
||||
public bool IsFolder
|
||||
{
|
||||
get => Backend != null && Backend.Type == Models.ObjectType.Tree;
|
||||
}
|
||||
|
||||
public bool IsExpanded
|
||||
{
|
||||
get => _isExpanded;
|
||||
set => SetProperty(ref _isExpanded, value);
|
||||
}
|
||||
|
||||
private bool _isExpanded = false;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue