From 767cdc1f6f6a63ce997fc9476911e2c361f9d402 Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Wed, 20 Feb 2013 20:33:05 -0500 Subject: Pushing missing changes --- .../DisplayPreferencesMenu.xaml.cs | 92 ++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/DisplayPreferencesMenu.xaml.cs (limited to 'MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/DisplayPreferencesMenu.xaml.cs') diff --git a/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/DisplayPreferencesMenu.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/DisplayPreferencesMenu.xaml.cs new file mode 100644 index 000000000..04e65cd42 --- /dev/null +++ b/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/DisplayPreferencesMenu.xaml.cs @@ -0,0 +1,92 @@ +using MediaBrowser.UI.Controls; +using MediaBrowser.UI.Pages; +using System.Windows; + +namespace MediaBrowser.Plugins.DefaultTheme.DisplayPreferences +{ + /// + /// Interaction logic for DisplayPreferencesMenu.xaml + /// + public partial class DisplayPreferencesMenu : BaseModalWindow + { + /// + /// Gets or sets the main page. + /// + /// The main page. + public BaseListPage MainPage { get; set; } + /// + /// Gets or sets the folder id. + /// + /// The folder id. + public string FolderId { get; set; } + + /// + /// Initializes a new instance of the class. + /// + public DisplayPreferencesMenu() + { + InitializeComponent(); + + btnClose.Click += btnClose_Click; + } + + /// + /// Handles the Click event of the btnClose control. + /// + /// The source of the event. + /// The instance containing the event data. + void btnClose_Click(object sender, RoutedEventArgs e) + { + CloseModal(); + } + + /// + /// Closes the modal. + /// + protected override void CloseModal() + { + if (PageFrame.CanGoBack) + { + PageFrame.GoBackWithTransition(); + } + else + { + base.CloseModal(); + } + } + + /// + /// Called when [loaded]. + /// + protected override void OnLoaded() + { + base.OnLoaded(); + + PageFrame.Navigate(new MainPage { DisplayPreferencesWindow = this }); + } + + /// + /// Navigates to view menu. + /// + public void NavigateToViewMenu() + { + PageFrame.NavigateWithTransition(new ViewMenuPage { DisplayPreferencesWindow = this }); + } + + /// + /// Navigates to index menu. + /// + public void NavigateToIndexMenu() + { + PageFrame.NavigateWithTransition(new IndexMenuPage { DisplayPreferencesWindow = this }); + } + + /// + /// Navigates to sort menu. + /// + public void NavigateToSortMenu() + { + PageFrame.NavigateWithTransition(new SortMenuPage { DisplayPreferencesWindow = this }); + } + } +} -- cgit v1.2.3