diff options
| author | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-20 20:33:05 -0500 |
|---|---|---|
| committer | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-20 20:33:05 -0500 |
| commit | 767cdc1f6f6a63ce997fc9476911e2c361f9d402 (patch) | |
| tree | 49add55976f895441167c66cfa95e5c7688d18ce /MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/DisplayPreferencesMenu.xaml.cs | |
| parent | 845554722efaed872948a9e0f7202e3ef52f1b6e (diff) | |
Pushing missing changes
Diffstat (limited to 'MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/DisplayPreferencesMenu.xaml.cs')
| -rw-r--r-- | MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/DisplayPreferencesMenu.xaml.cs | 92 |
1 files changed, 92 insertions, 0 deletions
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 +{ + /// <summary> + /// Interaction logic for DisplayPreferencesMenu.xaml + /// </summary> + public partial class DisplayPreferencesMenu : BaseModalWindow + { + /// <summary> + /// Gets or sets the main page. + /// </summary> + /// <value>The main page.</value> + public BaseListPage MainPage { get; set; } + /// <summary> + /// Gets or sets the folder id. + /// </summary> + /// <value>The folder id.</value> + public string FolderId { get; set; } + + /// <summary> + /// Initializes a new instance of the <see cref="DisplayPreferencesMenu" /> class. + /// </summary> + public DisplayPreferencesMenu() + { + InitializeComponent(); + + btnClose.Click += btnClose_Click; + } + + /// <summary> + /// Handles the Click event of the btnClose control. + /// </summary> + /// <param name="sender">The source of the event.</param> + /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param> + void btnClose_Click(object sender, RoutedEventArgs e) + { + CloseModal(); + } + + /// <summary> + /// Closes the modal. + /// </summary> + protected override void CloseModal() + { + if (PageFrame.CanGoBack) + { + PageFrame.GoBackWithTransition(); + } + else + { + base.CloseModal(); + } + } + + /// <summary> + /// Called when [loaded]. + /// </summary> + protected override void OnLoaded() + { + base.OnLoaded(); + + PageFrame.Navigate(new MainPage { DisplayPreferencesWindow = this }); + } + + /// <summary> + /// Navigates to view menu. + /// </summary> + public void NavigateToViewMenu() + { + PageFrame.NavigateWithTransition(new ViewMenuPage { DisplayPreferencesWindow = this }); + } + + /// <summary> + /// Navigates to index menu. + /// </summary> + public void NavigateToIndexMenu() + { + PageFrame.NavigateWithTransition(new IndexMenuPage { DisplayPreferencesWindow = this }); + } + + /// <summary> + /// Navigates to sort menu. + /// </summary> + public void NavigateToSortMenu() + { + PageFrame.NavigateWithTransition(new SortMenuPage { DisplayPreferencesWindow = this }); + } + } +} |
