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

@ -1,26 +1,35 @@
using System.Threading.Tasks;
namespace SourceGit.ViewModels {
public class DeleteBranch : Popup {
public Models.Branch Target {
namespace SourceGit.ViewModels
{
public class DeleteBranch : Popup
{
public Models.Branch Target
{
get;
private set;
}
public DeleteBranch(Repository repo, Models.Branch branch) {
public DeleteBranch(Repository repo, Models.Branch branch)
{
_repo = repo;
Target = branch;
View = new Views.DeleteBranch() { DataContext = this };
}
public override Task<bool> Sure() {
public override Task<bool> Sure()
{
_repo.SetWatcherEnabled(false);
ProgressDescription = "Deleting branch...";
return Task.Run(() => {
if (Target.IsLocal) {
return Task.Run(() =>
{
if (Target.IsLocal)
{
Commands.Branch.Delete(_repo.FullPath, Target.Name);
} else {
}
else
{
new Commands.Push(_repo.FullPath, Target.Remote, Target.Name).Exec();
}
@ -29,6 +38,6 @@ namespace SourceGit.ViewModels {
});
}
private Repository _repo = null;
private readonly Repository _repo = null;
}
}
}