mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-26 21:17:20 -08:00
9e048751ae
* ViewModels.MergeMode -> Models.MergeMode * ViewModels.Notification -> Models.Notification * ViewModels.ResetMode -> Models.ResetMode * use `int` instead of `ViewModels.CountSelectedCommits`
44 lines
1.1 KiB
C#
44 lines
1.1 KiB
C#
using Avalonia.Controls;
|
|
using Avalonia.Input;
|
|
using Avalonia.Interactivity;
|
|
|
|
namespace SourceGit.Views
|
|
{
|
|
public partial class LauncherPage : UserControl
|
|
{
|
|
public LauncherPage()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void OnPopupSure(object _, RoutedEventArgs e)
|
|
{
|
|
if (DataContext is ViewModels.LauncherPage page)
|
|
page.ProcessPopup();
|
|
|
|
e.Handled = true;
|
|
}
|
|
|
|
private void OnPopupCancel(object _, RoutedEventArgs e)
|
|
{
|
|
if (DataContext is ViewModels.LauncherPage page)
|
|
page.CancelPopup();
|
|
|
|
e.Handled = true;
|
|
}
|
|
|
|
private void OnPopupCancelByClickMask(object sender, PointerPressedEventArgs e)
|
|
{
|
|
OnPopupCancel(sender, e);
|
|
}
|
|
|
|
private void OnDismissNotification(object sender, RoutedEventArgs e)
|
|
{
|
|
if (sender is Button { DataContext: Models.Notification notice } &&
|
|
DataContext is ViewModels.LauncherPage page)
|
|
page.Notifications.Remove(notice);
|
|
|
|
e.Handled = true;
|
|
}
|
|
}
|
|
}
|