mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
fix: drag window won't stop (#326)
This commit is contained in:
parent
2e433aa278
commit
1d15c4c95f
10 changed files with 36 additions and 158 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue