code_style: run dotnet format to apply code style rules

This commit is contained in:
leo 2024-07-10 12:11:51 +08:00
parent 0ba58a6e9b
commit e5462f0086
No known key found for this signature in database
15 changed files with 50 additions and 50 deletions

View file

@ -82,7 +82,7 @@ namespace SourceGit.Commands
var rs = cmd.ReadToEnd();
if (rs.IsSuccess)
{
var lines = rs.StdOut.Split(new char[] {'\n', '\r'}, StringSplitOptions.RemoveEmptyEntries);
var lines = rs.StdOut.Split(new char[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries);
foreach (var line in lines)
{
var match = REG_LOCK().Match(line);

View file

@ -19,7 +19,6 @@ namespace SourceGit.Models
public bool IsMerged { get; set; } = false;
public Thickness Margin { get; set; } = new Thickness(0);
public string AuthorTimeStr => DateTime.UnixEpoch.AddSeconds(AuthorTime).ToLocalTime().ToString("yyyy/MM/dd HH:mm:ss");
public string CommitterTimeStr => DateTime.UnixEpoch.AddSeconds(CommitterTime).ToLocalTime().ToString("yyyy/MM/dd HH:mm:ss");
public string AuthorTimeShortStr => DateTime.UnixEpoch.AddSeconds(AuthorTime).ToLocalTime().ToString("yyyy/MM/dd");

View file

@ -272,7 +272,8 @@ namespace SourceGit.ViewModels
public void DispatchNotification(string pageId, string message, bool isError)
{
var notification = new Notification() {
var notification = new Notification()
{
IsError = isError,
Message = message,
};

View file

@ -51,21 +51,21 @@ namespace SourceGit.Views
if (node.Backend is Models.Remote)
{
CreateContent(12, new Thickness(0,2,0,0), "Icons.Remote");
CreateContent(12, new Thickness(0, 2, 0, 0), "Icons.Remote");
}
else if (node.Backend is Models.Branch branch)
{
if (branch.IsCurrent)
CreateContent(12, new Thickness(0,2,0,0), "Icons.Check");
CreateContent(12, new Thickness(0, 2, 0, 0), "Icons.Check");
else
CreateContent(12, new Thickness(2,0,0,0), "Icons.Branch");
CreateContent(12, new Thickness(2, 0, 0, 0), "Icons.Branch");
}
else
{
if (node.IsExpanded)
CreateContent(10, new Thickness(0,2,0,0), "Icons.Folder.Open");
CreateContent(10, new Thickness(0, 2, 0, 0), "Icons.Folder.Open");
else
CreateContent(10, new Thickness(0,2,0,0), "Icons.Folder.Fill");
CreateContent(10, new Thickness(0, 2, 0, 0), "Icons.Folder.Fill");
}
}

View file

@ -65,7 +65,7 @@ namespace SourceGit.Views
private void OnSearchCommitPanelPropertyChanged(object sender, AvaloniaPropertyChangedEventArgs e)
{
if (e.Property == IsVisibleProperty && sender is Grid { IsVisible: true})
if (e.Property == IsVisibleProperty && sender is Grid { IsVisible: true })
txtSearchCommitsBox.Focus();
}