style: add .editorconfig for code formatting. see issu #25

This commit is contained in:
leo 2024-03-18 09:37:06 +08:00
parent a8eeea4f78
commit 18aaa0a143
225 changed files with 7781 additions and 3911 deletions

View file

@ -2,35 +2,43 @@
using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;
namespace SourceGit.ViewModels {
public class EditRepositoryNode : Popup {
public RepositoryNode Node {
namespace SourceGit.ViewModels
{
public class EditRepositoryNode : Popup
{
public RepositoryNode Node
{
get => _node;
set => SetProperty(ref _node, value);
}
public string Id {
public string Id
{
get => _id;
set => SetProperty(ref _id, value);
}
[Required(ErrorMessage = "Name is required!")]
public string Name {
public string Name
{
get => _name;
set => SetProperty(ref _name, value, true);
}
public int Bookmark {
public int Bookmark
{
get => _bookmark;
set => SetProperty(ref _bookmark, value);
}
public bool IsRepository {
public bool IsRepository
{
get => _isRepository;
set => SetProperty(ref _isRepository, value);
}
public EditRepositoryNode(RepositoryNode node) {
public EditRepositoryNode(RepositoryNode node)
{
_node = node;
_id = node.Id;
_name = node.Name;
@ -40,16 +48,17 @@ namespace SourceGit.ViewModels {
View = new Views.EditRepositoryNode() { DataContext = this };
}
public override Task<bool> Sure() {
public override Task<bool> Sure()
{
_node.Name = _name;
_node.Bookmark = _bookmark;
return null;
}
private RepositoryNode _node = null;
private RepositoryNode _node = null;
private string _id = string.Empty;
private string _name = string.Empty;
private bool _isRepository = false;
private int _bookmark = 0;
}
}
}