From 17c1fd576057bdd2d6aea517d733fe8af6e6b2ba Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Sat, 23 Feb 2013 10:58:08 -0500 Subject: moved ui to it's own repo --- MediaBrowser.UI/Controls/WindowCommands.xaml.cs | 82 ------------------------- 1 file changed, 82 deletions(-) delete mode 100644 MediaBrowser.UI/Controls/WindowCommands.xaml.cs (limited to 'MediaBrowser.UI/Controls/WindowCommands.xaml.cs') diff --git a/MediaBrowser.UI/Controls/WindowCommands.xaml.cs b/MediaBrowser.UI/Controls/WindowCommands.xaml.cs deleted file mode 100644 index e285cced1..000000000 --- a/MediaBrowser.UI/Controls/WindowCommands.xaml.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System.Windows; -using System.Windows.Controls; - -namespace MediaBrowser.UI.Controls -{ - /// - /// Interaction logic for WindowCommands.xaml - /// - public partial class WindowCommands : UserControl - { - /// - /// Gets the parent window. - /// - /// The parent window. - public Window ParentWindow - { - get { return TreeHelper.TryFindParent(this); } - } - - /// - /// Initializes a new instance of the class. - /// - public WindowCommands() - { - InitializeComponent(); - Loaded += WindowCommandsLoaded; - } - - /// - /// Windows the commands loaded. - /// - /// The sender. - /// The instance containing the event data. - void WindowCommandsLoaded(object sender, RoutedEventArgs e) - { - CloseApplicationButton.Click += CloseApplicationButtonClick; - MinimizeApplicationButton.Click += MinimizeApplicationButtonClick; - MaximizeApplicationButton.Click += MaximizeApplicationButtonClick; - UndoMaximizeApplicationButton.Click += UndoMaximizeApplicationButtonClick; - } - - /// - /// Undoes the maximize application button click. - /// - /// The sender. - /// The instance containing the event data. - void UndoMaximizeApplicationButtonClick(object sender, RoutedEventArgs e) - { - ParentWindow.WindowState = WindowState.Normal; - } - - /// - /// Maximizes the application button click. - /// - /// The sender. - /// The instance containing the event data. - void MaximizeApplicationButtonClick(object sender, RoutedEventArgs e) - { - ParentWindow.WindowState = WindowState.Maximized; - } - - /// - /// Minimizes the application button click. - /// - /// The sender. - /// The instance containing the event data. - void MinimizeApplicationButtonClick(object sender, RoutedEventArgs e) - { - ParentWindow.WindowState = WindowState.Minimized; - } - - /// - /// Closes the application button click. - /// - /// The sender. - /// The instance containing the event data. - void CloseApplicationButtonClick(object sender, RoutedEventArgs e) - { - App.Instance.Shutdown(); - } - } -} -- cgit v1.2.3