Skip to content

Commit

Permalink
Replaced one line functions with lambda operator
Browse files Browse the repository at this point in the history
  • Loading branch information
Plextora committed Nov 11, 2022
1 parent 1d65bd6 commit aa56d5f
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions EvadeKeystrokes.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,11 @@ public static IEnumerable<T> FindVisualChildren<T>(DependencyObject depObj) wher
}
}

private void WindowClose(object sender, System.ComponentModel.CancelEventArgs e)
{
Unsubscribe();
}
private void WindowClose(object sender, System.ComponentModel.CancelEventArgs e) => Unsubscribe();

private void ActivateButton(Button buttonName)
{
buttonName.Background = PressedBackgroundValue;
}
private void ActivateButton(Button buttonName) => buttonName.Background = PressedBackgroundValue;

private void DeactivateButton(Button buttonName)
{
buttonName.Background = BackgroundValue;
}
private void DeactivateButton(Button buttonName) => buttonName.Background = BackgroundValue;

public void Subscribe()
{
Expand Down Expand Up @@ -196,9 +187,6 @@ public void Unsubscribe()
m_GlobalHook.Dispose();
}

private void WindowMove(object sender, MouseButtonEventArgs e)
{
DragMove();
}
private void WindowMove(object sender, MouseButtonEventArgs e) => DragMove();
}
}

0 comments on commit aa56d5f

Please sign in to comment.