CSGO-Projects/ConfigManagerV2/ConfigManagerV2/Themes/ColourfulLightTheme.xaml.cs
MathiasL 3d99b1f68b Migrate to .NET 6.0 and create ConfigManagerV2 project
* Make necessary adjustments to have the same working program
* AssemblyInfo is not set via the file anymore, but the csproj file or in the project settings under Package->General (AssemblyVersion is the one displayed in the Help window)
* Add null-forgiving operators etc. for new language version
* Move stuff that is shared between the DamageCalculator and ConfigManagerV2 into its separate project
2022-03-25 19:55:14 +01:00

33 lines
1.2 KiB
C#

using System.Windows;
namespace REghZyFramework.Themes
{
public partial class ColourfulLightTheme
{
private void CloseWindow_Event(object sender, RoutedEventArgs e)
{
if (e.Source != null)
try { CloseWind(Window.GetWindow((FrameworkElement)e.Source)); } catch { }
}
private void AutoMinimize_Event(object sender, RoutedEventArgs e)
{
if (e.Source != null)
try { MaximizeRestore(Window.GetWindow((FrameworkElement)e.Source)); } catch { }
}
private void Minimize_Event(object sender, RoutedEventArgs e)
{
if (e.Source != null)
try { MinimizeWind(Window.GetWindow((FrameworkElement)e.Source)); } catch { }
}
public void CloseWind(Window window) => window.Close();
public void MaximizeRestore(Window window)
{
if (window.WindowState == WindowState.Maximized)
window.WindowState = WindowState.Normal;
else if (window.WindowState == WindowState.Normal)
window.WindowState = WindowState.Maximized;
}
public void MinimizeWind(Window window) => window.WindowState = WindowState.Minimized;
}
}