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,14 +1,19 @@
using Avalonia.Controls;
using Avalonia.Input;
namespace SourceGit.Views {
public partial class CommitDetail : UserControl {
public CommitDetail() {
namespace SourceGit.Views
{
public partial class CommitDetail : UserControl
{
public CommitDetail()
{
InitializeComponent();
}
private void OnChangeListDoubleTapped(object sender, TappedEventArgs e) {
if (DataContext is ViewModels.CommitDetail detail) {
private void OnChangeListDoubleTapped(object sender, TappedEventArgs e)
{
if (DataContext is ViewModels.CommitDetail detail)
{
var datagrid = sender as DataGrid;
detail.ActivePageIndex = 1;
detail.SelectedChange = datagrid.SelectedItem as Models.Change;
@ -16,10 +21,13 @@ namespace SourceGit.Views {
e.Handled = true;
}
private void OnChangeListContextRequested(object sender, ContextRequestedEventArgs e) {
if (DataContext is ViewModels.CommitDetail detail) {
private void OnChangeListContextRequested(object sender, ContextRequestedEventArgs e)
{
if (DataContext is ViewModels.CommitDetail detail)
{
var datagrid = sender as DataGrid;
if (datagrid.SelectedItem == null) {
if (datagrid.SelectedItem == null)
{
e.Handled = true;
return;
}
@ -30,4 +38,4 @@ namespace SourceGit.Views {
e.Handled = true;
}
}
}
}