mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-24 01:34:45 +03:00
Adding the UI to the same repo. Made some default theme progress
This commit is contained in:
parent
d8c01ded6e
commit
119dfc3ac7
50
MediaBrowser.UI/Controls/WindowCommands.xaml.cs
Normal file
50
MediaBrowser.UI/Controls/WindowCommands.xaml.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace MediaBrowser.UI.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for WindowCommands.xaml
|
||||
/// </summary>
|
||||
public partial class WindowCommands : UserControl
|
||||
{
|
||||
public Window ParentWindow
|
||||
{
|
||||
get { return TreeHelper.TryFindParent<Window>(this); }
|
||||
}
|
||||
|
||||
public WindowCommands()
|
||||
{
|
||||
InitializeComponent();
|
||||
Loaded += WindowCommandsLoaded;
|
||||
}
|
||||
|
||||
void WindowCommandsLoaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
CloseApplicationButton.Click += CloseApplicationButtonClick;
|
||||
MinimizeApplicationButton.Click += MinimizeApplicationButtonClick;
|
||||
MaximizeApplicationButton.Click += MaximizeApplicationButtonClick;
|
||||
UndoMaximizeApplicationButton.Click += UndoMaximizeApplicationButtonClick;
|
||||
}
|
||||
|
||||
void UndoMaximizeApplicationButtonClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ParentWindow.WindowState = WindowState.Normal;
|
||||
}
|
||||
|
||||
void MaximizeApplicationButtonClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ParentWindow.WindowState = WindowState.Maximized;
|
||||
}
|
||||
|
||||
void MinimizeApplicationButtonClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ParentWindow.WindowState = WindowState.Minimized;
|
||||
}
|
||||
|
||||
void CloseApplicationButtonClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ParentWindow.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user