fix: drag window won't stop (#326)

This commit is contained in:
leo 2024-08-06 15:12:44 +08:00
parent 2e433aa278
commit 1d15c4c95f
No known key found for this signature in database
10 changed files with 36 additions and 158 deletions

View file

@ -11,31 +11,31 @@ namespace SourceGit.Views
InitializeComponent();
}
private void MinimizeWindow(object _1, RoutedEventArgs _2)
private void MinimizeWindow(object _, RoutedEventArgs e)
{
var window = this.FindAncestorOfType<Window>();
if (window != null)
{
window.WindowState = WindowState.Minimized;
}
e.Handled = true;
}
private void MaximizeOrRestoreWindow(object _1, RoutedEventArgs _2)
private void MaximizeOrRestoreWindow(object _, RoutedEventArgs e)
{
var window = this.FindAncestorOfType<Window>();
if (window != null)
{
window.WindowState = window.WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized;
}
e.Handled = true;
}
private void CloseWindow(object _1, RoutedEventArgs _2)
private void CloseWindow(object _, RoutedEventArgs e)
{
var window = this.FindAncestorOfType<Window>();
if (window != null)
{
window.Close();
}
e.Handled = true;
}
}
}