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 --- .../DisplayPreferences/MainPage.xaml.cs | 118 --------------------- 1 file changed, 118 deletions(-) delete mode 100644 MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/MainPage.xaml.cs (limited to 'MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/MainPage.xaml.cs') diff --git a/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/MainPage.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/MainPage.xaml.cs deleted file mode 100644 index ffe269f77..000000000 --- a/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/MainPage.xaml.cs +++ /dev/null @@ -1,118 +0,0 @@ -using MediaBrowser.Model.Entities; -using System.Windows; - -namespace MediaBrowser.Plugins.DefaultTheme.DisplayPreferences -{ - /// - /// Interaction logic for MainPage.xaml - /// - public partial class MainPage : BaseDisplayPreferencesPage - { - /// - /// Initializes a new instance of the class. - /// - public MainPage() - { - InitializeComponent(); - - btnScroll.Click += btnScroll_Click; - btnIncrease.Click += btnIncrease_Click; - btnDecrease.Click += btnDecrease_Click; - ViewMenuButton.Click += ViewMenuButton_Click; - SortMenuButton.Click += SortMenuButton_Click; - IndexMenuButton.Click += IndexMenuButton_Click; - } - - /// - /// Handles the Click event of the IndexMenuButton control. - /// - /// The source of the event. - /// The instance containing the event data. - void IndexMenuButton_Click(object sender, RoutedEventArgs e) - { - DisplayPreferencesWindow.NavigateToIndexMenu(); - } - - /// - /// Handles the Click event of the SortMenuButton control. - /// - /// The source of the event. - /// The instance containing the event data. - void SortMenuButton_Click(object sender, RoutedEventArgs e) - { - DisplayPreferencesWindow.NavigateToSortMenu(); - } - - /// - /// Called when [loaded]. - /// - protected override void OnLoaded() - { - base.OnLoaded(); - - UpdateFields(); - } - - /// - /// Handles the Click event of the ViewMenuButton control. - /// - /// The source of the event. - /// The instance containing the event data. - void ViewMenuButton_Click(object sender, RoutedEventArgs e) - { - DisplayPreferencesWindow.NavigateToViewMenu(); - } - - /// - /// Handles the Click event of the btnDecrease control. - /// - /// The source of the event. - /// The instance containing the event data. - void btnDecrease_Click(object sender, RoutedEventArgs e) - { - MainPage.DisplayPreferences.DecreaseImageSize(); - MainPage.NotifyDisplayPreferencesChanged(); - } - - /// - /// Handles the Click event of the btnIncrease control. - /// - /// The source of the event. - /// The instance containing the event data. - void btnIncrease_Click(object sender, RoutedEventArgs e) - { - MainPage.DisplayPreferences.IncreaseImageSize(); - MainPage.NotifyDisplayPreferencesChanged(); - } - - /// - /// Handles the Click event of the btnScroll control. - /// - /// The source of the event. - /// The instance containing the event data. - void btnScroll_Click(object sender, RoutedEventArgs e) - { - MainPage.DisplayPreferences.ScrollDirection = MainPage.DisplayPreferences.ScrollDirection == ScrollDirection.Horizontal - ? ScrollDirection.Vertical - : ScrollDirection.Horizontal; - - MainPage.NotifyDisplayPreferencesChanged(); - - UpdateFields(); - } - - /// - /// Updates the fields. - /// - private void UpdateFields() - { - var displayPreferences = MainPage.DisplayPreferences; - - btnScroll.Visibility = displayPreferences.ViewType == ViewTypes.Poster - ? Visibility.Visible - : Visibility.Collapsed; - - txtScrollDirection.Text = displayPreferences.ScrollDirection == ScrollDirection.Horizontal ? "Scroll: Horizontal" : "Scroll: Vertical"; - } - } -} -- cgit v1.2.3