mirror of
https://github.com/MathiasLui/CSGO-Projects.git
synced 2025-05-06 22:01:18 +00:00

* 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
33 lines
1.2 KiB
C#
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;
|
|
}
|
|
}
|