Group header actions and restore refresh/close button behavior
This commit is contained in:
@@ -1478,6 +1478,16 @@ namespace C4IT_CustomerPanel
|
||||
HideMainForm();
|
||||
}
|
||||
|
||||
private void OnRefreshButtonClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
OnRefreshClicked(sender, null);
|
||||
}
|
||||
|
||||
private void OnMinimizeButtonClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
OnMinimizeClicked(sender, null);
|
||||
}
|
||||
|
||||
private void OnNotifierMenuClicked(object sender, EventArgs e)
|
||||
{
|
||||
if (!(sender is ToolStripMenuItem menuItem))
|
||||
@@ -1606,6 +1616,9 @@ namespace C4IT_CustomerPanel
|
||||
|
||||
private void GridTop_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (e.OriginalSource is DependencyObject source && FindVisualParent<Button>(source) != null)
|
||||
return;
|
||||
|
||||
if (e.ChangedButton == MouseButton.Left && ConfigSettings.GetConfig()._isDraggable)
|
||||
this.DragMove();
|
||||
}
|
||||
@@ -1633,6 +1646,19 @@ namespace C4IT_CustomerPanel
|
||||
}
|
||||
}
|
||||
|
||||
private static T FindVisualParent<T>(DependencyObject source) where T : DependencyObject
|
||||
{
|
||||
while (source != null)
|
||||
{
|
||||
if (source is T target)
|
||||
return target;
|
||||
|
||||
source = VisualTreeHelper.GetParent(source);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void App_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (((Keyboard.Modifiers & ModifierKeys.Alt) == ModifierKeys.Alt) && Keyboard.IsKeyDown(Key.R) && ConfigSettings.GetConfig()._isDraggable)
|
||||
|
||||
Reference in New Issue
Block a user