2024-06-11 00:30:06 -07:00
|
|
|
using Avalonia.Controls;
|
|
|
|
using Avalonia.Input;
|
|
|
|
|
|
|
|
namespace SourceGit.Views
|
|
|
|
{
|
2024-06-12 20:54:10 -07:00
|
|
|
public partial class BranchCompare : ChromelessWindow
|
2024-10-31 19:00:37 -07:00
|
|
|
{
|
2024-06-11 00:30:06 -07:00
|
|
|
public BranchCompare()
|
2024-10-31 19:00:37 -07:00
|
|
|
{
|
2024-06-11 00:30:06 -07:00
|
|
|
InitializeComponent();
|
|
|
|
}
|
|
|
|
|
|
|
|
private void OnChangeContextRequested(object sender, ContextRequestedEventArgs e)
|
|
|
|
{
|
|
|
|
if (DataContext is ViewModels.BranchCompare vm && sender is ChangeCollectionView view)
|
|
|
|
{
|
|
|
|
var menu = vm.CreateChangeContextMenu();
|
2024-11-03 23:31:55 -08:00
|
|
|
menu?.Open(view);
|
2024-06-11 00:30:06 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
e.Handled = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
private void OnPressedSHA(object sender, PointerPressedEventArgs e)
|
|
|
|
{
|
|
|
|
if (DataContext is ViewModels.BranchCompare vm && sender is TextBlock block)
|
|
|
|
vm.NavigateTo(block.Text);
|
|
|
|
|
|
|
|
e.Handled = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|