mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 21:24:59 +00:00
code_style: run dotnet format
This commit is contained in:
parent
ed62174942
commit
4610f702b3
29 changed files with 48 additions and 76 deletions
|
@ -52,7 +52,7 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
get => Type == BranchTreeNodeType.Branch;
|
||||
}
|
||||
|
||||
|
||||
public bool IsDetachedHead
|
||||
{
|
||||
get => Type == BranchTreeNodeType.DetachedHead;
|
||||
|
@ -219,7 +219,7 @@ namespace SourceGit.ViewModels
|
|||
start = sepIdx + 1;
|
||||
sepIdx = branch.Name.IndexOf('/', start);
|
||||
}
|
||||
|
||||
|
||||
lastFolder.Children.Add(new BranchTreeNode()
|
||||
{
|
||||
Name = Path.GetFileName(branch.Name),
|
||||
|
@ -242,7 +242,7 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
return l.Name.CompareTo(r.Name);
|
||||
}
|
||||
|
||||
|
||||
return (int)l.Type - (int)r.Type;
|
||||
});
|
||||
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
namespace SourceGit.ViewModels
|
||||
{
|
||||
public class CheckoutCommit: Popup
|
||||
public class CheckoutCommit : Popup
|
||||
{
|
||||
public Models.Commit Commit
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
|
||||
public bool HasLocalChanges
|
||||
{
|
||||
get => _repo.WorkingCopyChangesCount > 0;
|
||||
|
@ -32,7 +32,7 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
_repo.SetWatcherEnabled(false);
|
||||
ProgressDescription = $"Checkout Commit '{Commit.SHA}' ...";
|
||||
|
||||
|
||||
return Task.Run(() =>
|
||||
{
|
||||
var needPopStash = false;
|
||||
|
|
|
@ -228,7 +228,7 @@ namespace SourceGit.ViewModels
|
|||
e.Handled = true;
|
||||
};
|
||||
menu.Items.Add(copyFileName);
|
||||
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
using System.Threading.Tasks;
|
||||
|
||||
namespace SourceGit.ViewModels
|
||||
{
|
||||
{
|
||||
public class CreateBranch : Popup
|
||||
{
|
||||
[Required(ErrorMessage = "Branch name is required!")]
|
||||
|
@ -19,13 +19,13 @@ namespace SourceGit.ViewModels
|
|||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
|
||||
public Models.DealWithLocalChanges PreAction
|
||||
{
|
||||
get => _preAction;
|
||||
set => SetProperty(ref _preAction, value);
|
||||
}
|
||||
|
||||
|
||||
public bool CheckoutAfterCreated
|
||||
{
|
||||
get;
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
SetProgressDescription("Deleting tracking remote branch...");
|
||||
Commands.Branch.DeleteRemote(_repo.FullPath, TrackingRemoteBranch.Remote, TrackingRemoteBranch.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace SourceGit.ViewModels
|
|||
Targets = branches;
|
||||
View = new Views.DeleteMultipleBranches() { DataContext = this };
|
||||
}
|
||||
|
||||
|
||||
public override Task<bool> Sure()
|
||||
{
|
||||
_repo.SetWatcherEnabled(false);
|
||||
|
|
|
@ -122,7 +122,7 @@ namespace SourceGit.ViewModels
|
|||
if (latest.TextDiff != null)
|
||||
{
|
||||
var repo = Preference.FindRepository(_repo);
|
||||
if (repo != null && repo.Submodules.Contains(_option.Path))
|
||||
if (repo != null && repo.Submodules.Contains(_option.Path))
|
||||
{
|
||||
var submoduleDiff = new Models.SubmoduleDiff();
|
||||
var submoduleRoot = $"{_repo}/{_option.Path}".Replace("\\", "/");
|
||||
|
@ -164,7 +164,7 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
var fullPath = Path.Combine(_repo, _option.Path);
|
||||
(imgDiff.Old, imgDiff.OldFileSize) = BitmapFromRevisionFile(_repo, "HEAD", oldPath);
|
||||
|
||||
|
||||
if (File.Exists(fullPath))
|
||||
{
|
||||
imgDiff.New = new Bitmap(fullPath);
|
||||
|
|
|
@ -136,7 +136,7 @@ namespace SourceGit.ViewModels
|
|||
}
|
||||
|
||||
needPopStash = true;
|
||||
}
|
||||
}
|
||||
else if (_preAction == Models.DealWithLocalChanges.Discard)
|
||||
{
|
||||
SetProgressDescription("Discard local changes ...");
|
||||
|
|
|
@ -192,7 +192,7 @@ namespace SourceGit.ViewModels
|
|||
e.Handled = true;
|
||||
};
|
||||
menu.Items.Add(copyFileName);
|
||||
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Threading;
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ using System.Collections.Generic;
|
|||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Platform.Storage;
|
||||
using Avalonia.Threading;
|
||||
|
@ -793,7 +792,7 @@ namespace SourceGit.ViewModels
|
|||
App.CopyText(change.Path);
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
|
||||
var copyFileName = new MenuItem();
|
||||
copyFileName.Header = App.Text("CopyFileName");
|
||||
copyFileName.Icon = App.CreateMenuIcon("Icons.Copy");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue