aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukePulverenti <luke.pulverenti@gmail.com>2013-02-23 10:58:08 -0500
committerLukePulverenti <luke.pulverenti@gmail.com>2013-02-23 10:58:08 -0500
commit17c1fd576057bdd2d6aea517d733fe8af6e6b2ba (patch)
tree660f47e816a8599aabdb7ee47f3cde64c72c3f4d
parent33ed929b526acbda696f00f5966917ebd6a9ded2 (diff)
moved ui to it's own repo
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Controls/BaseItemTile.xaml23
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Controls/BaseItemTile.xaml.cs177
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Controls/Details/BaseDetailsControl.cs44
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemChapters.xaml23
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemChapters.xaml.cs67
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemGallery.xaml23
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemGallery.xaml.cs163
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemMediaInfo.xaml22
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemMediaInfo.xaml.cs49
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemOverview.xaml68
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemOverview.xaml.cs109
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemPerformers.xaml23
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemPerformers.xaml.cs72
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemSpecialFeatures.xaml23
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemSpecialFeatures.xaml.cs77
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemTrailers.xaml23
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemTrailers.xaml.cs82
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Controls/Details/MediaStreamControl.xaml18
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Controls/Details/MediaStreamControl.xaml.cs142
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Controls/HomePageTile.xaml22
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Controls/HomePageTile.xaml.cs128
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Controls/MultiItemTile.xaml30
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Controls/MultiItemTile.xaml.cs219
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Converters/WeatherImageConverter.cs48
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/BaseDisplayPreferencesPage.cs25
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/DisplayPreferencesMenu.xaml47
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/DisplayPreferencesMenu.xaml.cs92
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/IndexMenuPage.xaml21
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/IndexMenuPage.xaml.cs95
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/MainPage.xaml54
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/MainPage.xaml.cs118
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/SortMenuPage.xaml21
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/SortMenuPage.xaml.cs95
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/ViewMenuPage.xaml30
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/ViewMenuPage.xaml.cs94
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/MediaBrowser.Plugins.DefaultTheme.csproj354
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Model/VirtualCollection.cs90
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Pages/DetailPage.xaml102
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Pages/DetailPage.xaml.cs268
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Pages/HomePage.xaml69
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Pages/HomePage.xaml.cs442
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Pages/InternalPlayerPage.xaml14
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Pages/InternalPlayerPage.xaml.cs41
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Pages/ListPage.xaml74
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Pages/ListPage.xaml.cs545
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Pages/LoginPage.xaml34
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Pages/LoginPage.xaml.cs43
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Pages/WeatherPage.xaml13
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Pages/WeatherPage.xaml.cs15
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Properties/AssemblyInfo.cs53
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Properties/DesignTimeResources.xaml5
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Properties/Resources.Designer.cs62
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Properties/Resources.resx117
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Properties/Settings.Designer.cs30
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Properties/Settings.settings7
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/AppResources.cs223
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/AppResources.xaml617
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/AudioDefault.pngbin4525 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/ChapterDefault.pngbin4323 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/CurrentUserDefault.pngbin818 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/DislikeOverlay.pngbin1161 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/FavoriteOverlay.pngbin1264 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/LikeOverlay.pngbin1145 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/NowPlayingButton.pngbin491 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/SearchButton.pngbin957 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/SettingsButton.pngbin1063 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/UserLoginDefault.pngbin8360 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/VideoDefault.pngbin2998 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewButton.pngbin650 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Close.pngbin499 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Decrease.pngbin541 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Increase.pngbin472 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Index.pngbin484 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Scroll.pngbin416 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Sort.pngbin654 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/View.pngbin531 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/Watched.pngbin1253 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Cloudy.pngbin650 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Overcast.pngbin1050 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/PartlyCloudy.pngbin943 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Rain.pngbin902 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Snow.pngbin1067 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Sunny.pngbin1181 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Thunder.pngbin949 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/starEmpty.pngbin1799 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/starFull.pngbin2498 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Resources/Images/starHalf.pngbin2020 -> 0 bytes
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/Theme.cs81
-rw-r--r--MediaBrowser.Plugins.DefaultTheme/app.config11
-rw-r--r--MediaBrowser.UI.Controls/BaseModalWindow.cs62
-rw-r--r--MediaBrowser.UI.Controls/BaseUserControl.cs21
-rw-r--r--MediaBrowser.UI.Controls/BaseWindow.cs175
-rw-r--r--MediaBrowser.UI.Controls/ExtendedButton.cs49
-rw-r--r--MediaBrowser.UI.Controls/ExtendedCheckbox.cs49
-rw-r--r--MediaBrowser.UI.Controls/ExtendedListBox.cs260
-rw-r--r--MediaBrowser.UI.Controls/ExtendedRadioButton.cs49
-rw-r--r--MediaBrowser.UI.Controls/ExtendedScrollViewer.cs41
-rw-r--r--MediaBrowser.UI.Controls/ItemEventArgs.cs17
-rw-r--r--MediaBrowser.UI.Controls/MediaBrowser.UI.Controls.csproj110
-rw-r--r--MediaBrowser.UI.Controls/Properties/AssemblyInfo.cs55
-rw-r--r--MediaBrowser.UI.Controls/Properties/Resources.Designer.cs62
-rw-r--r--MediaBrowser.UI.Controls/Properties/Resources.resx117
-rw-r--r--MediaBrowser.UI.Controls/Properties/Settings.Designer.cs30
-rw-r--r--MediaBrowser.UI.Controls/Properties/Settings.settings7
-rw-r--r--MediaBrowser.UI.Controls/ScrollingPanel.cs404
-rw-r--r--MediaBrowser.UI.Controls/Themes/Generic.xaml17
-rw-r--r--MediaBrowser.UI.Controls/TransitionControl.cs147
-rw-r--r--MediaBrowser.UI.Controls/TransitionFrame.cs194
-rw-r--r--MediaBrowser.UI.Controls/TreeHelper.cs321
-rw-r--r--MediaBrowser.UI.Controls/VirtualizingWrapPanel.cs735
-rw-r--r--MediaBrowser.UI.Uninstall/App.config6
-rw-r--r--MediaBrowser.UI.Uninstall/Globals.cs24
-rw-r--r--MediaBrowser.UI.Uninstall/MediaBrowser.UI.Uninstall.csproj68
-rw-r--r--MediaBrowser.UI.Uninstall/Program.cs30
-rw-r--r--MediaBrowser.UI.Uninstall/Properties/AssemblyInfo.cs36
-rw-r--r--MediaBrowser.UI.sln150
-rw-r--r--MediaBrowser.UI/App.config28
-rw-r--r--MediaBrowser.UI/App.xaml15
-rw-r--r--MediaBrowser.UI/App.xaml.cs1098
-rw-r--r--MediaBrowser.UI/Configuration/PlayerConfiguration.cs52
-rw-r--r--MediaBrowser.UI/Configuration/UIApplicationConfiguration.cs72
-rw-r--r--MediaBrowser.UI/Configuration/UIApplicationPaths.cs37
-rw-r--r--MediaBrowser.UI/Controller/BaseTheme.cs60
-rw-r--r--MediaBrowser.UI/Controller/PluginUpdater.cs313
-rw-r--r--MediaBrowser.UI/Controller/UIKernel.cs181
-rw-r--r--MediaBrowser.UI/Controls/ModalWindow.xaml67
-rw-r--r--MediaBrowser.UI/Controls/ModalWindow.xaml.cs180
-rw-r--r--MediaBrowser.UI/Controls/NavigationBar.xaml55
-rw-r--r--MediaBrowser.UI/Controls/NavigationBar.xaml.cs318
-rw-r--r--MediaBrowser.UI/Controls/NotificationMessage.xaml33
-rw-r--r--MediaBrowser.UI/Controls/NotificationMessage.xaml.cs68
-rw-r--r--MediaBrowser.UI/Controls/WindowCommands.xaml100
-rw-r--r--MediaBrowser.UI/Controls/WindowCommands.xaml.cs82
-rw-r--r--MediaBrowser.UI/Converters/BaseItemImageVisibilityConverter.cs75
-rw-r--r--MediaBrowser.UI/Converters/CurrentUserVisibilityConverter.cs26
-rw-r--r--MediaBrowser.UI/Converters/DateTimeToStringConverter.cs41
-rw-r--r--MediaBrowser.UI/Converters/LastSeenTextConverter.cs86
-rw-r--r--MediaBrowser.UI/Converters/MetroTileBackgroundConverter.cs51
-rw-r--r--MediaBrowser.UI/Converters/UserImageConverter.cs97
-rw-r--r--MediaBrowser.UI/Converters/WatchedVisibilityConverter.cs117
-rw-r--r--MediaBrowser.UI/Converters/WeatherTemperatureConverter.cs31
-rw-r--r--MediaBrowser.UI/Converters/WeatherVisibilityConverter.cs20
-rw-r--r--MediaBrowser.UI/Extensions/Extensions.cs26
-rw-r--r--MediaBrowser.UI/HiddenWindow.xaml9
-rw-r--r--MediaBrowser.UI/HiddenWindow.xaml.cs31
-rw-r--r--MediaBrowser.UI/ImageViewerWindow.xaml9
-rw-r--r--MediaBrowser.UI/ImageViewerWindow.xaml.cs41
-rw-r--r--MediaBrowser.UI/MainWindow.xaml55
-rw-r--r--MediaBrowser.UI/MainWindow.xaml.cs507
-rw-r--r--MediaBrowser.UI/MediaBrowser.UI.csproj1330
-rw-r--r--MediaBrowser.UI/MediaBrowser.UI_TemporaryKey.pfxbin1676 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Pages/BaseDetailPage.cs159
-rw-r--r--MediaBrowser.UI/Pages/BaseFolderPage.cs502
-rw-r--r--MediaBrowser.UI/Pages/BaseHomePage.cs17
-rw-r--r--MediaBrowser.UI/Pages/BaseInternalPlayerPage.cs49
-rw-r--r--MediaBrowser.UI/Pages/BaseListPage.cs204
-rw-r--r--MediaBrowser.UI/Pages/BaseLoginPage.cs119
-rw-r--r--MediaBrowser.UI/Pages/BasePage.cs71
-rw-r--r--MediaBrowser.UI/Pages/BaseWeatherPage.cs7
-rw-r--r--MediaBrowser.UI/Pages/SettingsPage.xaml16
-rw-r--r--MediaBrowser.UI/Pages/SettingsPage.xaml.cs14
-rw-r--r--MediaBrowser.UI/Playback/BaseMediaPlayer.cs747
-rw-r--r--MediaBrowser.UI/Playback/ExternalPlayer/BaseExternalPlayer.cs243
-rw-r--r--MediaBrowser.UI/Playback/ExternalPlayer/GenericExternalPlayer.cs35
-rw-r--r--MediaBrowser.UI/Playback/InternalPlayer/BaseInternalMediaPlayer.cs54
-rw-r--r--MediaBrowser.UI/Playback/NVlc/InternalMediaPlayerNVlc.cs426
-rw-r--r--MediaBrowser.UI/Playback/PlayOptions.cs89
-rw-r--r--MediaBrowser.UI/Playback/PlayState.cs24
-rw-r--r--MediaBrowser.UI/Playback/PlaybackEventArgs.cs49
-rw-r--r--MediaBrowser.UI/Playback/PlaybackManager.cs301
-rw-r--r--MediaBrowser.UI/Properties/AssemblyInfo.cs52
-rw-r--r--MediaBrowser.UI/Properties/Resources.Designer.cs71
-rw-r--r--MediaBrowser.UI/Properties/Resources.resx117
-rw-r--r--MediaBrowser.UI/Properties/Settings.Designer.cs30
-rw-r--r--MediaBrowser.UI/Properties/Settings.settings7
-rw-r--r--MediaBrowser.UI/Resources/AppResources.xaml383
-rw-r--r--MediaBrowser.UI/Resources/Images/Icon.icobin137409 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/Images/MessageBox/Asterisk.pngbin1046 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/Images/MessageBox/Error.pngbin804 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/Images/MessageBox/Exclamation.pngbin804 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/Images/MessageBox/Hand.pngbin671 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/Images/MessageBox/Information.pngbin929 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/Images/MessageBox/Question.pngbin770 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/Images/MessageBox/Stop.pngbin978 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/Images/MessageBox/Warning.pngbin896 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/Images/NavBar/BackButton.pngbin1089 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/Images/NavBar/MediaBack.pngbin1224 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/Images/NavBar/MediaFastForward.pngbin1258 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/Images/NavBar/MediaForward.pngbin1197 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/Images/NavBar/MediaRewind.pngbin1265 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/Images/NavBar/MuteButton.pngbin1230 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/Images/NavBar/PauseButton.pngbin1056 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/Images/NavBar/PlayButton.pngbin1177 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/Images/NavBar/StopButton.pngbin1041 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/Images/NavBar/VolumeDownButton.pngbin1091 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/Images/NavBar/VolumeUpButton.pngbin1128 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/Images/mblogoblack.pngbin15432 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/Images/mblogoblackfull.pngbin59905 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/Images/mblogowhite.pngbin15487 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/Images/mblogowhitefull.pngbin59826 -> 0 bytes
-rw-r--r--MediaBrowser.UI/Resources/MainWindowResources.xaml58
-rw-r--r--MediaBrowser.UI/Resources/ModalMessage.xaml136
-rw-r--r--MediaBrowser.UI/Resources/NavBarResources.xaml149
-rw-r--r--MediaBrowser.UI/Resources/NotificationMessage.xaml43
-rw-r--r--MediaBrowser.UI/UserInput/KeyboardListener.cs210
-rw-r--r--MediaBrowser.UI/ViewModels/BaseItemPersonViewModel.cs27
-rw-r--r--MediaBrowser.UI/ViewModels/BaseViewModel.cs27
-rw-r--r--MediaBrowser.UI/ViewModels/ChapterInfoDtoViewModel.cs182
-rw-r--r--MediaBrowser.UI/ViewModels/DtoBaseItemViewModel.cs183
-rw-r--r--MediaBrowser.UI/ViewModels/ItemCollectionViewModel.cs158
-rw-r--r--MediaBrowser.UI/ViewModels/SpecialFeatureViewModel.cs135
-rw-r--r--MediaBrowser.UI/packages.config7
-rw-r--r--MediaBrowser.UI/plugins/codec/libavcodec_plugin.dll.REMOVED.git-id1
-rw-r--r--MediaBrowser.UI/plugins/gui/libqt4_plugin.dll.REMOVED.git-id1
214 files changed, 0 insertions, 19327 deletions
diff --git a/MediaBrowser.Plugins.DefaultTheme/Controls/BaseItemTile.xaml b/MediaBrowser.Plugins.DefaultTheme/Controls/BaseItemTile.xaml
deleted file mode 100644
index a66b1c403..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Controls/BaseItemTile.xaml
+++ /dev/null
@@ -1,23 +0,0 @@
-<controls:BaseUserControl x:Class="MediaBrowser.Plugins.DefaultTheme.Controls.BaseItemTile"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300">
-
- <Grid x:Name="mainGrid" HorizontalAlignment="Center">
-
- <Border x:Name="border">
- <Image x:Name="image" Stretch="Uniform"></Image>
- </Border>
-
- <Grid HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
- <Grid.Background>
- <SolidColorBrush Color="#A6000000"></SolidColorBrush>
- </Grid.Background>
- <TextBlock x:Name="txtName" Margin="10 5 0 10" Foreground="White" TextWrapping="Wrap" Style="{StaticResource TextBlockStyle}"></TextBlock>
- </Grid>
- </Grid>
-</controls:BaseUserControl>
diff --git a/MediaBrowser.Plugins.DefaultTheme/Controls/BaseItemTile.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/Controls/BaseItemTile.xaml.cs
deleted file mode 100644
index 690a539f8..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Controls/BaseItemTile.xaml.cs
+++ /dev/null
@@ -1,177 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Net;
-using MediaBrowser.UI;
-using MediaBrowser.UI.Controls;
-using MediaBrowser.UI.Converters;
-using MediaBrowser.UI.ViewModels;
-using System;
-using System.ComponentModel;
-using System.Windows;
-
-namespace MediaBrowser.Plugins.DefaultTheme.Controls
-{
- /// <summary>
- /// Interaction logic for BaseItemTile.xaml
- /// </summary>
- public partial class BaseItemTile : BaseUserControl
- {
- /// <summary>
- /// Gets the view model.
- /// </summary>
- /// <value>The view model.</value>
- public DtoBaseItemViewModel ViewModel
- {
- get { return DataContext as DtoBaseItemViewModel; }
- }
-
- /// <summary>
- /// Gets the item.
- /// </summary>
- /// <value>The item.</value>
- private BaseItemDto Item
- {
- get { return ViewModel.Item; }
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="BaseItemTile" /> class.
- /// </summary>
- public BaseItemTile()
- {
- InitializeComponent();
-
- DataContextChanged += BaseItemTile_DataContextChanged;
- Loaded += BaseItemTile_Loaded;
- Unloaded += BaseItemTile_Unloaded;
- }
-
- /// <summary>
- /// Handles the Unloaded event of the BaseItemTile 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 BaseItemTile_Unloaded(object sender, RoutedEventArgs e)
- {
- if (ViewModel != null)
- {
- ViewModel.PropertyChanged -= ViewModel_PropertyChanged;
- }
- }
-
- /// <summary>
- /// Handles the Loaded event of the BaseItemTile 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 BaseItemTile_Loaded(object sender, RoutedEventArgs e)
- {
- if (ViewModel != null)
- {
- ViewModel.PropertyChanged -= ViewModel_PropertyChanged;
- ViewModel.PropertyChanged += ViewModel_PropertyChanged;
- }
- }
-
- /// <summary>
- /// Handles the DataContextChanged event of the BaseItemTile control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="DependencyPropertyChangedEventArgs" /> instance containing the event data.</param>
- void BaseItemTile_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
- {
- OnItemChanged();
-
- if (ViewModel != null)
- {
- ViewModel.PropertyChanged -= ViewModel_PropertyChanged;
- ViewModel.PropertyChanged += ViewModel_PropertyChanged;
- }
- }
-
- /// <summary>
- /// Handles the PropertyChanged event of the ViewModel control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="PropertyChangedEventArgs" /> instance containing the event data.</param>
- void ViewModel_PropertyChanged(object sender, PropertyChangedEventArgs e)
- {
- ReloadImage();
- }
-
- /// <summary>
- /// Called when [item changed].
- /// </summary>
- private void OnItemChanged()
- {
- ReloadImage();
-
- var visibility = Item.HasPrimaryImage && !Item.IsType("Episode") ? Visibility.Collapsed : Visibility.Visible;
-
- if (Item.IsType("Person") || Item.IsType("IndexFolder"))
- {
- visibility = Visibility.Visible;
- }
-
- txtName.Visibility = visibility;
-
- var name = Item.Name;
-
- if (Item.IndexNumber.HasValue)
- {
- name = Item.IndexNumber + " - " + name;
- }
-
- txtName.Text = name;
- }
-
- /// <summary>
- /// Reloads the image.
- /// </summary>
- private async void ReloadImage()
- {
- mainGrid.Height = ViewModel.ParentDisplayPreferences.PrimaryImageHeight;
- mainGrid.Width = ViewModel.ParentDisplayPreferences.PrimaryImageWidth;
-
- if (Item.HasPrimaryImage)
- {
- var url = ViewModel.GetImageUrl(ViewModel.ParentDisplayPreferences.PrimaryImageType);
-
- border.Background = null;
-
- try
- {
- image.Source = await App.Instance.GetRemoteBitmapAsync(url);
- }
- catch (HttpException)
- {
- SetDefaultImage();
- }
- }
- else
- {
- SetDefaultImage();
- }
- }
-
- /// <summary>
- /// Sets the default image.
- /// </summary>
- private void SetDefaultImage()
- {
- if (Item.IsAudio || Item.IsType("MusicAlbum") || Item.IsType("MusicArtist"))
- {
- var imageUri = new Uri("../Resources/Images/AudioDefault.png", UriKind.Relative);
-
- border.Background = MetroTileBackgroundConverter.GetRandomBackground();
- image.Source = App.Instance.GetBitmapImage(imageUri);
- }
- else
- {
- var imageUri = new Uri("../Resources/Images/VideoDefault.png", UriKind.Relative);
-
- border.Background = MetroTileBackgroundConverter.GetRandomBackground();
- image.Source = App.Instance.GetBitmapImage(imageUri);
- }
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/BaseDetailsControl.cs b/MediaBrowser.Plugins.DefaultTheme/Controls/Details/BaseDetailsControl.cs
deleted file mode 100644
index 530788aea..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/BaseDetailsControl.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.UI.Controls;
-
-namespace MediaBrowser.Plugins.DefaultTheme.Controls.Details
-{
- /// <summary>
- /// Class BaseDetailsControl
- /// </summary>
- public abstract class BaseDetailsControl : BaseUserControl
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="BaseDetailsControl" /> class.
- /// </summary>
- protected BaseDetailsControl()
- {
- DataContext = this;
- }
-
- /// <summary>
- /// The _item
- /// </summary>
- private BaseItemDto _item;
- /// <summary>
- /// Gets or sets the item.
- /// </summary>
- /// <value>The item.</value>
- public BaseItemDto Item
- {
- get { return _item; }
-
- set
- {
- _item = value;
- OnPropertyChanged("Item");
- OnItemChanged();
- }
- }
-
- /// <summary>
- /// Called when [item changed].
- /// </summary>
- protected abstract void OnItemChanged();
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemChapters.xaml b/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemChapters.xaml
deleted file mode 100644
index 4282316b4..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemChapters.xaml
+++ /dev/null
@@ -1,23 +0,0 @@
-<details:BaseDetailsControl x:Class="MediaBrowser.Plugins.DefaultTheme.Controls.Details.ItemChapters"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:details="clr-namespace:MediaBrowser.Plugins.DefaultTheme.Controls.Details"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300">
- <Grid>
- <controls:ExtendedScrollViewer ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Disabled" CanContentScroll="True">
- <controls:ScrollingPanel CanHorizontallyScroll="True" CanVerticallyScroll="False">
- <controls:ExtendedListBox x:Name="lstItems" HorizontalAlignment="Center" VerticalAlignment="Top" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemTemplate="{StaticResource ItemChaptersTemplate}" Style="{StaticResource ListBoxStyle}" ItemContainerStyle="{StaticResource ListBoxItemStyle}">
- <controls:ExtendedListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Vertical" Margin="50" />
- </ItemsPanelTemplate>
- </controls:ExtendedListBox.ItemsPanel>
- </controls:ExtendedListBox>
- </controls:ScrollingPanel>
- </controls:ExtendedScrollViewer>
- </Grid>
-</details:BaseDetailsControl>
diff --git a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemChapters.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemChapters.xaml.cs
deleted file mode 100644
index d9f40b014..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemChapters.xaml.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.UI.Controller;
-using MediaBrowser.UI.Controls;
-using MediaBrowser.UI.Playback;
-using MediaBrowser.UI.ViewModels;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-
-namespace MediaBrowser.Plugins.DefaultTheme.Controls.Details
-{
- /// <summary>
- /// Interaction logic for ItemChapters.xaml
- /// </summary>
- public partial class ItemChapters : BaseDetailsControl
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="ItemChapters" /> class.
- /// </summary>
- public ItemChapters()
- {
- InitializeComponent();
-
- lstItems.ItemInvoked += lstItems_ItemInvoked;
- }
-
- /// <summary>
- /// LSTs the items_ item invoked.
- /// </summary>
- /// <param name="sender">The sender.</param>
- /// <param name="e">The e.</param>
- void lstItems_ItemInvoked(object sender, ItemEventArgs<object> e)
- {
- var chapterViewModel = (ChapterInfoDtoViewModel) e.Argument;
-
- UIKernel.Instance.PlaybackManager.Play(new PlayOptions
- {
- Items = new List<BaseItemDto> { Item },
- StartPositionTicks = chapterViewModel.Chapter.StartPositionTicks
- });
- }
-
- /// <summary>
- /// Called when [item changed].
- /// </summary>
- protected override void OnItemChanged()
- {
- const double height = 297;
-
- var width = ChapterInfoDtoViewModel.GetChapterImageWidth(Item, height, 528);
-
- var chapters = Item.Chapters ?? new List<ChapterInfoDto> { };
-
- lstItems.ItemsSource = new ObservableCollection<ChapterInfoDtoViewModel>(chapters.Select(i => new ChapterInfoDtoViewModel
- {
- Item = Item,
- Chapter = i,
- ImageWidth = width,
- ImageHeight = height,
- ImageDownloadOptions = new ImageOptions
- {
- MaxHeight = 400
- }
- }));
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemGallery.xaml b/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemGallery.xaml
deleted file mode 100644
index 312742558..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemGallery.xaml
+++ /dev/null
@@ -1,23 +0,0 @@
-<details:BaseDetailsControl x:Class="MediaBrowser.Plugins.DefaultTheme.Controls.Details.ItemGallery"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:details="clr-namespace:MediaBrowser.Plugins.DefaultTheme.Controls.Details"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300">
- <Grid>
- <controls:ExtendedScrollViewer ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Disabled" CanContentScroll="True">
- <controls:ScrollingPanel CanHorizontallyScroll="True" CanVerticallyScroll="False">
- <controls:ExtendedListBox VerticalAlignment="Top" HorizontalAlignment="Center" x:Name="lstItems" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemTemplate="{StaticResource ItemGalleryTemplate}" Style="{StaticResource ListBoxStyle}" ItemContainerStyle="{StaticResource ListBoxItemStyle}">
- <controls:ExtendedListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Vertical" Margin="50" />
- </ItemsPanelTemplate>
- </controls:ExtendedListBox.ItemsPanel>
- </controls:ExtendedListBox>
- </controls:ScrollingPanel>
- </controls:ExtendedScrollViewer>
- </Grid>
-</details:BaseDetailsControl>
diff --git a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemGallery.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemGallery.xaml.cs
deleted file mode 100644
index c315a0f7f..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemGallery.xaml.cs
+++ /dev/null
@@ -1,163 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Entities;
-using MediaBrowser.Model.Net;
-using MediaBrowser.UI;
-using MediaBrowser.UI.Controller;
-using MediaBrowser.UI.Controls;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows.Media.Imaging;
-
-namespace MediaBrowser.Plugins.DefaultTheme.Controls.Details
-{
- /// <summary>
- /// Interaction logic for ItemGallery.xaml
- /// </summary>
- public partial class ItemGallery : BaseDetailsControl
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="ItemGallery" /> class.
- /// </summary>
- public ItemGallery()
- : base()
- {
- InitializeComponent();
- lstItems.ItemInvoked += lstItems_ItemInvoked;
- }
-
- /// <summary>
- /// LSTs the items_ item invoked.
- /// </summary>
- /// <param name="sender">The sender.</param>
- /// <param name="e">The e.</param>
- void lstItems_ItemInvoked(object sender, ItemEventArgs<object> e)
- {
- var img = (BitmapImage)e.Argument;
-
- var index = Images.IndexOf(img);
-
- //App.Instance.OpenImageViewer(new Uri(ImageUrls[index]), Item.Name);
- }
-
- /// <summary>
- /// The _images
- /// </summary>
- private List<BitmapImage> _images;
- /// <summary>
- /// Gets or sets the images.
- /// </summary>
- /// <value>The images.</value>
- public List<BitmapImage> Images
- {
- get { return _images; }
- set
- {
- _images = value;
- lstItems.ItemsSource = value;
- OnPropertyChanged("Images");
- }
- }
-
- /// <summary>
- /// Gets or sets the image urls.
- /// </summary>
- /// <value>The image urls.</value>
- private List<string> ImageUrls { get; set; }
-
- /// <summary>
- /// Called when [item changed].
- /// </summary>
- protected override async void OnItemChanged()
- {
- ImageUrls = GetImages(Item);
-
- var tasks = ImageUrls.Select(GetImage);
-
- var results = await Task.WhenAll(tasks);
-
- Images = results.Where(i => i != null).ToList();
- }
-
- /// <summary>
- /// Gets the image.
- /// </summary>
- /// <param name="url">The URL.</param>
- /// <returns>Task{BitmapImage}.</returns>
- private async Task<BitmapImage> GetImage(string url)
- {
- try
- {
- return await App.Instance.GetRemoteBitmapAsync(url);
- }
- catch (HttpException)
- {
- return null;
- }
- }
-
- /// <summary>
- /// Gets the images.
- /// </summary>
- /// <param name="item">The item.</param>
- /// <returns>List{System.String}.</returns>
- internal static List<string> GetImages(BaseItemDto item)
- {
- var images = new List<string> { };
-
- if (item.BackdropCount > 0)
- {
- for (var i = 0; i < item.BackdropCount; i++)
- {
- images.Add(UIKernel.Instance.ApiClient.GetImageUrl(item, new ImageOptions
- {
- ImageType = ImageType.Backdrop,
- ImageIndex = i
- }));
- }
- }
-
- if (item.HasThumb)
- {
- images.Add(UIKernel.Instance.ApiClient.GetImageUrl(item, new ImageOptions
- {
- ImageType = ImageType.Thumb
- }));
- }
-
- if (item.HasArtImage)
- {
- images.Add(UIKernel.Instance.ApiClient.GetImageUrl(item, new ImageOptions
- {
- ImageType = ImageType.Art
- }));
- }
-
- if (item.HasDiscImage)
- {
- images.Add(UIKernel.Instance.ApiClient.GetImageUrl(item, new ImageOptions
- {
- ImageType = ImageType.Disc
- }));
- }
-
- if (item.HasMenuImage)
- {
- images.Add(UIKernel.Instance.ApiClient.GetImageUrl(item, new ImageOptions
- {
- ImageType = ImageType.Menu
- }));
- }
-
- if (item.HasBoxImage)
- {
- images.Add(UIKernel.Instance.ApiClient.GetImageUrl(item, new ImageOptions
- {
- ImageType = ImageType.Box
- }));
- }
-
- return images;
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemMediaInfo.xaml b/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemMediaInfo.xaml
deleted file mode 100644
index 0cae37a35..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemMediaInfo.xaml
+++ /dev/null
@@ -1,22 +0,0 @@
-<details:BaseDetailsControl x:Class="MediaBrowser.Plugins.DefaultTheme.Controls.Details.ItemMediaInfo"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:details="clr-namespace:MediaBrowser.Plugins.DefaultTheme.Controls.Details"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="*"></RowDefinition>
- </Grid.RowDefinitions>
-
- <TextBlock Style="{StaticResource TextBlockStyle}" Grid.Row="0" x:Name="TxtPath"></TextBlock>
-
- <TextBlock Style="{StaticResource TextBlockStyle}" Grid.Row="1" Margin="0 20 0 0" x:Name="TxtVideoFormat"></TextBlock>
-
- <StackPanel Orientation="Vertical" x:Name="MediaStreams" Grid.Row="2" Margin="0 20 0 0"></StackPanel>
- </Grid>
-</details:BaseDetailsControl>
diff --git a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemMediaInfo.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemMediaInfo.xaml.cs
deleted file mode 100644
index 3912093c7..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemMediaInfo.xaml.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-using MediaBrowser.Model.Entities;
-using System.Collections.Generic;
-using System.Windows;
-
-namespace MediaBrowser.Plugins.DefaultTheme.Controls.Details
-{
- /// <summary>
- /// Interaction logic for ItemMediaInfo.xaml
- /// </summary>
- public partial class ItemMediaInfo : BaseDetailsControl
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="ItemMediaInfo" /> class.
- /// </summary>
- public ItemMediaInfo()
- {
- InitializeComponent();
- }
-
- /// <summary>
- /// Called when [item changed].
- /// </summary>
- protected override void OnItemChanged()
- {
- MediaStreams.Children.Clear();
-
- TxtPath.Text = Item.Path;
-
- if (Item.VideoFormat.HasValue && Item.VideoFormat.Value != VideoFormat.Standard)
- {
- TxtVideoFormat.Visibility = Visibility.Visible;
-
- TxtVideoFormat.Text = Item.VideoFormat.Value == VideoFormat.Digital3D ? "Digital 3D" : "SBS 3D";
- }
- else
- {
- TxtVideoFormat.Visibility = Visibility.Collapsed;
- }
-
- foreach (var stream in Item.MediaStreams ?? new List<MediaStream> {})
- {
- MediaStreams.Children.Add(new MediaStreamControl
- {
- MediaStream = stream
- });
- }
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemOverview.xaml b/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemOverview.xaml
deleted file mode 100644
index 32e16ce9d..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemOverview.xaml
+++ /dev/null
@@ -1,68 +0,0 @@
-<details:BaseDetailsControl x:Class="MediaBrowser.Plugins.DefaultTheme.Controls.Details.ItemOverview"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:details="clr-namespace:MediaBrowser.Plugins.DefaultTheme.Controls.Details"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="*"></RowDefinition>
- </Grid.RowDefinitions>
-
- <StackPanel Orientation="Horizontal" Grid.Row="0" x:Name="PnlAlbum" Visibility="Collapsed">
-
- <TextBlock Style="{StaticResource TextBlockStyle}" Width="250" Text="album"></TextBlock>
- <TextBlock Style="{StaticResource TextBlockStyle}" x:Name="Album"></TextBlock>
- </StackPanel>
-
- <StackPanel Orientation="Horizontal" Grid.Row="1" x:Name="PnlArtist" Visibility="Collapsed">
-
- <TextBlock Style="{StaticResource TextBlockStyle}" Width="250" Text="artist"></TextBlock>
- <TextBlock Style="{StaticResource TextBlockStyle}" x:Name="Artist"></TextBlock>
- </StackPanel>
-
- <StackPanel Orientation="Horizontal" Grid.Row="2" x:Name="PnlAlbumArtist" Visibility="Collapsed">
-
- <TextBlock Style="{StaticResource TextBlockStyle}" Width="250" Text="album artist"></TextBlock>
- <TextBlock Style="{StaticResource TextBlockStyle}" x:Name="AlbumArtist"></TextBlock>
- </StackPanel>
-
- <StackPanel Orientation="Horizontal" Grid.Row="3" x:Name="PnlDirectors" Visibility="Collapsed">
-
- <TextBlock Style="{StaticResource TextBlockStyle}" x:Name="DirectorLabel" Width="250"></TextBlock>
- <TextBlock Style="{StaticResource TextBlockStyle}" x:Name="Directors"></TextBlock>
- </StackPanel>
-
- <StackPanel Orientation="Horizontal" Grid.Row="4" x:Name="PnlGenres" Visibility="Collapsed">
-
- <TextBlock Style="{StaticResource TextBlockStyle}" x:Name="GenreLabel" Width="250"></TextBlock>
- <TextBlock Style="{StaticResource TextBlockStyle}" x:Name="Genres"></TextBlock>
- </StackPanel>
-
- <StackPanel Orientation="Horizontal" Grid.Row="5" x:Name="PnlStudios" Visibility="Collapsed">
-
- <TextBlock Style="{StaticResource TextBlockStyle}" x:Name="StudiosLabel" Width="250"></TextBlock>
- <TextBlock Style="{StaticResource TextBlockStyle}" x:Name="Studios"></TextBlock>
- </StackPanel>
-
- <StackPanel Orientation="Horizontal" Grid.Row="6" x:Name="PnlPremiereDate" Visibility="Collapsed">
-
- <TextBlock Style="{StaticResource TextBlockStyle}" Width="250" Text="premiere date"></TextBlock>
- <TextBlock Style="{StaticResource TextBlockStyle}" x:Name="PremiereDate"></TextBlock>
- </StackPanel>
-
- <Grid Grid.Row="7">
-
- <TextBlock Style="{StaticResource TextBlockStyle}" x:Name="Overview" Margin="0 20 0 0"></TextBlock>
- </Grid>
- </Grid>
-</details:BaseDetailsControl>
diff --git a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemOverview.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemOverview.xaml.cs
deleted file mode 100644
index 3c1eb52ec..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemOverview.xaml.cs
+++ /dev/null
@@ -1,109 +0,0 @@
-using MediaBrowser.Model.Dto;
-using System;
-using System.Linq;
-using System.Windows;
-
-namespace MediaBrowser.Plugins.DefaultTheme.Controls.Details
-{
- /// <summary>
- /// Interaction logic for ItemOverview.xaml
- /// </summary>
- public partial class ItemOverview : BaseDetailsControl
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="ItemOverview" /> class.
- /// </summary>
- public ItemOverview()
- : base()
- {
- InitializeComponent();
- }
-
- /// <summary>
- /// Called when [item changed].
- /// </summary>
- protected override void OnItemChanged()
- {
- var directors = (Item.People ?? new BaseItemPerson[] { }).Where(p => string.Equals(p.Type, "director", StringComparison.OrdinalIgnoreCase)).ToList();
-
- if (directors.Count > 0)
- {
- PnlDirectors.Visibility = Visibility.Visible;
-
- Directors.Text = string.Join(" / ", directors.Take(3).Select(d => d.Name).ToArray());
- DirectorLabel.Text = directors.Count > 1 ? "directors" : "director";
- }
- else
- {
- PnlDirectors.Visibility = Visibility.Collapsed;
- }
-
- if (Item.Genres != null && Item.Genres.Count > 0)
- {
- PnlGenres.Visibility = Visibility.Visible;
-
- Genres.Text = string.Join(" / ", Item.Genres.Take(4).ToArray());
- GenreLabel.Text = Item.Genres.Count > 1 ? "genres" : "genre";
- }
- else
- {
- PnlGenres.Visibility = Visibility.Collapsed;
- }
-
- if (Item.Studios != null && Item.Studios.Count > 0)
- {
- PnlStudios.Visibility = Visibility.Visible;
-
- Studios.Text = string.Join(" / ", Item.Studios.Take(3).ToArray());
- StudiosLabel.Text = Item.Studios.Count > 1 ? "studios" : "studio";
- }
- else
- {
- PnlStudios.Visibility = Visibility.Collapsed;
- }
-
- if (Item.PremiereDate.HasValue)
- {
- PnlPremiereDate.Visibility = Visibility.Visible;
-
- PremiereDate.Text = Item.PremiereDate.Value.ToShortDateString();
- }
- else
- {
- PnlPremiereDate.Visibility = Visibility.Collapsed;
- }
-
- if (!string.IsNullOrEmpty(Item.Artist))
- {
- PnlArtist.Visibility = Visibility.Visible;
- Artist.Text = Item.Artist;
- }
- else
- {
- PnlArtist.Visibility = Visibility.Collapsed;
- }
-
- if (!string.IsNullOrEmpty(Item.Album))
- {
- PnlAlbum.Visibility = Visibility.Visible;
- Album.Text = Item.Artist;
- }
- else
- {
- PnlAlbum.Visibility = Visibility.Collapsed;
- }
-
- if (!string.IsNullOrEmpty(Item.AlbumArtist))
- {
- PnlAlbumArtist.Visibility = Visibility.Visible;
- AlbumArtist.Text = Item.Artist;
- }
- else
- {
- PnlAlbumArtist.Visibility = Visibility.Collapsed;
- }
-
- Overview.Text = Item.Overview;
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemPerformers.xaml b/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemPerformers.xaml
deleted file mode 100644
index 6e2bc9f57..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemPerformers.xaml
+++ /dev/null
@@ -1,23 +0,0 @@
-<details:BaseDetailsControl x:Class="MediaBrowser.Plugins.DefaultTheme.Controls.Details.ItemPerformers"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:details="clr-namespace:MediaBrowser.Plugins.DefaultTheme.Controls.Details"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300">
- <Grid>
- <controls:ExtendedScrollViewer ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Disabled" CanContentScroll="True">
- <controls:ScrollingPanel CanHorizontallyScroll="False" CanVerticallyScroll="True">
- <controls:ExtendedListBox VerticalAlignment="Center" x:Name="lstItems" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{Binding Path=People}" ItemTemplate="{StaticResource ItemPerformersTemplate}" Style="{StaticResource ListBoxStyle}" ItemContainerStyle="{StaticResource ListBoxItemStyle}">
- <controls:ExtendedListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Vertical" Margin="50" />
- </ItemsPanelTemplate>
- </controls:ExtendedListBox.ItemsPanel>
- </controls:ExtendedListBox>
- </controls:ScrollingPanel>
- </controls:ExtendedScrollViewer>
- </Grid>
-</details:BaseDetailsControl>
diff --git a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemPerformers.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemPerformers.xaml.cs
deleted file mode 100644
index 0ea9a052e..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemPerformers.xaml.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.UI;
-using MediaBrowser.UI.Controller;
-using MediaBrowser.UI.ViewModels;
-using System.Collections.ObjectModel;
-
-namespace MediaBrowser.Plugins.DefaultTheme.Controls.Details
-{
- /// <summary>
- /// Interaction logic for ItemPerformers.xaml
- /// </summary>
- public partial class ItemPerformers : BaseDetailsControl
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="ItemPerformers" /> class.
- /// </summary>
- public ItemPerformers()
- {
- InitializeComponent();
- }
-
- /// <summary>
- /// The _itemsResult
- /// </summary>
- private ItemsResult _itemsResult;
- /// <summary>
- /// Gets or sets the children of the Folder being displayed
- /// </summary>
- /// <value>The children.</value>
- public ItemsResult ItemsResult
- {
- get { return _itemsResult; }
-
- private set
- {
- _itemsResult = value;
- OnPropertyChanged("ItemsResult");
-
- Items = DtoBaseItemViewModel.GetObservableItems(ItemsResult.Items);
- }
- }
-
- /// <summary>
- /// The _display children
- /// </summary>
- private ObservableCollection<DtoBaseItemViewModel> _items;
- /// <summary>
- /// Gets the actual children that should be displayed.
- /// Subclasses should bind to this, not ItemsResult.
- /// </summary>
- /// <value>The display children.</value>
- public ObservableCollection<DtoBaseItemViewModel> Items
- {
- get { return _items; }
-
- private set
- {
- _items = value;
- //lstItems.ItemsSource = value;
- OnPropertyChanged("Items");
- }
- }
-
- /// <summary>
- /// Called when [item changed].
- /// </summary>
- protected override async void OnItemChanged()
- {
- ItemsResult = await UIKernel.Instance.ApiClient.GetAllPeopleAsync(App.Instance.CurrentUser.Id, itemId: Item.Id);
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemSpecialFeatures.xaml b/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemSpecialFeatures.xaml
deleted file mode 100644
index 09d64612e..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemSpecialFeatures.xaml
+++ /dev/null
@@ -1,23 +0,0 @@
-<details:BaseDetailsControl x:Class="MediaBrowser.Plugins.DefaultTheme.Controls.Details.ItemSpecialFeatures"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:details="clr-namespace:MediaBrowser.Plugins.DefaultTheme.Controls.Details"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300">
- <Grid>
- <controls:ExtendedScrollViewer ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Disabled" CanContentScroll="True">
- <controls:ScrollingPanel CanHorizontallyScroll="True" CanVerticallyScroll="False">
- <controls:ExtendedListBox x:Name="lstItems" HorizontalAlignment="Center" VerticalAlignment="Top" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemTemplate="{StaticResource ItemSpecialFeaturesTemplate}" Style="{StaticResource ListBoxStyle}" ItemContainerStyle="{StaticResource ListBoxItemStyle}">
- <controls:ExtendedListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Vertical" Margin="50" />
- </ItemsPanelTemplate>
- </controls:ExtendedListBox.ItemsPanel>
- </controls:ExtendedListBox>
- </controls:ScrollingPanel>
- </controls:ExtendedScrollViewer>
- </Grid>
-</details:BaseDetailsControl>
diff --git a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemSpecialFeatures.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemSpecialFeatures.xaml.cs
deleted file mode 100644
index d62c6d157..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemSpecialFeatures.xaml.cs
+++ /dev/null
@@ -1,77 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Net;
-using MediaBrowser.UI;
-using MediaBrowser.UI.Controller;
-using MediaBrowser.UI.Controls;
-using MediaBrowser.UI.Playback;
-using MediaBrowser.UI.ViewModels;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace MediaBrowser.Plugins.DefaultTheme.Controls.Details
-{
- /// <summary>
- /// Interaction logic for ItemSpecialFeatures.xaml
- /// </summary>
- public partial class ItemSpecialFeatures : BaseDetailsControl
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="ItemSpecialFeatures" /> class.
- /// </summary>
- public ItemSpecialFeatures()
- {
- InitializeComponent();
-
- lstItems.ItemInvoked += lstItems_ItemInvoked;
- }
-
- /// <summary>
- /// LSTs the items_ item invoked.
- /// </summary>
- /// <param name="sender">The sender.</param>
- /// <param name="e">The e.</param>
- void lstItems_ItemInvoked(object sender, ItemEventArgs<object> e)
- {
- var viewModel = (SpecialFeatureViewModel) e.Argument;
-
- UIKernel.Instance.PlaybackManager.Play(new PlayOptions
- {
- Items = new List<BaseItemDto> { viewModel.Item }
- });
- }
-
- /// <summary>
- /// Called when [item changed].
- /// </summary>
- protected override async void OnItemChanged()
- {
- BaseItemDto[] result;
-
- try
- {
- result = await UIKernel.Instance.ApiClient.GetSpecialFeaturesAsync(App.Instance.CurrentUser.Id, Item.Id);
- }
- catch (HttpException)
- {
- App.Instance.ShowDefaultErrorMessage();
-
- return;
- }
-
- var resultItems = result ?? new BaseItemDto[] { };
-
- const int height = 297;
- var aspectRatio = DtoBaseItemViewModel.GetAveragePrimaryImageAspectRatio(resultItems);
-
- var width = aspectRatio == 0 ? 528 : height * aspectRatio;
-
- lstItems.ItemsSource = resultItems.Select(i => new SpecialFeatureViewModel
- {
- Item = i,
- ImageHeight = height,
- ImageWidth = width
-
- }).ToList();
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemTrailers.xaml b/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemTrailers.xaml
deleted file mode 100644
index 129885271..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemTrailers.xaml
+++ /dev/null
@@ -1,23 +0,0 @@
-<details:BaseDetailsControl x:Class="MediaBrowser.Plugins.DefaultTheme.Controls.Details.ItemTrailers"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:details="clr-namespace:MediaBrowser.Plugins.DefaultTheme.Controls.Details"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300">
- <Grid>
- <controls:ExtendedScrollViewer ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Disabled" CanContentScroll="True">
- <controls:ScrollingPanel CanHorizontallyScroll="True" CanVerticallyScroll="False">
- <controls:ExtendedListBox x:Name="lstItems" HorizontalAlignment="Center" VerticalAlignment="Top" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemTemplate="{StaticResource ItemSpecialFeaturesTemplate}" Style="{StaticResource ListBoxStyle}" ItemContainerStyle="{StaticResource ListBoxItemStyle}">
- <controls:ExtendedListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Vertical" Margin="50" />
- </ItemsPanelTemplate>
- </controls:ExtendedListBox.ItemsPanel>
- </controls:ExtendedListBox>
- </controls:ScrollingPanel>
- </controls:ExtendedScrollViewer>
- </Grid>
-</details:BaseDetailsControl>
diff --git a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemTrailers.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemTrailers.xaml.cs
deleted file mode 100644
index 9d92aafbb..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/ItemTrailers.xaml.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Net;
-using MediaBrowser.UI;
-using MediaBrowser.UI.Controller;
-using MediaBrowser.UI.Controls;
-using MediaBrowser.UI.Playback;
-using MediaBrowser.UI.ViewModels;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace MediaBrowser.Plugins.DefaultTheme.Controls.Details
-{
- /// <summary>
- /// Interaction logic for ItemTrailers.xaml
- /// </summary>
- public partial class ItemTrailers : BaseDetailsControl
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="ItemSpecialFeatures" /> class.
- /// </summary>
- public ItemTrailers()
- {
- InitializeComponent();
-
- lstItems.ItemInvoked += lstItems_ItemInvoked;
- }
-
- /// <summary>
- /// LSTs the items_ item invoked.
- /// </summary>
- /// <param name="sender">The sender.</param>
- /// <param name="e">The e.</param>
- void lstItems_ItemInvoked(object sender, ItemEventArgs<object> e)
- {
- var viewModel = (SpecialFeatureViewModel)e.Argument;
-
- UIKernel.Instance.PlaybackManager.Play(new PlayOptions
- {
- Items = new List<BaseItemDto> { viewModel.Item }
- });
- }
-
- /// <summary>
- /// Called when [item changed].
- /// </summary>
- protected override async void OnItemChanged()
- {
- BaseItemDto[] result;
-
- try
- {
- result = await UIKernel.Instance.ApiClient.GetLocalTrailersAsync(App.Instance.CurrentUser.Id, Item.Id);
- }
- catch (HttpException)
- {
- App.Instance.ShowDefaultErrorMessage();
-
- return;
- }
-
- var resultItems = result ?? new BaseItemDto[] { };
-
- const int height = 297;
- var aspectRatio = DtoBaseItemViewModel.GetAveragePrimaryImageAspectRatio(resultItems);
-
- var width = aspectRatio == 0 ? 528 : height * aspectRatio;
-
- if (Item.TrailerUrls != null)
- {
- //resultItems.AddRange(Item.TrailerUrls.Select(i => UIKernel.Instance.PlaybackManager.GetPlayableItem(new Uri(i), "Trailer")));
- }
-
- lstItems.ItemsSource = resultItems.Select(i => new SpecialFeatureViewModel
- {
- Item = i,
- ImageHeight = height,
- ImageWidth = width
-
- }).ToList();
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/MediaStreamControl.xaml b/MediaBrowser.Plugins.DefaultTheme/Controls/Details/MediaStreamControl.xaml
deleted file mode 100644
index e841693fe..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/MediaStreamControl.xaml
+++ /dev/null
@@ -1,18 +0,0 @@
-<controls:BaseUserControl x:Class="MediaBrowser.Plugins.DefaultTheme.Controls.Details.MediaStreamControl"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="150"></ColumnDefinition>
- <ColumnDefinition Width="*"></ColumnDefinition>
- </Grid.ColumnDefinitions>
-
- <TextBlock Style="{StaticResource TextBlockStyle}" Grid.Column="0" x:Name="StreamName"></TextBlock>
- <StackPanel Orientation="Vertical" Grid.Column="1" x:Name="StreamDetails"></StackPanel>
- </Grid>
-</controls:BaseUserControl>
diff --git a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/MediaStreamControl.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/Controls/Details/MediaStreamControl.xaml.cs
deleted file mode 100644
index c0271cdab..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Controls/Details/MediaStreamControl.xaml.cs
+++ /dev/null
@@ -1,142 +0,0 @@
-using MediaBrowser.Model.Entities;
-using MediaBrowser.UI.Controls;
-using System.Collections.Generic;
-using System.Globalization;
-using System.IO;
-using System.Windows.Controls;
-
-namespace MediaBrowser.Plugins.DefaultTheme.Controls.Details
-{
- /// <summary>
- /// Interaction logic for MediaStreamControl.xaml
- /// </summary>
- public partial class MediaStreamControl : BaseUserControl
- {
- private static readonly CultureInfo UsCulture = new CultureInfo("en-US");
-
- /// <summary>
- /// Initializes a new instance of the <see cref="MediaStreamControl" /> class.
- /// </summary>
- public MediaStreamControl()
- {
- InitializeComponent();
- }
-
- /// <summary>
- /// The _media stream
- /// </summary>
- private MediaStream _mediaStream;
- /// <summary>
- /// Gets or sets the media stream.
- /// </summary>
- /// <value>The media stream.</value>
- public MediaStream MediaStream
- {
- get { return _mediaStream; }
- set
- {
- _mediaStream = value;
- OnPropertyChanged("MediaStream");
- OnStreamChanged();
- }
- }
-
- /// <summary>
- /// Called when [stream changed].
- /// </summary>
- private void OnStreamChanged()
- {
- if (MediaStream == null)
- {
- StreamName.Text = string.Empty;
- StreamDetails.Children.Clear();
- return;
- }
-
- var details = new List<string> { };
-
- if (MediaStream.Type != MediaStreamType.Video)
- {
- AddDetail(details, MediaStream.Language);
- }
-
- if (!string.IsNullOrEmpty(MediaStream.Path))
- {
- AddDetail(details, Path.GetFileName(MediaStream.Path));
- }
-
- if (MediaStream.Type == MediaStreamType.Video)
- {
- var resolution = string.Format("{0}*{1}", MediaStream.Width, MediaStream.Height);
-
- AddDetail(details, resolution);
- }
-
- AddDetail(details, MediaStream.AspectRatio);
-
- if (MediaStream.Type != MediaStreamType.Video)
- {
- if (MediaStream.IsDefault)
- {
- //AddDetail(details, "default");
- }
- if (MediaStream.IsForced)
- {
- AddDetail(details, "forced");
- }
- }
-
- AddDetail(details, MediaStream.Codec);
-
- if (MediaStream.Channels.HasValue)
- {
- AddDetail(details, MediaStream.Channels.Value.ToString(UsCulture) + "ch");
- }
-
- if (MediaStream.BitRate.HasValue)
- {
- var text = (MediaStream.BitRate.Value / 1000).ToString(UsCulture) + "kbps";
-
- AddDetail(details, text);
- }
-
- var framerate = MediaStream.AverageFrameRate ?? MediaStream.RealFrameRate ?? 0;
-
- if (framerate > 0)
- {
- AddDetail(details, framerate.ToString(UsCulture));
- }
-
- if (MediaStream.SampleRate.HasValue)
- {
- AddDetail(details, MediaStream.SampleRate.Value.ToString(UsCulture) + "khz");
- }
-
- AddDetail(string.Join(" \u2022 ", details.ToArray()));
-
- StreamName.Text = MediaStream.Type.ToString();
- }
-
- private void AddDetail(string text)
- {
- if (string.IsNullOrEmpty(text))
- {
- return;
- }
-
- var control = new TextBlock() { Text = text };
- control.SetResourceReference(StyleProperty, "TextBlockStyle");
- StreamDetails.Children.Add(control);
- }
-
- private void AddDetail(ICollection<string> list, string text)
- {
- if (string.IsNullOrEmpty(text))
- {
- return;
- }
-
- list.Add(text);
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Controls/HomePageTile.xaml b/MediaBrowser.Plugins.DefaultTheme/Controls/HomePageTile.xaml
deleted file mode 100644
index 8de68eff9..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Controls/HomePageTile.xaml
+++ /dev/null
@@ -1,22 +0,0 @@
-<controls:BaseUserControl x:Class="MediaBrowser.Plugins.DefaultTheme.Controls.HomePageTile"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300">
- <Grid HorizontalAlignment="Left" Width="400" Height="225">
-
- <Border Background="{Binding Converter={StaticResource MetroTileBackgroundConverter}}">
- <Image x:Name="image" Stretch="Uniform"></Image>
- </Border>
-
- <Grid HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
- <Grid.Background>
- <SolidColorBrush Color="#A6000000"></SolidColorBrush>
- </Grid.Background>
- <TextBlock Margin="10 5 0 10" Foreground="White" Text="{Binding Path=Item.Name}" TextWrapping="Wrap"></TextBlock>
- </Grid>
- </Grid>
-</controls:BaseUserControl>
diff --git a/MediaBrowser.Plugins.DefaultTheme/Controls/HomePageTile.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/Controls/HomePageTile.xaml.cs
deleted file mode 100644
index 9753851fa..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Controls/HomePageTile.xaml.cs
+++ /dev/null
@@ -1,128 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Entities;
-using MediaBrowser.Model.Net;
-using MediaBrowser.UI;
-using MediaBrowser.UI.Controls;
-using MediaBrowser.UI.ViewModels;
-using System;
-using System.Windows;
-
-namespace MediaBrowser.Plugins.DefaultTheme.Controls
-{
- /// <summary>
- /// Interaction logic for BaseItemTile.xaml
- /// </summary>
- public partial class HomePageTile : BaseUserControl
- {
- /// <summary>
- /// Gets the view model.
- /// </summary>
- /// <value>The view model.</value>
- public DtoBaseItemViewModel ViewModel
- {
- get { return DataContext as DtoBaseItemViewModel; }
- }
-
- /// <summary>
- /// Gets the item.
- /// </summary>
- /// <value>The item.</value>
- private BaseItemDto Item
- {
- get { return ViewModel.Item; }
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="HomePageTile" /> class.
- /// </summary>
- public HomePageTile()
- {
- InitializeComponent();
-
- DataContextChanged += BaseItemTile_DataContextChanged;
- }
-
- /// <summary>
- /// Handles the DataContextChanged event of the BaseItemTile control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="DependencyPropertyChangedEventArgs" /> instance containing the event data.</param>
- void BaseItemTile_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
- {
- OnItemChanged();
- }
-
- /// <summary>
- /// Called when [item changed].
- /// </summary>
- private void OnItemChanged()
- {
- ReloadImage();
- }
-
- /// <summary>
- /// Reloads the image.
- /// </summary>
- private void ReloadImage()
- {
- if (Item.HasPrimaryImage)
- {
- var url = App.Instance.ApiClient.GetImageUrl(Item, new ImageOptions
- {
- ImageType = ImageType.Primary,
- Height = 225
- });
-
- SetImage(url);
- }
- else if (Item.BackdropCount > 0)
- {
- var url = App.Instance.ApiClient.GetImageUrl(Item, new ImageOptions
- {
- ImageType = ImageType.Backdrop,
- Height = 225,
- Width = 400
- });
-
- SetImage(url);
- }
- else if (Item.HasThumb)
- {
- var url = App.Instance.ApiClient.GetImageUrl(Item, new ImageOptions
- {
- ImageType = ImageType.Thumb,
- Height = 225,
- Width = 400
- });
-
- SetImage(url);
- }
- else
- {
- SetDefaultImage();
- }
- }
-
- /// <summary>
- /// Sets the image.
- /// </summary>
- /// <param name="url">The URL.</param>
- private async void SetImage(string url)
- {
- try
- {
- image.Source = await App.Instance.GetRemoteBitmapAsync(url);
- }
- catch (HttpException)
- {
- SetDefaultImage();
- }
- }
-
- private void SetDefaultImage()
- {
- var imageUri = new Uri("../Resources/Images/VideoDefault.png", UriKind.Relative);
- image.Source = App.Instance.GetBitmapImage(imageUri);
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Controls/MultiItemTile.xaml b/MediaBrowser.Plugins.DefaultTheme/Controls/MultiItemTile.xaml
deleted file mode 100644
index 000fc9584..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Controls/MultiItemTile.xaml
+++ /dev/null
@@ -1,30 +0,0 @@
-<controls:BaseUserControl x:Class="MediaBrowser.Plugins.DefaultTheme.Controls.MultiItemTile"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300">
- <Grid x:Name="mainGrid" HorizontalAlignment="Left">
-
- <Border Background="{Binding Converter={StaticResource MetroTileBackgroundConverter}}">
- <controls:TransitionControl x:Name="transitionControl">
- <controls:TransitionControl.TransitionAnimation>
- <DoubleAnimation Duration="0:0:1" >
- <DoubleAnimation.EasingFunction>
- <ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
- </DoubleAnimation.EasingFunction>
- </DoubleAnimation>
- </controls:TransitionControl.TransitionAnimation>
- </controls:TransitionControl>
- </Border>
-
- <Grid HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
- <Grid.Background>
- <SolidColorBrush Color="#A6000000"></SolidColorBrush>
- </Grid.Background>
- <TextBlock x:Name="txtName" Margin="10 5 0 10" Foreground="White" TextWrapping="Wrap"></TextBlock>
- </Grid>
- </Grid>
-</controls:BaseUserControl>
diff --git a/MediaBrowser.Plugins.DefaultTheme/Controls/MultiItemTile.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/Controls/MultiItemTile.xaml.cs
deleted file mode 100644
index 51339647a..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Controls/MultiItemTile.xaml.cs
+++ /dev/null
@@ -1,219 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Entities;
-using MediaBrowser.Model.Net;
-using MediaBrowser.UI;
-using MediaBrowser.UI.Controls;
-using MediaBrowser.UI.ViewModels;
-using Microsoft.Expression.Media.Effects;
-using System;
-using System.ComponentModel;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Media;
-
-namespace MediaBrowser.Plugins.DefaultTheme.Controls
-{
- /// <summary>
- /// Interaction logic for MultiItemTile.xaml
- /// </summary>
- public partial class MultiItemTile : BaseUserControl
- {
- /// <summary>
- /// The _image width
- /// </summary>
- private int _imageWidth;
- /// <summary>
- /// Gets or sets the width of the image.
- /// </summary>
- /// <value>The width of the image.</value>
- public int ImageWidth
- {
- get { return _imageWidth; }
- set
- {
- _imageWidth = value;
- mainGrid.Width = value;
- }
- }
-
- /// <summary>
- /// The _image height
- /// </summary>
- private int _imageHeight;
- /// <summary>
- /// Gets or sets the height of the image.
- /// </summary>
- /// <value>The height of the image.</value>
- public int ImageHeight
- {
- get { return _imageHeight; }
- set
- {
- _imageHeight = value;
- mainGrid.Height = value;
- }
- }
-
- /// <summary>
- /// The _effects
- /// </summary>
- TransitionEffect[] _effects = new TransitionEffect[]
- {
- new BlindsTransitionEffect { Orientation = BlindOrientation.Horizontal },
- new BlindsTransitionEffect { Orientation = BlindOrientation.Vertical },
- new CircleRevealTransitionEffect { },
- new FadeTransitionEffect { },
- new SlideInTransitionEffect { SlideDirection= SlideDirection.TopToBottom},
- new SlideInTransitionEffect { SlideDirection= SlideDirection.RightToLeft},
- new WipeTransitionEffect { WipeDirection = WipeDirection.RightToLeft},
- new WipeTransitionEffect { WipeDirection = WipeDirection.TopLeftToBottomRight}
- };
-
- /// <summary>
- /// Gets or sets the random.
- /// </summary>
- /// <value>The random.</value>
- private Random Random { get; set; }
-
- /// <summary>
- /// Gets the collection.
- /// </summary>
- /// <value>The collection.</value>
- public ItemCollectionViewModel Collection
- {
- get { return DataContext as ItemCollectionViewModel; }
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="MultiItemTile" /> class.
- /// </summary>
- public MultiItemTile()
- {
- InitializeComponent();
-
- Random = new Random(Guid.NewGuid().GetHashCode());
-
- mainGrid.Width = ImageWidth;
- mainGrid.Height = ImageHeight;
- DataContextChanged += BaseItemTile_DataContextChanged;
- }
-
- /// <summary>
- /// Handles the DataContextChanged event of the BaseItemTile control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="DependencyPropertyChangedEventArgs" /> instance containing the event data.</param>
- void BaseItemTile_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
- {
- OnCurrentItemChanged();
-
- if (Collection != null)
- {
- Collection.PropertyChanged += Collection_PropertyChanged;
- }
- }
-
- /// <summary>
- /// Handles the PropertyChanged event of the Collection control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="PropertyChangedEventArgs" /> instance containing the event data.</param>
- void Collection_PropertyChanged(object sender, PropertyChangedEventArgs e)
- {
- if (e.PropertyName.Equals("CurrentItem"))
- {
- OnCurrentItemChanged();
- }
- }
-
- /// <summary>
- /// Called when [current item changed].
- /// </summary>
- private async void OnCurrentItemChanged()
- {
- if (Collection == null)
- {
- // Setting this to null doesn't seem to clear out the content
- transitionControl.Content = new FrameworkElement();
- txtName.Text = null;
- return;
- }
-
- var currentItem = Collection.CurrentItem;
-
- if (currentItem == null)
- {
- // Setting this to null doesn't seem to clear out the content
- transitionControl.Content = new FrameworkElement();
- txtName.Text = Collection.Name;
- return;
- }
-
- var img = new Image
- {
- Stretch = Stretch.Uniform,
- Width = ImageWidth,
- Height = ImageHeight
- };
-
- var url = GetImageSource(currentItem);
-
- if (!string.IsNullOrEmpty(url))
- {
- try
- {
- img.Source = await App.Instance.GetRemoteBitmapAsync(url);
- txtName.Text = Collection.Name ?? currentItem.Name;
- }
- catch (HttpException)
- {
- }
- }
-
- transitionControl.TransitionType = _effects[Random.Next(0, _effects.Length)];
- transitionControl.Content = img;
- }
-
- /// <summary>
- /// Gets the image source.
- /// </summary>
- /// <param name="item">The item.</param>
- /// <returns>Uri.</returns>
- private string GetImageSource(BaseItemDto item)
- {
- if (item != null)
- {
- if (item.BackdropCount > 0)
- {
- return App.Instance.ApiClient.GetImageUrl(item, new ImageOptions
- {
- ImageType = ImageType.Backdrop,
- Height = ImageHeight,
- Width = ImageWidth
- });
- }
-
- if (item.HasThumb)
- {
- return App.Instance.ApiClient.GetImageUrl(item, new ImageOptions
- {
- ImageType = ImageType.Thumb,
- Height = ImageHeight,
- Width = ImageWidth
- });
- }
-
- if (item.HasPrimaryImage)
- {
- return App.Instance.ApiClient.GetImageUrl(item, new ImageOptions
- {
- ImageType = ImageType.Primary,
- Height = ImageHeight
- });
- }
- }
-
- return null;
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Converters/WeatherImageConverter.cs b/MediaBrowser.Plugins.DefaultTheme/Converters/WeatherImageConverter.cs
deleted file mode 100644
index aeb8f60ce..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Converters/WeatherImageConverter.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-using MediaBrowser.Model.Weather;
-using System;
-using System.Globalization;
-using System.Windows.Data;
-
-namespace MediaBrowser.Plugins.DefaultTheme.Converters
-{
- /// <summary>
- /// Generates a weather image based on the current forecast
- /// </summary>
- public class WeatherImageConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- var weather = value as WeatherInfo;
-
- if (weather != null && weather.CurrentWeather != null)
- {
- switch (weather.CurrentWeather.Condition)
- {
- case WeatherConditions.Thunderstorm:
- return "../Resources/Images/Weather/Thunder.png";
- case WeatherConditions.Overcast:
- return "../Resources/Images/Weather/Overcast.png";
- case WeatherConditions.Mist:
- case WeatherConditions.Sleet:
- case WeatherConditions.Rain:
- return "../Resources/Images/Weather/Rain.png";
- case WeatherConditions.Blizzard:
- case WeatherConditions.Snow:
- return "../Resources/Images/Weather/Snow.png";
- case WeatherConditions.Cloudy:
- return "../Resources/Images/Weather/Cloudy.png";
- case WeatherConditions.PartlyCloudy:
- return "../Resources/Images/Weather/PartlyCloudy.png";
- default:
- return "../Resources/Images/Weather/Sunny.png";
- }
- }
- return null;
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/BaseDisplayPreferencesPage.cs b/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/BaseDisplayPreferencesPage.cs
deleted file mode 100644
index b261ae0c2..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/BaseDisplayPreferencesPage.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using MediaBrowser.UI.Pages;
-
-namespace MediaBrowser.Plugins.DefaultTheme.DisplayPreferences
-{
- /// <summary>
- /// Class BaseDisplayPreferencesPage
- /// </summary>
- public class BaseDisplayPreferencesPage : BasePage
- {
- /// <summary>
- /// Gets or sets the display preferences window.
- /// </summary>
- /// <value>The display preferences window.</value>
- public DisplayPreferencesMenu DisplayPreferencesWindow { get; set; }
-
- /// <summary>
- /// Gets the main page.
- /// </summary>
- /// <value>The main page.</value>
- protected BaseListPage MainPage
- {
- get { return DisplayPreferencesWindow.MainPage; }
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/DisplayPreferencesMenu.xaml b/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/DisplayPreferencesMenu.xaml
deleted file mode 100644
index 62dea39cd..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/DisplayPreferencesMenu.xaml
+++ /dev/null
@@ -1,47 +0,0 @@
-<controls:BaseModalWindow x:Class="MediaBrowser.Plugins.DefaultTheme.DisplayPreferences.DisplayPreferencesMenu"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:ee="http://schemas.microsoft.com/expression/2010/effects"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- Title="DisplayPreferencesMenu" Height="300" Width="300"
- AllowsTransparency="True"
- Background="Transparent"
- Style="{StaticResource ModalWindow}">
- <Grid>
- <Grid Style="{StaticResource ModalOverlayStyle}">
-
- </Grid>
- <Grid Style="{StaticResource ModalContentStyle}" HorizontalAlignment="Right" VerticalAlignment="Stretch">
-
- <Grid Margin="50 50 120 0">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- </Grid.RowDefinitions>
-
- <controls:TransitionFrame x:Name="PageFrame" Grid.Row="0" MinWidth="400" MinHeight="550">
- <controls:TransitionFrame.TransitionAnimation>
- <DoubleAnimation Duration="0:0:0.35" >
- <DoubleAnimation.EasingFunction>
- <ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
- </DoubleAnimation.EasingFunction>
- </DoubleAnimation>
- </controls:TransitionFrame.TransitionAnimation>
- <controls:TransitionFrame.TransitionType>
- <ee:WipeTransitionEffect WipeDirection="RightToLeft"></ee:WipeTransitionEffect>
- </controls:TransitionFrame.TransitionType>
- </controls:TransitionFrame>
- <controls:ExtendedButton x:Name="btnClose" Style="{StaticResource ViewMenuButton}" HorizontalAlignment="Left" Margin="0 50 0 0" Grid.Row="1">
- <StackPanel Orientation="Horizontal">
- <Image Source="..\Resources\Images\ViewMenu\Close.png" Stretch="None" />
- <TextBlock Style="{StaticResource TextBlockStyle}" VerticalAlignment="Center" Margin="10 0 0 0">Close</TextBlock>
- </StackPanel>
- </controls:ExtendedButton>
- </Grid>
- </Grid>
-
- <Grid.LayoutTransform>
- <ScaleTransform ScaleX="{Binding Path=ContentScale}" ScaleY="{Binding Path=ContentScale}" CenterX="0" CenterY="0" />
- </Grid.LayoutTransform>
- </Grid>
-</controls:BaseModalWindow>
diff --git a/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/DisplayPreferencesMenu.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/DisplayPreferencesMenu.xaml.cs
deleted file mode 100644
index 04e65cd42..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/DisplayPreferencesMenu.xaml.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-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 });
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/IndexMenuPage.xaml b/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/IndexMenuPage.xaml
deleted file mode 100644
index dc7f30ccd..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/IndexMenuPage.xaml
+++ /dev/null
@@ -1,21 +0,0 @@
-<DisplayPreferences:BaseDisplayPreferencesPage x:Class="MediaBrowser.Plugins.DefaultTheme.DisplayPreferences.IndexMenuPage"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:DisplayPreferences="clr-namespace:MediaBrowser.Plugins.DefaultTheme.DisplayPreferences"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300"
- Title="IndexMenuPage">
-
- <Grid>
- <StackPanel Orientation="Vertical">
- <TextBlock Style="{StaticResource Heading2TextBlockStyle}">Index By</TextBlock>
- <StackPanel x:Name="pnlOptions" Orientation="Vertical"></StackPanel>
- <controls:ExtendedCheckbox x:Name="chkRememberIndex" Margin="0 20 0 0" Style="{StaticResource CheckBoxStyle}">
- <TextBlock Text="Remember Indexing" Style="{StaticResource TextBlockStyle}"></TextBlock>
- </controls:ExtendedCheckbox>
- </StackPanel>
- </Grid>
-</DisplayPreferences:BaseDisplayPreferencesPage>
diff --git a/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/IndexMenuPage.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/IndexMenuPage.xaml.cs
deleted file mode 100644
index 63fa1b84d..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/IndexMenuPage.xaml.cs
+++ /dev/null
@@ -1,95 +0,0 @@
-using MediaBrowser.Model.Net;
-using MediaBrowser.UI;
-using MediaBrowser.UI.Controls;
-using System;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace MediaBrowser.Plugins.DefaultTheme.DisplayPreferences
-{
- /// <summary>
- /// Interaction logic for IndexMenuPage.xaml
- /// </summary>
- public partial class IndexMenuPage : BaseDisplayPreferencesPage
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="IndexMenuPage" /> class.
- /// </summary>
- public IndexMenuPage()
- {
- InitializeComponent();
-
- chkRememberIndex.Click += chkRememberIndex_Click;
- }
-
- /// <summary>
- /// Handles the Click event of the chkRememberIndex control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
- async void chkRememberIndex_Click(object sender, RoutedEventArgs e)
- {
- try
- {
- await MainPage.UpdateRememberIndex(chkRememberIndex.IsChecked.HasValue && chkRememberIndex.IsChecked.Value);
- }
- catch (HttpException)
- {
- App.Instance.ShowDefaultErrorMessage();
- }
- }
-
- /// <summary>
- /// Called when [loaded].
- /// </summary>
- protected override void OnLoaded()
- {
- chkRememberIndex.IsChecked = MainPage.DisplayPreferences.RememberIndexing;
-
- var index = 0;
-
- var currentValue = MainPage.IndexBy ?? string.Empty;
-
- foreach (var option in MainPage.Folder.IndexOptions)
- {
- var radio = new ExtendedRadioButton { GroupName = "Options" };
-
- radio.SetResourceReference(StyleProperty, "ViewMenuRadioButton");
-
- var textblock = new TextBlock { Text = option };
-
- textblock.SetResourceReference(StyleProperty, "TextBlockStyle");
-
- radio.Content = textblock;
-
- if (string.IsNullOrEmpty(MainPage.DisplayPreferences.IndexBy))
- {
- radio.IsChecked = index == 0;
- }
- else
- {
- radio.IsChecked = currentValue.Equals(option, StringComparison.OrdinalIgnoreCase);
- }
-
- radio.Tag = option;
- radio.Click += radio_Click;
-
- pnlOptions.Children.Add(radio);
-
- index++;
- }
-
- base.OnLoaded();
- }
-
- /// <summary>
- /// Handles the Click event of the radio control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
- async void radio_Click(object sender, RoutedEventArgs e)
- {
- await MainPage.UpdateIndexOption((sender as RadioButton).Tag.ToString());
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/MainPage.xaml b/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/MainPage.xaml
deleted file mode 100644
index a8a8ca577..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/MainPage.xaml
+++ /dev/null
@@ -1,54 +0,0 @@
-<DisplayPreferences:BaseDisplayPreferencesPage x:Class="MediaBrowser.Plugins.DefaultTheme.DisplayPreferences.MainPage"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:DisplayPreferences="clr-namespace:MediaBrowser.Plugins.DefaultTheme.DisplayPreferences"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300"
- Title="MainPage">
-
- <Grid>
- <StackPanel Orientation="Vertical">
- <TextBlock Style="{StaticResource Heading2TextBlockStyle}">Display Options</TextBlock>
-
- <controls:ExtendedButton x:Name="ViewMenuButton" Style="{StaticResource ViewMenuButton}">
- <StackPanel Orientation="Horizontal">
- <Image Source="..\Resources\Images\ViewMenu\View.png" Stretch="None" />
- <TextBlock Style="{StaticResource TextBlockStyle}" VerticalAlignment="Center" Margin="10 0 0 0">View Menu</TextBlock>
- </StackPanel>
- </controls:ExtendedButton>
- <controls:ExtendedButton x:Name="SortMenuButton" Style="{StaticResource ViewMenuButton}">
- <StackPanel Orientation="Horizontal">
- <Image Source="..\Resources\Images\ViewMenu\Sort.png" Stretch="None" />
- <TextBlock Style="{StaticResource TextBlockStyle}" VerticalAlignment="Center" Margin="10 0 0 0">Sort Menu</TextBlock>
- </StackPanel>
- </controls:ExtendedButton>
- <controls:ExtendedButton x:Name="IndexMenuButton" Style="{StaticResource ViewMenuButton}">
- <StackPanel Orientation="Horizontal">
- <Image Source="..\Resources\Images\ViewMenu\Index.png" Stretch="None" />
- <TextBlock Style="{StaticResource TextBlockStyle}" VerticalAlignment="Center" Margin="10 0 0 0">Index Menu</TextBlock>
- </StackPanel>
- </controls:ExtendedButton>
- <controls:ExtendedButton x:Name="btnIncrease" Style="{StaticResource ViewMenuButton}">
- <StackPanel Orientation="Horizontal">
- <Image Source="..\Resources\Images\ViewMenu\Increase.png" Stretch="None" />
- <TextBlock Style="{StaticResource TextBlockStyle}" VerticalAlignment="Center" Margin="10 0 0 0">Increase Image Size</TextBlock>
- </StackPanel>
- </controls:ExtendedButton>
- <controls:ExtendedButton x:Name="btnDecrease" Style="{StaticResource ViewMenuButton}">
- <StackPanel Orientation="Horizontal">
- <Image Source="..\Resources\Images\ViewMenu\Decrease.png" Stretch="None" />
- <TextBlock Style="{StaticResource TextBlockStyle}" VerticalAlignment="Center" Margin="10 0 0 0">Decrease Image Size</TextBlock>
- </StackPanel>
- </controls:ExtendedButton>
- <controls:ExtendedButton x:Name="btnScroll" Style="{StaticResource ViewMenuButton}">
- <StackPanel Orientation="Horizontal">
- <Image Source="..\Resources\Images\ViewMenu\Scroll.png" Stretch="None" />
- <TextBlock x:Name="txtScrollDirection" Style="{StaticResource TextBlockStyle}" VerticalAlignment="Center" Margin="10 0 0 0">Scroll: Vertical</TextBlock>
- </StackPanel>
- </controls:ExtendedButton>
- </StackPanel>
- </Grid>
-</DisplayPreferences:BaseDisplayPreferencesPage>
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
-{
- /// <summary>
- /// Interaction logic for MainPage.xaml
- /// </summary>
- public partial class MainPage : BaseDisplayPreferencesPage
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="MainPage" /> class.
- /// </summary>
- 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;
- }
-
- /// <summary>
- /// Handles the Click event of the IndexMenuButton 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 IndexMenuButton_Click(object sender, RoutedEventArgs e)
- {
- DisplayPreferencesWindow.NavigateToIndexMenu();
- }
-
- /// <summary>
- /// Handles the Click event of the SortMenuButton 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 SortMenuButton_Click(object sender, RoutedEventArgs e)
- {
- DisplayPreferencesWindow.NavigateToSortMenu();
- }
-
- /// <summary>
- /// Called when [loaded].
- /// </summary>
- protected override void OnLoaded()
- {
- base.OnLoaded();
-
- UpdateFields();
- }
-
- /// <summary>
- /// Handles the Click event of the ViewMenuButton 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 ViewMenuButton_Click(object sender, RoutedEventArgs e)
- {
- DisplayPreferencesWindow.NavigateToViewMenu();
- }
-
- /// <summary>
- /// Handles the Click event of the btnDecrease 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 btnDecrease_Click(object sender, RoutedEventArgs e)
- {
- MainPage.DisplayPreferences.DecreaseImageSize();
- MainPage.NotifyDisplayPreferencesChanged();
- }
-
- /// <summary>
- /// Handles the Click event of the btnIncrease 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 btnIncrease_Click(object sender, RoutedEventArgs e)
- {
- MainPage.DisplayPreferences.IncreaseImageSize();
- MainPage.NotifyDisplayPreferencesChanged();
- }
-
- /// <summary>
- /// Handles the Click event of the btnScroll 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 btnScroll_Click(object sender, RoutedEventArgs e)
- {
- MainPage.DisplayPreferences.ScrollDirection = MainPage.DisplayPreferences.ScrollDirection == ScrollDirection.Horizontal
- ? ScrollDirection.Vertical
- : ScrollDirection.Horizontal;
-
- MainPage.NotifyDisplayPreferencesChanged();
-
- UpdateFields();
- }
-
- /// <summary>
- /// Updates the fields.
- /// </summary>
- 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";
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/SortMenuPage.xaml b/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/SortMenuPage.xaml
deleted file mode 100644
index 35ea6e13d..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/SortMenuPage.xaml
+++ /dev/null
@@ -1,21 +0,0 @@
-<DisplayPreferences:BaseDisplayPreferencesPage x:Class="MediaBrowser.Plugins.DefaultTheme.DisplayPreferences.SortMenuPage"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:DisplayPreferences="clr-namespace:MediaBrowser.Plugins.DefaultTheme.DisplayPreferences"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300"
- Title="SortMenuPage">
-
- <Grid>
- <StackPanel Orientation="Vertical">
- <TextBlock Style="{StaticResource Heading2TextBlockStyle}">Sort By</TextBlock>
- <StackPanel x:Name="pnlOptions" Orientation="Vertical"></StackPanel>
- <controls:ExtendedCheckbox x:Name="chkRemember" Margin="0 20 0 0" Style="{StaticResource CheckBoxStyle}">
- <TextBlock Text="Remember Sorting" Style="{StaticResource TextBlockStyle}"></TextBlock>
- </controls:ExtendedCheckbox>
- </StackPanel>
- </Grid>
-</DisplayPreferences:BaseDisplayPreferencesPage>
diff --git a/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/SortMenuPage.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/SortMenuPage.xaml.cs
deleted file mode 100644
index 6d6068d16..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/SortMenuPage.xaml.cs
+++ /dev/null
@@ -1,95 +0,0 @@
-using MediaBrowser.Model.Net;
-using MediaBrowser.UI;
-using MediaBrowser.UI.Controls;
-using System;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace MediaBrowser.Plugins.DefaultTheme.DisplayPreferences
-{
- /// <summary>
- /// Interaction logic for SortMenuPage.xaml
- /// </summary>
- public partial class SortMenuPage : BaseDisplayPreferencesPage
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="SortMenuPage" /> class.
- /// </summary>
- public SortMenuPage()
- {
- InitializeComponent();
-
- chkRemember.Click += chkRemember_Click;
- }
-
- /// <summary>
- /// Handles the Click event of the chkRemember control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
- async void chkRemember_Click(object sender, RoutedEventArgs e)
- {
- try
- {
- await MainPage.UpdateRememberSort(chkRemember.IsChecked.HasValue && chkRemember.IsChecked.Value);
- }
- catch (HttpException)
- {
- App.Instance.ShowDefaultErrorMessage();
- }
- }
-
- /// <summary>
- /// Called when [loaded].
- /// </summary>
- protected override void OnLoaded()
- {
- chkRemember.IsChecked = MainPage.DisplayPreferences.RememberSorting;
-
- var index = 0;
-
- var currentValue = MainPage.SortBy ?? string.Empty;
-
- foreach (var option in MainPage.Folder.SortOptions)
- {
- var radio = new ExtendedRadioButton { GroupName = "Options" };
-
- radio.SetResourceReference(StyleProperty, "ViewMenuRadioButton");
-
- var textblock = new TextBlock { Text = option };
-
- textblock.SetResourceReference(StyleProperty, "TextBlockStyle");
-
- radio.Content = textblock;
-
- if (string.IsNullOrEmpty(MainPage.DisplayPreferences.SortBy))
- {
- radio.IsChecked = index == 0;
- }
- else
- {
- radio.IsChecked = currentValue.Equals(option, StringComparison.OrdinalIgnoreCase);
- }
-
- radio.Tag = option;
- radio.Click += radio_Click;
-
- pnlOptions.Children.Add(radio);
-
- index++;
- }
-
- base.OnLoaded();
- }
-
- /// <summary>
- /// Handles the Click event of the radio control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
- async void radio_Click(object sender, RoutedEventArgs e)
- {
- await MainPage.UpdateSortOption((sender as RadioButton).Tag.ToString());
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/ViewMenuPage.xaml b/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/ViewMenuPage.xaml
deleted file mode 100644
index cc4114e7a..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/ViewMenuPage.xaml
+++ /dev/null
@@ -1,30 +0,0 @@
-<DisplayPreferences:BaseDisplayPreferencesPage x:Class="MediaBrowser.Plugins.DefaultTheme.DisplayPreferences.ViewMenuPage"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:DisplayPreferences="clr-namespace:MediaBrowser.Plugins.DefaultTheme.DisplayPreferences"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300"
- Title="ViewMenuPage">
-
- <Grid>
- <StackPanel Orientation="Vertical">
-
- <TextBlock Style="{StaticResource Heading2TextBlockStyle}">Select View</TextBlock>
- <controls:ExtendedRadioButton x:Name="radioCoverFlow" GroupName="View" Style="{StaticResource ViewMenuRadioButton}">
- <TextBlock Style="{StaticResource TextBlockStyle}">Cover Flow</TextBlock>
- </controls:ExtendedRadioButton>
- <controls:ExtendedRadioButton x:Name="radioList" GroupName="View" Style="{StaticResource ViewMenuRadioButton}">
- <TextBlock Style="{StaticResource TextBlockStyle}">List</TextBlock>
- </controls:ExtendedRadioButton>
- <controls:ExtendedRadioButton x:Name="radioPoster" GroupName="View" Style="{StaticResource ViewMenuRadioButton}">
- <TextBlock Style="{StaticResource TextBlockStyle}">Poster</TextBlock>
- </controls:ExtendedRadioButton>
- <controls:ExtendedRadioButton x:Name="radioThumbstrip" GroupName="View" Style="{StaticResource ViewMenuRadioButton}">
- <TextBlock Style="{StaticResource TextBlockStyle}">Thumbstrip</TextBlock>
- </controls:ExtendedRadioButton>
- </StackPanel>
- </Grid>
-</DisplayPreferences:BaseDisplayPreferencesPage>
diff --git a/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/ViewMenuPage.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/ViewMenuPage.xaml.cs
deleted file mode 100644
index e164809cf..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/DisplayPreferences/ViewMenuPage.xaml.cs
+++ /dev/null
@@ -1,94 +0,0 @@
-using MediaBrowser.Model.Entities;
-using System.Windows;
-
-namespace MediaBrowser.Plugins.DefaultTheme.DisplayPreferences
-{
- /// <summary>
- /// Interaction logic for ViewMenuPage.xaml
- /// </summary>
- public partial class ViewMenuPage : BaseDisplayPreferencesPage
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="ViewMenuPage" /> class.
- /// </summary>
- public ViewMenuPage()
- {
- InitializeComponent();
-
- radioCoverFlow.Click += radioCoverFlow_Click;
- radioList.Click += radioList_Click;
- radioPoster.Click += radioPoster_Click;
- radioThumbstrip.Click += radioThumbstrip_Click;
- }
-
- /// <summary>
- /// Called when [loaded].
- /// </summary>
- protected override void OnLoaded()
- {
- base.OnLoaded();
-
- UpdateFields();
- }
-
- /// <summary>
- /// Handles the Click event of the radioThumbstrip 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 radioThumbstrip_Click(object sender, RoutedEventArgs e)
- {
- MainPage.DisplayPreferences.ScrollDirection = ScrollDirection.Horizontal;
- MainPage.DisplayPreferences.ViewType = ViewTypes.ThumbStrip;
- MainPage.NotifyDisplayPreferencesChanged();
- }
-
- /// <summary>
- /// Handles the Click event of the radioPoster 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 radioPoster_Click(object sender, RoutedEventArgs e)
- {
- MainPage.DisplayPreferences.ViewType = ViewTypes.Poster;
- MainPage.NotifyDisplayPreferencesChanged();
- }
-
- /// <summary>
- /// Handles the Click event of the radioList 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 radioList_Click(object sender, RoutedEventArgs e)
- {
- MainPage.DisplayPreferences.ScrollDirection = ScrollDirection.Vertical;
- MainPage.DisplayPreferences.ViewType = ViewTypes.List;
- MainPage.NotifyDisplayPreferencesChanged();
- }
-
- /// <summary>
- /// Handles the Click event of the radioCoverFlow 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 radioCoverFlow_Click(object sender, RoutedEventArgs e)
- {
- MainPage.DisplayPreferences.ScrollDirection = ScrollDirection.Horizontal;
- MainPage.DisplayPreferences.ViewType = ViewTypes.CoverFlow;
- MainPage.NotifyDisplayPreferencesChanged();
- }
-
- /// <summary>
- /// Updates the fields.
- /// </summary>
- private void UpdateFields()
- {
- var displayPreferences = MainPage.DisplayPreferences;
-
- radioCoverFlow.IsChecked = displayPreferences.ViewType == ViewTypes.CoverFlow;
- radioList.IsChecked = displayPreferences.ViewType == ViewTypes.List;
- radioPoster.IsChecked = displayPreferences.ViewType == ViewTypes.Poster;
- radioThumbstrip.IsChecked = displayPreferences.ViewType == ViewTypes.ThumbStrip;
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/MediaBrowser.Plugins.DefaultTheme.csproj b/MediaBrowser.Plugins.DefaultTheme/MediaBrowser.Plugins.DefaultTheme.csproj
deleted file mode 100644
index f0176049d..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/MediaBrowser.Plugins.DefaultTheme.csproj
+++ /dev/null
@@ -1,354 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{6E892999-711D-4E24-8BAC-DACF5BFA783A}</ProjectGuid>
- <OutputType>library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>MediaBrowser.Plugins.DefaultTheme</RootNamespace>
- <AssemblyName>MediaBrowser.Plugins.DefaultTheme</AssemblyName>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <WarningLevel>4</WarningLevel>
- <ExpressionBlendVersion>5.2.30810.0</ExpressionBlendVersion>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
- <RestorePackages>true</RestorePackages>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup>
- <RunPostBuildEvent>Always</RunPostBuildEvent>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Microsoft.Expression.Effects, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\ThirdParty\Expression\Microsoft.Expression.Effects.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Expression.Interactions, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\ThirdParty\Expression\Microsoft.Expression.Interactions.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Net" />
- <Reference Include="System.Xml" />
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="System.Core" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="System.Xaml">
- <RequiredTargetFramework>4.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="WindowsBase" />
- <Reference Include="PresentationCore" />
- <Reference Include="PresentationFramework" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Controls\BaseItemTile.xaml.cs">
- <DependentUpon>BaseItemTile.xaml</DependentUpon>
- </Compile>
- <Compile Include="Controls\Details\BaseDetailsControl.cs" />
- <Compile Include="Controls\Details\ItemChapters.xaml.cs">
- <DependentUpon>ItemChapters.xaml</DependentUpon>
- </Compile>
- <Compile Include="Controls\Details\ItemGallery.xaml.cs">
- <DependentUpon>ItemGallery.xaml</DependentUpon>
- </Compile>
- <Compile Include="Controls\Details\ItemMediaInfo.xaml.cs">
- <DependentUpon>ItemMediaInfo.xaml</DependentUpon>
- </Compile>
- <Compile Include="Controls\Details\ItemOverview.xaml.cs">
- <DependentUpon>ItemOverview.xaml</DependentUpon>
- </Compile>
- <Compile Include="Controls\Details\ItemPerformers.xaml.cs">
- <DependentUpon>ItemPerformers.xaml</DependentUpon>
- </Compile>
- <Compile Include="Controls\Details\ItemSpecialFeatures.xaml.cs">
- <DependentUpon>ItemSpecialFeatures.xaml</DependentUpon>
- </Compile>
- <Compile Include="Controls\Details\ItemTrailers.xaml.cs">
- <DependentUpon>ItemTrailers.xaml</DependentUpon>
- </Compile>
- <Compile Include="Controls\Details\MediaStreamControl.xaml.cs">
- <DependentUpon>MediaStreamControl.xaml</DependentUpon>
- </Compile>
- <Compile Include="Controls\HomePageTile.xaml.cs">
- <DependentUpon>HomePageTile.xaml</DependentUpon>
- </Compile>
- <Compile Include="Controls\MultiItemTile.xaml.cs">
- <DependentUpon>MultiItemTile.xaml</DependentUpon>
- </Compile>
- <Compile Include="DisplayPreferences\BaseDisplayPreferencesPage.cs" />
- <Compile Include="DisplayPreferences\DisplayPreferencesMenu.xaml.cs">
- <DependentUpon>DisplayPreferencesMenu.xaml</DependentUpon>
- </Compile>
- <Compile Include="DisplayPreferences\IndexMenuPage.xaml.cs">
- <DependentUpon>IndexMenuPage.xaml</DependentUpon>
- </Compile>
- <Compile Include="DisplayPreferences\MainPage.xaml.cs">
- <DependentUpon>MainPage.xaml</DependentUpon>
- </Compile>
- <Compile Include="DisplayPreferences\SortMenuPage.xaml.cs">
- <DependentUpon>SortMenuPage.xaml</DependentUpon>
- </Compile>
- <Compile Include="DisplayPreferences\ViewMenuPage.xaml.cs">
- <DependentUpon>ViewMenuPage.xaml</DependentUpon>
- </Compile>
- <Compile Include="Pages\DetailPage.xaml.cs">
- <DependentUpon>DetailPage.xaml</DependentUpon>
- </Compile>
- <Compile Include="Pages\HomePage.xaml.cs">
- <DependentUpon>HomePage.xaml</DependentUpon>
- </Compile>
- <Compile Include="Pages\InternalPlayerPage.xaml.cs">
- <DependentUpon>InternalPlayerPage.xaml</DependentUpon>
- </Compile>
- <Compile Include="Pages\ListPage.xaml.cs">
- <DependentUpon>ListPage.xaml</DependentUpon>
- </Compile>
- <Compile Include="Pages\LoginPage.xaml.cs">
- <DependentUpon>LoginPage.xaml</DependentUpon>
- </Compile>
- <Compile Include="Pages\WeatherPage.xaml.cs">
- <DependentUpon>WeatherPage.xaml</DependentUpon>
- </Compile>
- <Compile Include="Resources\AppResources.cs" />
- <Compile Include="Converters\WeatherImageConverter.cs" />
- <Compile Include="Properties\AssemblyInfo.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="Properties\Resources.Designer.cs">
- <AutoGen>True</AutoGen>
- <DesignTime>True</DesignTime>
- <DependentUpon>Resources.resx</DependentUpon>
- </Compile>
- <Compile Include="Properties\Settings.Designer.cs">
- <AutoGen>True</AutoGen>
- <DependentUpon>Settings.settings</DependentUpon>
- <DesignTimeSharedInput>True</DesignTimeSharedInput>
- </Compile>
- <Compile Include="Theme.cs" />
- <EmbeddedResource Include="Properties\Resources.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>Resources.Designer.cs</LastGenOutput>
- </EmbeddedResource>
- <None Include="app.config" />
- <None Include="Properties\Settings.settings">
- <Generator>SettingsSingleFileGenerator</Generator>
- <LastGenOutput>Settings.Designer.cs</LastGenOutput>
- </None>
- <AppDesigner Include="Properties\" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\MediaBrowser.ApiInteraction\MediaBrowser.ApiInteraction.csproj">
- <Project>{921c0f64-fda7-4e9f-9e73-0cb0eedb2422}</Project>
- <Name>MediaBrowser.ApiInteraction</Name>
- </ProjectReference>
- <ProjectReference Include="..\MediaBrowser.Common\MediaBrowser.Common.csproj">
- <Project>{9142eefa-7570-41e1-bfcc-468bb571af2f}</Project>
- <Name>MediaBrowser.Common</Name>
- </ProjectReference>
- <ProjectReference Include="..\MediaBrowser.Model\MediaBrowser.Model.csproj">
- <Project>{7eeeb4bb-f3e8-48fc-b4c5-70f0fff8329b}</Project>
- <Name>MediaBrowser.Model</Name>
- </ProjectReference>
- <ProjectReference Include="..\MediaBrowser.UI.Controls\MediaBrowser.UI.Controls.csproj">
- <Project>{1adfe460-fd95-46fa-8871-cccb4b62e2e8}</Project>
- <Name>MediaBrowser.UI.Controls</Name>
- </ProjectReference>
- <ProjectReference Include="..\MediaBrowser.UI\MediaBrowser.UI.csproj">
- <Project>{b5ece1fb-618e-420b-9a99-8e972d76920a}</Project>
- <Name>MediaBrowser.UI</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Page Include="Controls\BaseItemTile.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Controls\Details\ItemChapters.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Controls\Details\ItemGallery.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Controls\Details\ItemMediaInfo.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Controls\Details\ItemOverview.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Controls\Details\ItemPerformers.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Controls\Details\ItemSpecialFeatures.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Controls\Details\ItemTrailers.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Controls\Details\MediaStreamControl.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Controls\HomePageTile.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Controls\MultiItemTile.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="DisplayPreferences\DisplayPreferencesMenu.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="DisplayPreferences\IndexMenuPage.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="DisplayPreferences\MainPage.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="DisplayPreferences\SortMenuPage.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="DisplayPreferences\ViewMenuPage.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Pages\DetailPage.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Pages\HomePage.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Pages\InternalPlayerPage.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Pages\ListPage.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Pages\LoginPage.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Pages\WeatherPage.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Properties\DesignTimeResources.xaml" Condition="'$(DesignTime)'=='true' OR ('$(SolutionPath)'!='' AND Exists('$(SolutionPath)') AND '$(BuildingInsideVisualStudio)'!='true' AND '$(BuildingInsideExpressionBlend)'!='true')">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- <ContainsDesignTimeResources>true</ContainsDesignTimeResources>
- </Page>
- <Page Include="Resources\AppResources.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\CurrentUserDefault.png" />
- <Resource Include="Resources\Images\UserLoginDefault.png" />
- <Resource Include="Resources\Images\Weather\Overcast.png" />
- <Resource Include="Resources\Images\Weather\Rain.png" />
- <Resource Include="Resources\Images\Weather\Snow.png" />
- <Resource Include="Resources\Images\Weather\Sunny.png" />
- <Resource Include="Resources\Images\Weather\Thunder.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\SettingsButton.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\SearchButton.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\VideoDefault.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\starEmpty.png" />
- <Resource Include="Resources\Images\starFull.png" />
- <Resource Include="Resources\Images\starHalf.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\Watched.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\DislikeOverlay.png" />
- <Resource Include="Resources\Images\FavoriteOverlay.png" />
- <Resource Include="Resources\Images\LikeOverlay.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\Weather\Cloudy.png" />
- <Resource Include="Resources\Images\Weather\PartlyCloudy.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\ViewButton.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\ViewMenu\View.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\ViewMenu\Decrease.png" />
- <Resource Include="Resources\Images\ViewMenu\Increase.png" />
- <Resource Include="Resources\Images\ViewMenu\Index.png" />
- <Resource Include="Resources\Images\ViewMenu\Scroll.png" />
- <Resource Include="Resources\Images\ViewMenu\Sort.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\ViewMenu\Close.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\ChapterDefault.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\NowPlayingButton.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\AudioDefault.png" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <PropertyGroup>
- <PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\MediaBrowser.UI\CorePlugins\" /y</PostBuildEvent>
- </PropertyGroup>
- <Import Project="$(SolutionDir)\.nuget\nuget.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
diff --git a/MediaBrowser.Plugins.DefaultTheme/Model/VirtualCollection.cs b/MediaBrowser.Plugins.DefaultTheme/Model/VirtualCollection.cs
deleted file mode 100644
index 9bdf61129..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Model/VirtualCollection.cs
+++ /dev/null
@@ -1,90 +0,0 @@
-using MediaBrowser.Model.DTO;
-using MediaBrowser.UI.Controls;
-using System;
-using System.Threading;
-using System.Windows;
-
-namespace MediaBrowser.Plugins.DefaultTheme.Model
-{
- public class VirtualCollection : ModelItem, IDisposable
- {
- private string _name;
- public string Name
- {
- get { return _name; }
- set
- {
- _name = value;
- OnPropertyChanged("Name");
- }
- }
-
- private DtoBaseItem[] _items;
- public DtoBaseItem[] Items
- {
- get { return _items; }
- set
- {
- _items = value;
- OnPropertyChanged("Items");
- CurrentItemIndex = Items.Length == 0 ? -1 : 0;
-
- ReloadTimer();
- }
- }
-
- private int _currentItemIndex;
- public int CurrentItemIndex
- {
- get { return _currentItemIndex; }
- set
- {
- _currentItemIndex = value;
- OnPropertyChanged("CurrentItemIndex");
- OnPropertyChanged("CurrentItem");
- }
- }
-
- public DtoBaseItem CurrentItem
- {
- get { return CurrentItemIndex == -1 ? null : Items[CurrentItemIndex]; }
- }
-
- private Timer CurrentItemTimer { get; set; }
-
- private void DisposeTimer()
- {
- if (CurrentItemTimer != null)
- {
- CurrentItemTimer.Dispose();
- }
- }
-
- private void ReloadTimer()
- {
- DisposeTimer();
-
- if (Items.Length > 0)
- {
- CurrentItemTimer = new Timer(state => Application.Current.Dispatcher.InvokeAsync(() => IncrementCurrentItemIndex()), null, 5000, 5000);
- }
- }
-
- private void IncrementCurrentItemIndex()
- {
- var newIndex = CurrentItemIndex + 1;
-
- if (newIndex >= Items.Length)
- {
- newIndex = 0;
- }
-
- CurrentItemIndex = newIndex;
- }
-
- public void Dispose()
- {
- DisposeTimer();
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Pages/DetailPage.xaml b/MediaBrowser.Plugins.DefaultTheme/Pages/DetailPage.xaml
deleted file mode 100644
index 1d554e8d9..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Pages/DetailPage.xaml
+++ /dev/null
@@ -1,102 +0,0 @@
-<Pages:BaseDetailPage x:Class="MediaBrowser.Plugins.DefaultTheme.Pages.DetailPage"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:Pages="clr-namespace:MediaBrowser.UI.Pages;assembly=MediaBrowser.UI"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300"
- Title="DetailPage">
-
- <Grid>
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto"></ColumnDefinition>
- <ColumnDefinition Width="*"></ColumnDefinition>
- <ColumnDefinition Width="auto"></ColumnDefinition>
- </Grid.ColumnDefinitions>
-
- <Grid Grid.Column="0" Width="50"></Grid>
- <Grid Grid.Column="1">
-
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="*"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- </Grid.RowDefinitions>
-
- <TextBlock x:Name="TxtName" Grid.Row="0" Style="{StaticResource TextBlockStyle}" HorizontalAlignment="Center" Margin="200 20 200 0" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis"></TextBlock>
-
- <TextBlock x:Name="Tagline" Grid.Row="1" Style="{StaticResource TextBlockStyle}" HorizontalAlignment="Center" Margin="200 20 200 0" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis"></TextBlock>
-
- <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0 25 0 0">
- <controls:ExtendedButton x:Name="BtnOverview" Style="{StaticResource TextButton}" Margin="50 0 50 0">
- <StackPanel Orientation="Horizontal">
- <TextBlock Style="{StaticResource TextBlockStyle}">overview</TextBlock>
- </StackPanel>
- </controls:ExtendedButton>
- <controls:ExtendedButton x:Name="BtnMediaInfo" Style="{StaticResource TextButton}" Margin="50 0 50 0">
- <StackPanel Orientation="Horizontal">
- <TextBlock Style="{StaticResource TextBlockStyle}">media info</TextBlock>
- </StackPanel>
- </controls:ExtendedButton>
- <controls:ExtendedButton x:Name="BtnChapters" Style="{StaticResource TextButton}" Margin="50 0 50 0" Visibility="Collapsed">
- <StackPanel Orientation="Horizontal">
- <TextBlock Style="{StaticResource TextBlockStyle}">scenes</TextBlock>
- </StackPanel>
- </controls:ExtendedButton>
- <controls:ExtendedButton x:Name="BtnTrailers" Style="{StaticResource TextButton}" Margin="50 0 50 0" Visibility="Collapsed">
- <StackPanel Orientation="Horizontal">
- <TextBlock Style="{StaticResource TextBlockStyle}">trailers</TextBlock>
- </StackPanel>
- </controls:ExtendedButton>
- <controls:ExtendedButton x:Name="BtnSpecialFeatures" Style="{StaticResource TextButton}" Margin="50 0 50 0" Visibility="Collapsed">
- <StackPanel Orientation="Horizontal">
- <TextBlock Style="{StaticResource TextBlockStyle}">special features</TextBlock>
- </StackPanel>
- </controls:ExtendedButton>
- <controls:ExtendedButton x:Name="BtnPerformers" Style="{StaticResource TextButton}" Margin="50 0 50 0" Visibility="Collapsed">
- <StackPanel Orientation="Horizontal">
- <TextBlock Style="{StaticResource TextBlockStyle}">performers</TextBlock>
- </StackPanel>
- </controls:ExtendedButton>
- <controls:ExtendedButton x:Name="BtnGallery" Style="{StaticResource TextButton}" Margin="50 0 50 0" Visibility="Collapsed">
- <StackPanel Orientation="Horizontal">
- <TextBlock Style="{StaticResource TextBlockStyle}">gallery</TextBlock>
- </StackPanel>
- </controls:ExtendedButton>
- </StackPanel>
-
- <Grid Grid.Row="3">
- <Separator Background="#eeeeee" Margin="50 5 50 0" Height="10"></Separator>
- </Grid>
-
- <Grid Grid.Row="4" Margin="0 25 0 0">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto"></ColumnDefinition>
- <ColumnDefinition Width="auto"></ColumnDefinition>
- <ColumnDefinition Width="*"></ColumnDefinition>
- </Grid.ColumnDefinitions>
-
- <Grid Grid.Column="0" x:Name="PrimaryImageGrid">
- <Image x:Name="PrimaryImage" Stretch="Uniform" HorizontalAlignment="Center" VerticalAlignment="Top" MaxWidth="550" MaxHeight="700"></Image>
- </Grid>
-
- <Grid Grid.Column="1" Width="50"></Grid>
-
- <Grid Grid.Column="2">
- <ContentControl x:Name="DetailContent"></ContentControl>
- </Grid>
-
- </Grid>
- <Grid Grid.Row="5" Height="50">
- </Grid>
- </Grid>
- <Grid Grid.Column="2" Width="50"></Grid>
- </Grid>
-</Pages:BaseDetailPage>
diff --git a/MediaBrowser.Plugins.DefaultTheme/Pages/DetailPage.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/Pages/DetailPage.xaml.cs
deleted file mode 100644
index e907ca6a0..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Pages/DetailPage.xaml.cs
+++ /dev/null
@@ -1,268 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Entities;
-using MediaBrowser.Model.Net;
-using MediaBrowser.Plugins.DefaultTheme.Controls.Details;
-using MediaBrowser.Plugins.DefaultTheme.Resources;
-using MediaBrowser.UI;
-using MediaBrowser.UI.Controller;
-using MediaBrowser.UI.Pages;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Media.Imaging;
-
-namespace MediaBrowser.Plugins.DefaultTheme.Pages
-{
- /// <summary>
- /// Interaction logic for DetailPage.xaml
- /// </summary>
- public partial class DetailPage : BaseDetailPage
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="DetailPage" /> class.
- /// </summary>
- /// <param name="itemId">The item id.</param>
- public DetailPage(string itemId)
- : base(itemId)
- {
- InitializeComponent();
-
- BtnOverview.Click += BtnOverview_Click;
- BtnChapters.Click += BtnChapters_Click;
- BtnMediaInfo.Click += BtnDetails_Click;
- BtnPerformers.Click += BtnPerformers_Click;
- BtnTrailers.Click += BtnTrailers_Click;
- BtnSpecialFeatures.Click += BtnSpecialFeatures_Click;
- BtnGallery.Click += BtnGallery_Click;
- }
-
- /// <summary>
- /// Handles the Click event of the BtnGallery 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 BtnGallery_Click(object sender, RoutedEventArgs e)
- {
- PrimaryImageGrid.Visibility = Visibility.Collapsed;
- ShowDetailControl(BtnGallery, new ItemGallery { });
- }
-
- /// <summary>
- /// Handles the Click event of the BtnSpecialFeatures 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 BtnSpecialFeatures_Click(object sender, RoutedEventArgs e)
- {
- PrimaryImageGrid.Visibility = Visibility.Collapsed;
- ShowDetailControl(BtnSpecialFeatures, new ItemSpecialFeatures { });
- }
-
- /// <summary>
- /// Handles the Click event of the BtnTrailers 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 BtnTrailers_Click(object sender, RoutedEventArgs e)
- {
- PrimaryImageGrid.Visibility = Visibility.Collapsed;
- ShowDetailControl(BtnTrailers, new ItemTrailers { });
- }
-
- /// <summary>
- /// Handles the Click event of the BtnDetails 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 BtnDetails_Click(object sender, RoutedEventArgs e)
- {
- PrimaryImageGrid.Visibility = Visibility.Visible;
- ShowDetailControl(BtnMediaInfo, new ItemMediaInfo { });
- }
-
- /// <summary>
- /// Handles the Click event of the BtnChapters 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 BtnChapters_Click(object sender, RoutedEventArgs e)
- {
- PrimaryImageGrid.Visibility = Visibility.Collapsed;
- ShowDetailControl(BtnChapters, new ItemChapters { });
- }
-
- /// <summary>
- /// Handles the Click event of the BtnOverview 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 BtnOverview_Click(object sender, RoutedEventArgs e)
- {
- PrimaryImageGrid.Visibility = Visibility.Visible;
- ShowDetailControl(BtnOverview, new ItemOverview { });
- }
-
- /// <summary>
- /// Handles the Click event of the BtnPerformers 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 BtnPerformers_Click(object sender, RoutedEventArgs e)
- {
- PrimaryImageGrid.Visibility = Visibility.Collapsed;
- ShowDetailControl(BtnPerformers, new ItemPerformers { });
- }
-
- /// <summary>
- /// Handles the Click event of the BtnQueue 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 BtnQueue_Click(object sender, RoutedEventArgs e)
- {
- Queue();
- }
-
- /// <summary>
- /// Called when [loaded].
- /// </summary>
- protected override async void OnLoaded()
- {
- base.OnLoaded();
-
- if (Item != null)
- {
- await AppResources.Instance.SetPageTitle(Item);
- }
- }
-
- /// <summary>
- /// Called when [item changed].
- /// </summary>
- protected override async void OnItemChanged()
- {
- base.OnItemChanged();
-
- var pageTitleTask = AppResources.Instance.SetPageTitle(Item);
-
- BtnOverview_Click(null, null);
-
- RenderItem();
-
- await pageTitleTask;
- }
-
- /// <summary>
- /// Renders the item.
- /// </summary>
- private async void RenderItem()
- {
- Task<BitmapImage> primaryImageTask = null;
-
- if (Item.HasPrimaryImage)
- {
- PrimaryImage.Visibility = Visibility.Visible;
-
- primaryImageTask = App.Instance.GetRemoteBitmapAsync(UIKernel.Instance.ApiClient.GetImageUrl(Item, new ImageOptions
- {
- ImageType = ImageType.Primary,
- Quality = 100
- }));
- }
- else
- {
- SetDefaultImage();
- }
-
- if (Item.IsType("movie") || Item.IsType("trailer"))
- {
- TxtName.Visibility = Visibility.Collapsed;
- }
- else
- {
- var name = Item.Name;
-
- if (Item.IndexNumber.HasValue)
- {
- name = Item.IndexNumber.Value + " - " + name;
-
- if (Item.ParentIndexNumber.HasValue)
- {
- name = Item.ParentIndexNumber.Value + "." + name;
- }
- }
- TxtName.Text = name;
-
- TxtName.Visibility = Visibility.Visible;
- }
-
- if (Item.Taglines != null && Item.Taglines.Count > 0)
- {
- Tagline.Visibility = Visibility.Visible;
-
- Tagline.Text = Item.Taglines[0];
- }
- else
- {
- Tagline.Visibility = Visibility.Collapsed;
- }
-
- BtnGallery.Visibility = ItemGallery.GetImages(Item).Count > 0 ? Visibility.Visible : Visibility.Collapsed;
- BtnTrailers.Visibility = Item.HasTrailer ? Visibility.Visible : Visibility.Collapsed;
- BtnSpecialFeatures.Visibility = Item.SpecialFeatureCount > 0 ? Visibility.Visible : Visibility.Collapsed;
- BtnPerformers.Visibility = Item.People != null && Item.People.Length > 0 ? Visibility.Visible : Visibility.Collapsed;
- BtnChapters.Visibility = Item.Chapters != null && Item.Chapters.Count > 0 ? Visibility.Visible : Visibility.Collapsed;
-
- if (primaryImageTask != null)
- {
- try
- {
- PrimaryImage.Source = await primaryImageTask;
- }
- catch (HttpException)
- {
- SetDefaultImage();
- }
- }
- }
-
- /// <summary>
- /// Sets the default image.
- /// </summary>
- private void SetDefaultImage()
- {
- PrimaryImage.Visibility = Visibility.Collapsed;
- }
-
- /// <summary>
- /// Handles the 1 event of the Button_Click control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
- private void Button_Click_1(object sender, RoutedEventArgs e)
- {
- Play();
- }
-
- /// <summary>
- /// Handles the 2 event of the Button_Click control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
- private async void Button_Click_2(object sender, RoutedEventArgs e)
- {
- await UIKernel.Instance.PlaybackManager.StopAllPlayback();
- }
-
- /// <summary>
- /// Shows the detail control.
- /// </summary>
- /// <param name="button">The button.</param>
- /// <param name="element">The element.</param>
- private void ShowDetailControl(Button button, BaseDetailsControl element)
- {
- DetailContent.Content = element;
- element.Item = Item;
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Pages/HomePage.xaml b/MediaBrowser.Plugins.DefaultTheme/Pages/HomePage.xaml
deleted file mode 100644
index 5ac73b2b3..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Pages/HomePage.xaml
+++ /dev/null
@@ -1,69 +0,0 @@
-<Pages:BaseHomePage x:Class="MediaBrowser.Plugins.DefaultTheme.Pages.HomePage"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:Pages="clr-namespace:MediaBrowser.UI.Pages;assembly=MediaBrowser.UI"
- xmlns:themecontrols="clr-namespace:MediaBrowser.Plugins.DefaultTheme.Controls"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- Title="HomePage">
-
- <controls:ExtendedScrollViewer x:Name="scrollviewer" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Disabled" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" CanContentScroll="True">
- <controls:ScrollingPanel CanHorizontallyScroll="True" CanVerticallyScroll="False" HorizontalAlignment="Stretch">
- <Grid HorizontalAlignment="Stretch">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="*"></RowDefinition>
- </Grid.RowDefinitions>
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="4*"></ColumnDefinition>
- <ColumnDefinition Width="1*"></ColumnDefinition>
- </Grid.ColumnDefinitions>
-
- <TextBlock HorizontalAlignment="Left" Text="my media >" Grid.Row="0" Grid.Column="0" Style="{StaticResource Heading2TextBlockStyle}" Margin="90 40 0 0"></TextBlock>
-
- <Grid Grid.Row="1" Grid.Column="0" Margin="70 60 20 50">
-
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto"></ColumnDefinition>
- <ColumnDefinition Width="auto"></ColumnDefinition>
- <ColumnDefinition Width="auto"></ColumnDefinition>
- </Grid.ColumnDefinitions>
-
- <controls:ExtendedButton x:Name="btnSpotlight" Style="{StaticResource SpotlightButtonStyle}" Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" Grid.ColumnSpan="2">
- <themecontrols:MultiItemTile x:Name="spotlightControl" DataContext="{Binding SpotlightItems}" ImageWidth="806" ImageHeight="456"></themecontrols:MultiItemTile>
- </controls:ExtendedButton>
- <controls:ExtendedButton Style="{StaticResource BaseItemButtonStyle}" Grid.Row="2" Grid.Column="0">
- <themecontrols:MultiItemTile x:Name="recentlyAddedControl" DataContext="{Binding RecentlyAddedItems}" ImageWidth="400" ImageHeight="225"></themecontrols:MultiItemTile>
- </controls:ExtendedButton>
- <controls:ExtendedButton Style="{StaticResource BaseItemButtonStyle}" Grid.Row="2" Grid.Column="1">
- <themecontrols:MultiItemTile x:Name="topPicksControl" DataContext="{Binding TopPicks}" ImageWidth="400" ImageHeight="225"></themecontrols:MultiItemTile>
- </controls:ExtendedButton>
- <controls:ExtendedButton Style="{StaticResource BaseItemButtonStyle}" Grid.Row="0" Grid.Column="2">
- <themecontrols:MultiItemTile x:Name="recentlyPlayedControl" DataContext="{Binding RecentlyPlayedItems}" ImageWidth="400" ImageHeight="225"></themecontrols:MultiItemTile>
- </controls:ExtendedButton>
- <controls:ExtendedButton Style="{StaticResource BaseItemButtonStyle}" Grid.Row="1" Grid.Column="2">
- <themecontrols:MultiItemTile x:Name="resumableControl" DataContext="{Binding ResumableItems}" ImageWidth="400" ImageHeight="225"></themecontrols:MultiItemTile>
- </controls:ExtendedButton>
- <controls:ExtendedButton Style="{StaticResource BaseItemButtonStyle}" Grid.Row="2" Grid.Column="2">
- <themecontrols:MultiItemTile x:Name="favoriteItemsControl" DataContext="{Binding FavoriteItems}" ImageWidth="400" ImageHeight="225"></themecontrols:MultiItemTile>
- </controls:ExtendedButton>
-
- </Grid>
- <TextBlock HorizontalAlignment="Left" Text="all media >" Grid.Row="0" Grid.Column="1" Style="{StaticResource Heading2TextBlockStyle}" Margin="90 40 0 0"></TextBlock>
-
- <controls:ExtendedListBox x:Name="lstCollectionFolders" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled" ItemsSource="{Binding Path=DisplayChildren,IsAsync=True,Mode=OneWay}" Style="{StaticResource ListBoxStyle}" ItemContainerStyle="{StaticResource ListBoxItemStyle}" Grid.Row="1" Grid.Column="1" AutoFocus="False" ScrollViewer.CanContentScroll="False" ItemTemplate="{StaticResource HomePageListBoxItemTemplate}">
- <controls:ExtendedListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Vertical" VerticalAlignment="Top" IsItemsHost="True" Margin="50 60 50 50" />
- </ItemsPanelTemplate>
- </controls:ExtendedListBox.ItemsPanel>
- </controls:ExtendedListBox>
- </Grid>
- </controls:ScrollingPanel>
- </controls:ExtendedScrollViewer>
-</Pages:BaseHomePage>
diff --git a/MediaBrowser.Plugins.DefaultTheme/Pages/HomePage.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/Pages/HomePage.xaml.cs
deleted file mode 100644
index 719a31f34..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Pages/HomePage.xaml.cs
+++ /dev/null
@@ -1,442 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Entities;
-using MediaBrowser.Model.Net;
-using MediaBrowser.Plugins.DefaultTheme.Resources;
-using MediaBrowser.UI;
-using MediaBrowser.UI.Controls;
-using MediaBrowser.UI.Pages;
-using MediaBrowser.UI.ViewModels;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace MediaBrowser.Plugins.DefaultTheme.Pages
-{
- /// <summary>
- /// Interaction logic for HomePage.xaml
- /// </summary>
- public partial class HomePage : BaseHomePage
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="HomePage" /> class.
- /// </summary>
- public HomePage()
- {
- InitializeComponent();
-
- lstCollectionFolders.ItemInvoked += lstCollectionFolders_ItemInvoked;
- }
-
- /// <summary>
- /// The _favorite items
- /// </summary>
- private ItemCollectionViewModel _favoriteItems;
- /// <summary>
- /// Gets or sets the favorite items.
- /// </summary>
- /// <value>The favorite items.</value>
- public ItemCollectionViewModel FavoriteItems
- {
- get { return _favoriteItems; }
-
- set
- {
- _favoriteItems = value;
- OnPropertyChanged("FavoriteItems");
- }
- }
-
- /// <summary>
- /// The _resumable items
- /// </summary>
- private ItemCollectionViewModel _resumableItems;
- /// <summary>
- /// Gets or sets the resumable items.
- /// </summary>
- /// <value>The resumable items.</value>
- public ItemCollectionViewModel ResumableItems
- {
- get { return _resumableItems; }
-
- set
- {
- _resumableItems = value;
- OnPropertyChanged("ResumableItems");
- }
- }
-
- /// <summary>
- /// The _recently added items
- /// </summary>
- private ItemCollectionViewModel _recentlyAddedItems;
- /// <summary>
- /// Gets or sets the recently added items.
- /// </summary>
- /// <value>The recently added items.</value>
- public ItemCollectionViewModel RecentlyAddedItems
- {
- get { return _recentlyAddedItems; }
-
- set
- {
- _recentlyAddedItems = value;
- OnPropertyChanged("RecentlyAddedItems");
- }
- }
-
- /// <summary>
- /// The _recently played items
- /// </summary>
- private ItemCollectionViewModel _recentlyPlayedItems;
- /// <summary>
- /// Gets or sets the recently played items.
- /// </summary>
- /// <value>The recently played items.</value>
- public ItemCollectionViewModel RecentlyPlayedItems
- {
- get { return _recentlyPlayedItems; }
-
- set
- {
- _recentlyPlayedItems = value;
- OnPropertyChanged("RecentlyPlayedItems");
- }
- }
-
- /// <summary>
- /// The _spotlight items
- /// </summary>
- private ItemCollectionViewModel _spotlightItems;
- /// <summary>
- /// Gets or sets the spotlight items.
- /// </summary>
- /// <value>The spotlight items.</value>
- public ItemCollectionViewModel SpotlightItems
- {
- get { return _spotlightItems; }
-
- set
- {
- _spotlightItems = value;
- OnPropertyChanged("SpotlightItems");
- }
- }
-
- /// <summary>
- /// The _top picks
- /// </summary>
- private ItemCollectionViewModel _topPicks;
- /// <summary>
- /// Gets or sets the top picks.
- /// </summary>
- /// <value>The top picks.</value>
- public ItemCollectionViewModel TopPicks
- {
- get { return _topPicks; }
-
- set
- {
- _topPicks = value;
- OnPropertyChanged("TopPicks");
- }
- }
-
- /// <summary>
- /// LSTs the collection folders_ item invoked.
- /// </summary>
- /// <param name="sender">The sender.</param>
- /// <param name="e">The e.</param>
- void lstCollectionFolders_ItemInvoked(object sender, ItemEventArgs<object> e)
- {
- var model = e.Argument as DtoBaseItemViewModel;
-
- if (model != null)
- {
- App.Instance.NavigateToItem(model.Item);
- }
- }
-
- /// <summary>
- /// Called when [loaded].
- /// </summary>
- protected override void OnLoaded()
- {
- base.OnLoaded();
-
- AppResources.Instance.SetDefaultPageTitle();
- }
-
- /// <summary>
- /// Gets called anytime the Folder gets refreshed
- /// </summary>
- protected override void OnFolderChanged()
- {
- base.OnFolderChanged();
-
- Task.Run(() => RefreshSpecialItems());
- }
-
- /// <summary>
- /// Refreshes the special items.
- /// </summary>
- /// <returns>Task.</returns>
- private async Task RefreshSpecialItems()
- {
- var tasks = new List<Task>();
-
- tasks.Add(RefreshFavoriteItemsAsync());
-
- // In-Progress Items
- if (Folder.ResumableItemCount > 0)
- {
- tasks.Add(RefreshResumableItemsAsync());
- }
- else
- {
- SetResumableItems(new BaseItemDto[] { });
- }
-
- // Recently Added Items
- if (Folder.RecentlyAddedItemCount > 0)
- {
- tasks.Add(RefreshRecentlyAddedItemsAsync());
- }
- else
- {
- SetRecentlyAddedItems(new BaseItemDto[] { });
- }
-
- // Recently Played Items
- if (Folder.RecentlyPlayedItemCount > 0)
- {
- tasks.Add(RefreshRecentlyPlayedItemsAsync());
- }
- else
- {
- SetRecentlyPlayedItems(new BaseItemDto[] { });
- }
-
- tasks.Add(RefreshTopPicksAsync());
- tasks.Add(RefreshSpotlightItemsAsync());
-
- await Task.WhenAll(tasks).ConfigureAwait(false);
- }
-
- /// <summary>
- /// Refreshes the favorite items async.
- /// </summary>
- /// <returns>Task.</returns>
- private async Task RefreshFavoriteItemsAsync()
- {
- var query = new ItemQuery
- {
- Filters = new[] { ItemFilter.IsFavorite },
- ImageTypes = new[] { ImageType.Backdrop, ImageType.Thumb },
- UserId = App.Instance.CurrentUser.Id,
- ParentId = Folder.Id,
- Limit = 10,
- SortBy = new[] { ItemSortBy.Random },
- Recursive = true
- };
-
- try
- {
- var result = await App.Instance.ApiClient.GetItemsAsync(query).ConfigureAwait(false);
-
- SetFavoriteItems(result.Items);
- }
- catch (HttpException)
- {
- // Already logged in lower levels
- // Don't allow the entire screen to fail
- }
- }
-
- /// <summary>
- /// Refreshes the resumable items async.
- /// </summary>
- /// <returns>Task.</returns>
- private async Task RefreshResumableItemsAsync()
- {
- var query = new ItemQuery
- {
- Filters = new[] { ItemFilter.IsResumable },
- ImageTypes = new[] { ImageType.Backdrop, ImageType.Thumb },
- UserId = App.Instance.CurrentUser.Id,
- ParentId = Folder.Id,
- Limit = 10,
- SortBy = new[] { ItemSortBy.DatePlayed },
- SortOrder = SortOrder.Descending,
- Recursive = true
- };
-
- try
- {
- var result = await App.Instance.ApiClient.GetItemsAsync(query).ConfigureAwait(false);
-
- SetResumableItems(result.Items);
- }
- catch (HttpException)
- {
- // Already logged in lower levels
- // Don't allow the entire screen to fail
- }
- }
-
- /// <summary>
- /// Refreshes the recently played items async.
- /// </summary>
- /// <returns>Task.</returns>
- private async Task RefreshRecentlyPlayedItemsAsync()
- {
- var query = new ItemQuery
- {
- Filters = new[] { ItemFilter.IsRecentlyPlayed },
- ImageTypes = new[] { ImageType.Backdrop, ImageType.Thumb },
- UserId = App.Instance.CurrentUser.Id,
- ParentId = Folder.Id,
- Limit = 10,
- SortBy = new[] { ItemSortBy.DatePlayed },
- SortOrder = SortOrder.Descending,
- Recursive = true
- };
-
- try
- {
- var result = await App.Instance.ApiClient.GetItemsAsync(query).ConfigureAwait(false);
- SetRecentlyPlayedItems(result.Items);
- }
- catch (HttpException)
- {
- // Already logged in lower levels
- // Don't allow the entire screen to fail
- }
- }
-
- /// <summary>
- /// Refreshes the recently added items async.
- /// </summary>
- /// <returns>Task.</returns>
- private async Task RefreshRecentlyAddedItemsAsync()
- {
- var query = new ItemQuery
- {
- Filters = new[] { ItemFilter.IsRecentlyAdded, ItemFilter.IsNotFolder },
- ImageTypes = new[] { ImageType.Backdrop, ImageType.Thumb },
- UserId = App.Instance.CurrentUser.Id,
- ParentId = Folder.Id,
- Limit = 10,
- SortBy = new[] { ItemSortBy.DateCreated },
- SortOrder = SortOrder.Descending,
- Recursive = true
- };
-
- try
- {
- var result = await App.Instance.ApiClient.GetItemsAsync(query).ConfigureAwait(false);
- SetRecentlyAddedItems(result.Items);
- }
- catch (HttpException)
- {
- // Already logged in lower levels
- // Don't allow the entire screen to fail
- }
- }
-
- /// <summary>
- /// Refreshes the top picks async.
- /// </summary>
- /// <returns>Task.</returns>
- private async Task RefreshTopPicksAsync()
- {
- var query = new ItemQuery
- {
- ImageTypes = new[] { ImageType.Backdrop, ImageType.Thumb },
- Filters = new[] { ItemFilter.IsRecentlyAdded, ItemFilter.IsNotFolder },
- UserId = App.Instance.CurrentUser.Id,
- ParentId = Folder.Id,
- Limit = 10,
- SortBy = new[] { ItemSortBy.Random },
- SortOrder = SortOrder.Descending,
- Recursive = true
- };
-
- try
- {
- var result = await App.Instance.ApiClient.GetItemsAsync(query).ConfigureAwait(false);
-
- TopPicks = new ItemCollectionViewModel { Items = result.Items, Name = "Top Picks" };
- }
- catch (HttpException)
- {
- // Already logged in lower levels
- // Don't allow the entire screen to fail
- }
- }
-
- /// <summary>
- /// Refreshes the spotlight items async.
- /// </summary>
- /// <returns>Task.</returns>
- private async Task RefreshSpotlightItemsAsync()
- {
- var query = new ItemQuery
- {
- ImageTypes = new[] { ImageType.Backdrop },
- ExcludeItemTypes = new[] { "Season" },
- UserId = App.Instance.CurrentUser.Id,
- ParentId = Folder.Id,
- Limit = 10,
- SortBy = new[] { ItemSortBy.Random },
- Recursive = true
- };
-
- try
- {
- var result = await App.Instance.ApiClient.GetItemsAsync(query).ConfigureAwait(false);
-
- SpotlightItems = new ItemCollectionViewModel(rotationPeriodMs: 6000, rotationDevaiationMs: 1000) { Items = result.Items };
- }
- catch (HttpException)
- {
- // Already logged in lower levels
- // Don't allow the entire screen to fail
- }
- }
-
- /// <summary>
- /// Sets the favorite items.
- /// </summary>
- /// <param name="items">The items.</param>
- private void SetFavoriteItems(BaseItemDto[] items)
- {
- FavoriteItems = new ItemCollectionViewModel { Items = items, Name = "Favorites" };
- }
-
- /// <summary>
- /// Sets the resumable items.
- /// </summary>
- /// <param name="items">The items.</param>
- private void SetResumableItems(BaseItemDto[] items)
- {
- ResumableItems = new ItemCollectionViewModel { Items = items, Name = "Resume" };
- }
-
- /// <summary>
- /// Sets the recently played items.
- /// </summary>
- /// <param name="items">The items.</param>
- private void SetRecentlyPlayedItems(BaseItemDto[] items)
- {
- RecentlyPlayedItems = new ItemCollectionViewModel { Items = items, Name = "Recently Played" };
- }
-
- /// <summary>
- /// Sets the recently added items.
- /// </summary>
- /// <param name="items">The items.</param>
- private void SetRecentlyAddedItems(BaseItemDto[] items)
- {
- RecentlyAddedItems = new ItemCollectionViewModel { Items = items, Name = "Recently Added" };
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Pages/InternalPlayerPage.xaml b/MediaBrowser.Plugins.DefaultTheme/Pages/InternalPlayerPage.xaml
deleted file mode 100644
index e8e4af2aa..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Pages/InternalPlayerPage.xaml
+++ /dev/null
@@ -1,14 +0,0 @@
-<pages:BaseInternalPlayerPage x:Class="MediaBrowser.Plugins.DefaultTheme.Pages.InternalPlayerPage"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:pages="clr-namespace:MediaBrowser.UI.Pages;assembly=MediaBrowser.UI"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300"
- Title="InternalPlayerPage">
-
- <Grid>
-
- </Grid>
-</pages:BaseInternalPlayerPage>
diff --git a/MediaBrowser.Plugins.DefaultTheme/Pages/InternalPlayerPage.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/Pages/InternalPlayerPage.xaml.cs
deleted file mode 100644
index 82a1e9cf8..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Pages/InternalPlayerPage.xaml.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using MediaBrowser.Plugins.DefaultTheme.Resources;
-using MediaBrowser.UI.Pages;
-using System.Windows;
-
-namespace MediaBrowser.Plugins.DefaultTheme.Pages
-{
- /// <summary>
- /// Interaction logic for InternalPlayerPage.xaml
- /// </summary>
- public partial class InternalPlayerPage : BaseInternalPlayerPage
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="InternalPlayerPage" /> class.
- /// </summary>
- public InternalPlayerPage()
- {
- InitializeComponent();
- }
-
- /// <summary>
- /// Called when [loaded].
- /// </summary>
- protected override void OnLoaded()
- {
- base.OnLoaded();
-
- AppResources.Instance.ClearPageTitle();
- AppResources.Instance.HeaderContent.Visibility = Visibility.Collapsed;
- }
-
- /// <summary>
- /// Called when [unloaded].
- /// </summary>
- protected override void OnUnloaded()
- {
- base.OnUnloaded();
-
- AppResources.Instance.HeaderContent.Visibility = Visibility.Visible;
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Pages/ListPage.xaml b/MediaBrowser.Plugins.DefaultTheme/Pages/ListPage.xaml
deleted file mode 100644
index 58f6db177..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Pages/ListPage.xaml
+++ /dev/null
@@ -1,74 +0,0 @@
-<Pages:BaseListPage x:Class="MediaBrowser.Plugins.DefaultTheme.Pages.ListPage"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:Pages="clr-namespace:MediaBrowser.UI.Pages;assembly=MediaBrowser.UI"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300"
- Title="ListPage">
-
- <Page.Resources>
- <ResourceDictionary>
- <Style TargetType="Image" x:Key="CommunityRatingImage">
- <Setter Property="Stretch" Value="Uniform"/>
- <Setter Property="Height" Value="36" />
- </Style>
- <Style TargetType="Image" x:Key="CommunityRatingImageFull" BasedOn="{StaticResource CommunityRatingImage}">
- <Setter Property="Source" Value="../Resources/Images/starFull.png" />
- </Style>
- <Style TargetType="Image" x:Key="CommunityRatingImageHalf" BasedOn="{StaticResource CommunityRatingImage}">
- <Setter Property="Source" Value="../Resources/Images/starHalf.png" />
- </Style>
- <Style TargetType="Image" x:Key="CommunityRatingImageEmpty" BasedOn="{StaticResource CommunityRatingImage}">
- <Setter Property="Source" Value="../Resources/Images/starEmpty.png" />
- </Style>
-
- <Style TargetType="Border" x:Key="MediaInfoSeparator">
- <Setter Property="Height" Value="15" />
- <Setter Property="Width" Value="15" />
- <Setter Property="Background" Value="#cc3333" />
- <Setter Property="Margin" Value="0 0 5 0" />
- </Style>
-
- </ResourceDictionary>
- </Page.Resources>
-
- <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
-
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="*"></RowDefinition>
- </Grid.RowDefinitions>
-
- <TextBlock x:Name="TxtName" Style="{StaticResource TextBlockStyle}" Margin="30 0 0 0" Grid.Row="0"></TextBlock>
-
- <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Left" Margin="30 0 0 0">
- <TextBlock x:Name="currentItemIndex" Style="{StaticResource TextBlockStyle}"></TextBlock>
- <TextBlock x:Name="currentItemIndexDivider" Text="|" Style="{StaticResource TextBlockStyle}"></TextBlock>
- <TextBlock Text="{Binding Path=ChildCount,Mode=OneWay}" Style="{StaticResource TextBlockStyle}"></TextBlock>
- </StackPanel>
-
- <Grid Grid.Row="2">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto"></ColumnDefinition>
- <ColumnDefinition Width="*"></ColumnDefinition>
- </Grid.ColumnDefinitions>
-
- <Grid x:Name="sidebar" Grid.Column="0" Margin="40 50 30 0" Width="560">
- <StackPanel Orientation="Vertical">
-
- <Image x:Name="backdropImage" Stretch="Uniform"></Image>
-
- <TextBlock Text="{Binding Path=Folder.Overview,Mode=OneWay}"></TextBlock>
- </StackPanel>
- </Grid>
-
- <controls:ExtendedListBox x:Name="lstItems" ItemsSource="{Binding Path=DisplayChildren,IsAsync=True,Mode=OneWay}" Style="{StaticResource ListPageListBoxStyle}" ItemContainerStyle="{StaticResource ListBoxItemStyle}" DataContext="{Binding Mode=OneWay}" Grid.Column="1">
- </controls:ExtendedListBox>
- </Grid>
- </Grid>
-</Pages:BaseListPage>
diff --git a/MediaBrowser.Plugins.DefaultTheme/Pages/ListPage.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/Pages/ListPage.xaml.cs
deleted file mode 100644
index 096ba9ea7..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Pages/ListPage.xaml.cs
+++ /dev/null
@@ -1,545 +0,0 @@
-using MediaBrowser.Model.Entities;
-using MediaBrowser.Model.Net;
-using MediaBrowser.Plugins.DefaultTheme.DisplayPreferences;
-using MediaBrowser.Plugins.DefaultTheme.Resources;
-using MediaBrowser.UI;
-using MediaBrowser.UI.Controls;
-using MediaBrowser.UI.Pages;
-using System;
-using System.Windows;
-
-namespace MediaBrowser.Plugins.DefaultTheme.Pages
-{
- /// <summary>
- /// Interaction logic for ListPage.xaml
- /// </summary>
- public partial class ListPage : BaseListPage
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="ListPage" /> class.
- /// </summary>
- /// <param name="itemId">The item id.</param>
- public ListPage(string itemId)
- : base(itemId)
- {
- InitializeComponent();
- }
-
- /// <summary>
- /// Subclasses must provide the list box that holds the items
- /// </summary>
- /// <value>The items list.</value>
- protected override ExtendedListBox ItemsList
- {
- get
- {
- return lstItems;
- }
- }
-
- /// <summary>
- /// If the page is using it's own image type and not honoring the DisplayPreferences setting, it should return it here
- /// </summary>
- /// <value>The type of the fixed image.</value>
- protected override ImageType? FixedImageType
- {
- get { return ImageType.Primary; }
- }
-
- /// <summary>
- /// Called when [loaded].
- /// </summary>
- protected override async void OnLoaded()
- {
- base.OnLoaded();
-
- if (Folder != null)
- {
- ShowViewButton();
-
- await AppResources.Instance.SetPageTitle(Folder);
- }
- else
- {
- HideViewButton();
- }
- }
-
- /// <summary>
- /// Called when [unloaded].
- /// </summary>
- protected override void OnUnloaded()
- {
- base.OnUnloaded();
-
- HideViewButton();
- }
-
- /// <summary>
- /// Called when [property changed].
- /// </summary>
- /// <param name="name">The name.</param>
- public override void OnPropertyChanged(string name)
- {
- base.OnPropertyChanged(name);
-
- if (name.Equals("CurrentItemIndex", StringComparison.OrdinalIgnoreCase))
- {
- UpdateCurrentItemIndex();
- }
- }
-
- /// <summary>
- /// Updates the index of the current item.
- /// </summary>
- private void UpdateCurrentItemIndex()
- {
- var index = CurrentItemIndex;
-
- currentItemIndex.Visibility = index == -1 ? Visibility.Collapsed : Visibility.Visible;
- currentItemIndex.Text = (CurrentItemIndex + 1).ToString();
-
- currentItemIndexDivider.Visibility = index == -1 ? Visibility.Collapsed : Visibility.Visible;
- }
-
- /// <summary>
- /// Gets called anytime the Folder gets refreshed
- /// </summary>
- protected override async void OnFolderChanged()
- {
- base.OnFolderChanged();
-
- var pageTitleTask = AppResources.Instance.SetPageTitle(Folder);
-
- ShowViewButton();
-
- if (Folder.IsType("Season"))
- {
- TxtName.Visibility = Visibility.Visible;
- TxtName.Text = Folder.Name;
- }
- else
- {
- TxtName.Visibility = Visibility.Collapsed;
- }
-
- if (!string.IsNullOrEmpty(Folder.Overview) || Folder.IsType("Series") || Folder.IsType("Season"))
- {
- sidebar.Visibility = Visibility.Collapsed;
-
- //RefreshSidebar();
- }
- else
- {
- sidebar.Visibility = Visibility.Collapsed;
- }
-
- await pageTitleTask;
- }
-
- /// <summary>
- /// Shows the view button.
- /// </summary>
- private void ShowViewButton()
- {
- var viewButton = AppResources.Instance.ViewButton;
- viewButton.Visibility = Visibility.Visible;
- viewButton.Click -= ViewButton_Click;
- viewButton.Click += ViewButton_Click;
- }
-
- /// <summary>
- /// Hides the view button.
- /// </summary>
- private void HideViewButton()
- {
- var viewButton = AppResources.Instance.ViewButton;
- viewButton.Visibility = Visibility.Collapsed;
- viewButton.Click -= ViewButton_Click;
- }
-
- /// <summary>
- /// Handles the Click event of the ViewButton control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
- async void ViewButton_Click(object sender, RoutedEventArgs e)
- {
- var menu = new DisplayPreferencesMenu
- {
- FolderId = Folder.Id,
- MainPage = this
- };
-
- menu.ShowModal(this.GetWindow());
-
- try
- {
- await App.Instance.ApiClient.UpdateDisplayPreferencesAsync(App.Instance.CurrentUser.Id, Folder.Id, DisplayPreferences);
- }
- catch (HttpException)
- {
- App.Instance.ShowDefaultErrorMessage();
- }
- }
-
- /// <summary>
- /// Refreshes the sidebar.
- /// </summary>
- private void RefreshSidebar()
- {
- //if (Folder.BackdropCount > 0)
- //{
- // //backdropImage.Source = App.Instance.GetBitmapImage(ApiClient.GetImageUrl(Folder.Id, Model.Entities.ImageType.Backdrop, width: 560, height: 315));
- // backdropImage.Visibility = Visibility.Visible;
- //}
- //else
- //{
- // backdropImage.Source = null;
- // backdropImage.Visibility = Visibility.Collapsed;
- //}
- }
-
- /// <summary>
- /// Handles current item selection changes
- /// </summary>
- protected override void OnCurrentItemChanged()
- {
- base.OnCurrentItemChanged();
-
- // Name
- /*if (CurrentItem != null)
- {
- txtName.Visibility = CurrentItem.HasLogo ? Visibility.Collapsed : Visibility.Visible;
- currentItemLogo.Visibility = CurrentItem.HasLogo ? Visibility.Visible : Visibility.Collapsed;
-
- if (CurrentItem.HasLogo)
- {
- var uri = ApiClient.GetImageUrl(CurrentItem.Id, ImageType.Logo, maxWidth: 400, maxHeight: 125);
-
- Dispatcher.InvokeAsync(() => currentItemLogo.Source = App.Instance.GetBitmapImage(new Uri(uri, UriKind.Absolute)));
- }
- else
- {
- var name = CurrentItem.Name;
-
- if (!CurrentItem.IsType("Season") && CurrentItem.IndexNumber.HasValue)
- {
- name = CurrentItem.IndexNumber + " - " + name;
- }
-
- if (CurrentItem.IsType("Movie") && CurrentItem.ProductionYear.HasValue)
- {
- name += " (" + CurrentItem.ProductionYear + ")";
- }
-
- txtName.Text = name;
- }
- }
- else
- {
- txtName.Visibility = Visibility.Collapsed;
- currentItemLogo.Visibility = Visibility.Collapsed;
- }
-
- // PremiereDate
- if (CurrentItem != null && CurrentItem.PremiereDate.HasValue && !CurrentItem.IsType("Series"))
- {
- pnlPremiereDate.Visibility = Visibility.Visible;
-
- var prefix = CurrentItem.IsType("Episode") ? "Aired" : CurrentItem.IsType("Series") ? "First Aired" : "Premiered";
-
- txtPremiereDate.Text = string.Format("{0} {1}", prefix, CurrentItem.PremiereDate.Value.ToShortDateString());
- }
- else
- {
- pnlPremiereDate.Visibility = Visibility.Collapsed;
- }
-
- // Taglines
- if (CurrentItem != null && CurrentItem.Taglines != null && CurrentItem.Taglines.Length > 0)
- {
- txtTagLine.Visibility = Visibility.Visible;
- txtTagLine.Text = CurrentItem.Taglines[0];
- }
- else
- {
- txtTagLine.Visibility = Visibility.Collapsed;
- }
-
- // Genres
- if (CurrentItem != null && CurrentItem.Genres != null && CurrentItem.Genres.Length > 0)
- {
- txtGenres.Visibility = Visibility.Visible;
-
- // Try to keep them on one line by limiting to three
- txtGenres.Text = string.Join(" / ", CurrentItem.Genres.Take(3));
- }
- else
- {
- txtGenres.Visibility = Visibility.Collapsed;
- }
-
- // Season Number
- if (CurrentItem != null && CurrentItem.ParentIndexNumber.HasValue && CurrentItem.IsType("Episode"))
- {
- txtSeasonHeader.Visibility = Visibility.Visible;
-
- txtSeasonHeader.Text = string.Format("Season {0}", CurrentItem.ParentIndexNumber);
- }
- else
- {
- txtSeasonHeader.Visibility = Visibility.Collapsed;
- }
-
- UpdateSeriesAirTime();
- UpdateMiscellaneousFields();
- UpdateCommunityRating();
- UpdateVideoInfo();
- UpdateAudioInfo();*/
- }
-
- /// <summary>
- /// Updates the series air time.
- /// </summary>
- private void UpdateSeriesAirTime()
- {
- /*if (CurrentItem != null && CurrentItem.SeriesInfo != null)
- {
- var series = CurrentItem.SeriesInfo;
-
- txtSeriesAirTime.Visibility = Visibility.Visible;
-
- if (series.Status.HasValue && series.Status.Value == SeriesStatus.Ended)
- {
- txtSeriesAirTime.Text = "Ended";
- }
- else
- {
- string txt = "Airs";
-
- if (series.AirDays.Length > 0)
- {
- if (series.AirDays.Length == 7)
- {
- txt += " Everyday";
- }
- else
- {
- txt += " " + series.AirDays[0].ToString();
- }
- }
-
- if (CurrentItem.Studios != null && CurrentItem.Studios.Length > 0)
- {
- txt += " on " + CurrentItem.Studios[0].Name;
- }
-
- if (!string.IsNullOrEmpty(series.AirTime))
- {
- txt += " at " + series.AirTime;
- }
-
- txtSeriesAirTime.Text = txt;
- }
- }
- else
- {
- txtSeriesAirTime.Visibility = Visibility.Collapsed;
- }*/
- }
-
- /// <summary>
- /// Updates the miscellaneous fields.
- /// </summary>
- private void UpdateMiscellaneousFields()
- {
- /*if (CurrentItem == null)
- {
- pnlRuntime.Visibility = Visibility.Collapsed;
- pnlOfficialRating.Visibility = Visibility.Collapsed;
- }
- else
- {
- var runtimeTicks = CurrentItem.RunTimeTicks ?? 0;
-
- // Runtime
- if (runtimeTicks > 0)
- {
- pnlRuntime.Visibility = Visibility.Visible;
- txtRuntime.Text = string.Format("{0} minutes", Convert.ToInt32(TimeSpan.FromTicks(runtimeTicks).TotalMinutes));
- }
- else
- {
- pnlRuntime.Visibility = Visibility.Collapsed;
- }
-
- pnlOfficialRating.Visibility = string.IsNullOrEmpty(CurrentItem.OfficialRating) ? Visibility.Collapsed : Visibility.Visible;
- }
-
- // Show the parent panel only if one of the children is visible
- pnlMisc.Visibility = pnlRuntime.Visibility == Visibility.Visible ||
- pnlOfficialRating.Visibility == Visibility.Visible
- ? Visibility.Visible
- : Visibility.Collapsed;*/
- }
-
- /// <summary>
- /// Updates the community rating.
- /// </summary>
- private void UpdateCommunityRating()
- {
- /*// Community Rating
- if (CurrentItem != null && CurrentItem.CommunityRating.HasValue)
- {
- pnlRating.Visibility = Visibility.Visible;
- }
- else
- {
- pnlRating.Visibility = Visibility.Collapsed;
- return;
- }
-
- var rating = CurrentItem.CommunityRating.Value;
-
- for (var i = 0; i < 10; i++)
- {
- if (rating < i - 1)
- {
- TreeHelper.FindChild<Image>(this, "communityRatingImage" + i).SetResourceReference(Image.StyleProperty, "CommunityRatingImageEmpty");
- }
- else if (rating < i)
- {
- TreeHelper.FindChild<Image>(this, "communityRatingImage" + i).SetResourceReference(Image.StyleProperty, "CommunityRatingImageHalf");
- }
- else
- {
- TreeHelper.FindChild<Image>(this, "communityRatingImage" + i).SetResourceReference(Image.StyleProperty, "CommunityRatingImageFull");
- }
- }*/
- }
-
- /// <summary>
- /// Updates the video info.
- /// </summary>
- private void UpdateVideoInfo()
- {
- /*if (CurrentItem != null && CurrentItem.VideoInfo != null)
- {
- pnlVideoInfo.Visibility = Visibility.Visible;
- }
- else
- {
- pnlVideoInfo.Visibility = Visibility.Collapsed;
- return;
- }
-
- var videoInfo = CurrentItem.VideoInfo;
-
- if (videoInfo.VideoType == VideoType.VideoFile)
- {
- txtVideoType.Text = Path.GetExtension(CurrentItem.Path).Replace(".", string.Empty).ToLower();
- }
- else
- {
- txtVideoType.Text = videoInfo.VideoType.ToString().ToLower();
- }
-
- txtVideoResolution.Text = GetResolutionText(videoInfo);
- pnlVideoResolution.Visibility = string.IsNullOrEmpty(txtVideoResolution.Text) ? Visibility.Collapsed : Visibility.Visible;
-
- if (!string.IsNullOrEmpty(videoInfo.Codec))
- {
- pnlVideoCodec.Visibility = Visibility.Visible;
- txtVideoCodec.Text = videoInfo.Codec.ToLower();
- }
- else
- {
- pnlVideoCodec.Visibility = Visibility.Collapsed;
- }
-
- var audio = videoInfo.GetDefaultAudioStream();
-
- if (audio == null || string.IsNullOrEmpty(audio.Codec))
- {
- pnlAudioCodec.Visibility = Visibility.Collapsed;
- }
- else
- {
- pnlAudioCodec.Visibility = Visibility.Visible;
- txtAudioCodec.Text = audio.Codec.ToLower();
- }*/
- }
-
- /// <summary>
- /// Updates the audio info.
- /// </summary>
- private void UpdateAudioInfo()
- {
- /*if (CurrentItem != null && CurrentItem.AudioInfo != null)
- {
- pnlAudioInfo.Visibility = Visibility.Visible;
- }
- else
- {
- pnlAudioInfo.Visibility = Visibility.Collapsed;
- return;
- }
-
- var audioInfo = CurrentItem.AudioInfo;
-
- txtAudioType.Text = Path.GetExtension(CurrentItem.Path).Replace(".", string.Empty).ToLower();
-
- if (audioInfo.BitRate > 0)
- {
- pnlAudioBitrate.Visibility = Visibility.Visible;
- txtAudioBitrate.Text = (audioInfo.BitRate / 1000).ToString() + "kbps";
- }
- else
- {
- pnlAudioBitrate.Visibility = Visibility.Collapsed;
- }*/
- }
-
- /*private string GetResolutionText(VideoInfo info)
- {
- var scanType = info.ScanType ?? string.Empty;
-
- if (info.Height == 1080)
- {
- if (scanType.Equals("progressive", StringComparison.OrdinalIgnoreCase))
- {
- return "1080p";
- }
- if (scanType.Equals("interlaced", StringComparison.OrdinalIgnoreCase))
- {
- return "1080i";
- }
- }
- if (info.Height == 720)
- {
- if (scanType.Equals("progressive", StringComparison.OrdinalIgnoreCase))
- {
- return "720p";
- }
- if (scanType.Equals("interlaced", StringComparison.OrdinalIgnoreCase))
- {
- return "720i";
- }
- }
- if (info.Height == 480)
- {
- if (scanType.Equals("progressive", StringComparison.OrdinalIgnoreCase))
- {
- return "480p";
- }
- if (scanType.Equals("interlaced", StringComparison.OrdinalIgnoreCase))
- {
- return "480i";
- }
- }
-
- return info.Width == 0 || info.Height == 0 ? string.Empty : info.Width + "x" + info.Height;
- }*/
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Pages/LoginPage.xaml b/MediaBrowser.Plugins.DefaultTheme/Pages/LoginPage.xaml
deleted file mode 100644
index 6a9e796ee..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Pages/LoginPage.xaml
+++ /dev/null
@@ -1,34 +0,0 @@
-<base:BaseLoginPage x:Class="MediaBrowser.Plugins.DefaultTheme.Pages.LoginPage"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:base="clr-namespace:MediaBrowser.UI.Pages;assembly=MediaBrowser.UI"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- mc:Ignorable="d"
- d:DesignHeight="300"
- d:DesignWidth="300"
- Title="LoginPage">
-
- <Grid HorizontalAlignment="Center">
-
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="*"></RowDefinition>
- </Grid.RowDefinitions>
-
- <TextBlock Text="select profile >" Grid.Row="0" HorizontalAlignment="Left" Style="{StaticResource Heading2TextBlockStyle}" Margin="70 30 0 0"></TextBlock>
-
- <controls:ExtendedScrollViewer Grid.Row="1" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Disabled" VerticalAlignment="Stretch" HorizontalAlignment="Center" CanContentScroll="True">
- <controls:ScrollingPanel CanHorizontallyScroll="True" CanVerticallyScroll="False">
- <controls:ExtendedListBox x:Name="lstUsers" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{Binding Path=Users,IsAsync=True,Mode=OneWay}" Style="{StaticResource ListBoxStyle}" ItemContainerStyle="{StaticResource ListBoxItemStyle}">
- <controls:ExtendedListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Orientation="Vertical" Margin="50" />
- </ItemsPanelTemplate>
- </controls:ExtendedListBox.ItemsPanel>
- </controls:ExtendedListBox>
- </controls:ScrollingPanel>
- </controls:ExtendedScrollViewer>
- </Grid>
-</base:BaseLoginPage>
diff --git a/MediaBrowser.Plugins.DefaultTheme/Pages/LoginPage.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/Pages/LoginPage.xaml.cs
deleted file mode 100644
index 35f2c1088..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Pages/LoginPage.xaml.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-using MediaBrowser.Plugins.DefaultTheme.Resources;
-using MediaBrowser.UI.Controls;
-using MediaBrowser.UI.Pages;
-
-namespace MediaBrowser.Plugins.DefaultTheme.Pages
-{
- /// <summary>
- /// Interaction logic for LoginPage.xaml
- /// </summary>
- public partial class LoginPage : BaseLoginPage
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="LoginPage" /> class.
- /// </summary>
- public LoginPage()
- : base()
- {
- InitializeComponent();
- }
-
- /// <summary>
- /// Subclasses must provide the list that holds the users
- /// </summary>
- /// <value>The items list.</value>
- protected override ExtendedListBox ItemsList
- {
- get
- {
- return lstUsers;
- }
- }
-
- /// <summary>
- /// Called when [loaded].
- /// </summary>
- protected override void OnLoaded()
- {
- base.OnLoaded();
-
- AppResources.Instance.SetDefaultPageTitle();
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Pages/WeatherPage.xaml b/MediaBrowser.Plugins.DefaultTheme/Pages/WeatherPage.xaml
deleted file mode 100644
index 17a8239e5..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Pages/WeatherPage.xaml
+++ /dev/null
@@ -1,13 +0,0 @@
-<Pages:BaseWeatherPage x:Class="MediaBrowser.Plugins.DefaultTheme.Pages.WeatherPage"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:Pages="clr-namespace:MediaBrowser.UI.Pages;assembly=MediaBrowser.UI" mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300"
- Title="WeatherPage">
-
- <Grid>
- <TextBlock>Weather Page</TextBlock>
- </Grid>
-</Pages:BaseWeatherPage>
diff --git a/MediaBrowser.Plugins.DefaultTheme/Pages/WeatherPage.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/Pages/WeatherPage.xaml.cs
deleted file mode 100644
index eae50befb..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Pages/WeatherPage.xaml.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using MediaBrowser.UI.Pages;
-
-namespace MediaBrowser.Plugins.DefaultTheme.Pages
-{
- /// <summary>
- /// Interaction logic for WeatherPage.xaml
- /// </summary>
- public partial class WeatherPage : BaseWeatherPage
- {
- public WeatherPage()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Properties/AssemblyInfo.cs b/MediaBrowser.Plugins.DefaultTheme/Properties/AssemblyInfo.cs
deleted file mode 100644
index cc3fafdc9..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
-using System.Windows;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("MediaBrowser.Plugins.DefaultTheme")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("MediaBrowser.Plugins.DefaultTheme")]
-[assembly: AssemblyCopyright("Copyright © 2012")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-//In order to begin building localizable applications, set
-//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
-//inside a <PropertyGroup>. For example, if you are using US english
-//in your source files, set the <UICulture> to en-US. Then uncomment
-//the NeutralResourceLanguage attribute below. Update the "en-US" in
-//the line below to match the UICulture setting in the project file.
-
-//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
-
-
-[assembly:ThemeInfo(
- ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
- //(used if a resource is not found in the page,
- // or application resource dictionaries)
- ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
- //(used if a resource is not found in the page,
- // app, or any theme specific resource dictionaries)
-)]
-
-[assembly: Guid("411f938b-89d5-48f6-b6ab-a5d75036efcc")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.*")]
diff --git a/MediaBrowser.Plugins.DefaultTheme/Properties/DesignTimeResources.xaml b/MediaBrowser.Plugins.DefaultTheme/Properties/DesignTimeResources.xaml
deleted file mode 100644
index 20f155667..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Properties/DesignTimeResources.xaml
+++ /dev/null
@@ -1,5 +0,0 @@
-<ResourceDictionary
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
- <!-- Resource dictionary entries should be defined here. -->
-</ResourceDictionary> \ No newline at end of file
diff --git a/MediaBrowser.Plugins.DefaultTheme/Properties/Resources.Designer.cs b/MediaBrowser.Plugins.DefaultTheme/Properties/Resources.Designer.cs
deleted file mode 100644
index da735391a..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.17929
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace MediaBrowser.Plugins.DefaultTheme.Properties {
-
-
- /// <summary>
- /// A strongly-typed resource class, for looking up localized strings, etc.
- /// </summary>
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources() {
- }
-
- /// <summary>
- /// Returns the cached ResourceManager instance used by this class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager {
- get {
- if ((resourceMan == null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MediaBrowser.Plugins.DefaultTheme.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- /// <summary>
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Properties/Resources.resx b/MediaBrowser.Plugins.DefaultTheme/Properties/Resources.resx
deleted file mode 100644
index ffecec851..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Properties/Resources.resx
+++ /dev/null
@@ -1,117 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root> \ No newline at end of file
diff --git a/MediaBrowser.Plugins.DefaultTheme/Properties/Settings.Designer.cs b/MediaBrowser.Plugins.DefaultTheme/Properties/Settings.Designer.cs
deleted file mode 100644
index b99760e3f..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.17929
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace MediaBrowser.Plugins.DefaultTheme.Properties
-{
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Properties/Settings.settings b/MediaBrowser.Plugins.DefaultTheme/Properties/Settings.settings
deleted file mode 100644
index 8f2fd95d6..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
- <Profiles>
- <Profile Name="(Default)" />
- </Profiles>
- <Settings />
-</SettingsFile> \ No newline at end of file
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/AppResources.cs b/MediaBrowser.Plugins.DefaultTheme/Resources/AppResources.cs
deleted file mode 100644
index 3ca6e8df2..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/AppResources.cs
+++ /dev/null
@@ -1,223 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Net;
-using MediaBrowser.UI;
-using MediaBrowser.UI.Controller;
-using MediaBrowser.UI.Controls;
-using MediaBrowser.UI.Playback;
-using MediaBrowser.UI.Playback.InternalPlayer;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace MediaBrowser.Plugins.DefaultTheme.Resources
-{
- /// <summary>
- /// Class AppResources
- /// </summary>
- public partial class AppResources : ResourceDictionary
- {
- /// <summary>
- /// Gets the instance.
- /// </summary>
- /// <value>The instance.</value>
- public static AppResources Instance { get; private set; }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="AppResources" /> class.
- /// </summary>
- public AppResources()
- {
- InitializeComponent();
-
- Instance = this;
-
- UIKernel.Instance.PlaybackManager.PlaybackStarted += PlaybackManager_PlaybackStarted;
- UIKernel.Instance.PlaybackManager.PlaybackCompleted += PlaybackManager_PlaybackCompleted;
- }
-
- /// <summary>
- /// Handles the Click event of the NowPlayingButton 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 NowPlaying_Click(object sender, RoutedEventArgs e)
- {
- App.Instance.NavigateToInternalPlayerPage();
- }
-
- /// <summary>
- /// Handles the PlaybackCompleted event of the PlaybackManager control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="PlaybackStopEventArgs" /> instance containing the event data.</param>
- /// <exception cref="System.NotImplementedException"></exception>
- void PlaybackManager_PlaybackCompleted(object sender, PlaybackStopEventArgs e)
- {
- App.Instance.ApplicationWindow.Dispatcher.Invoke(() => NowPlayingButton.Visibility = Visibility.Collapsed);
- }
-
- /// <summary>
- /// Handles the PlaybackStarted event of the PlaybackManager control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="PlaybackEventArgs" /> instance containing the event data.</param>
- void PlaybackManager_PlaybackStarted(object sender, PlaybackEventArgs e)
- {
- if (e.Player is BaseInternalMediaPlayer)
- {
- App.Instance.ApplicationWindow.Dispatcher.Invoke(() => NowPlayingButton.Visibility = Visibility.Visible);
- }
- }
-
- /// <summary>
- /// Weathers the button click.
- /// </summary>
- /// <param name="sender">The sender.</param>
- /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
- void WeatherButtonClick(object sender, RoutedEventArgs e)
- {
- App.Instance.DisplayWeather();
- }
-
- /// <summary>
- /// Settingses the button click.
- /// </summary>
- /// <param name="sender">The sender.</param>
- /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
- void SettingsButtonClick(object sender, RoutedEventArgs e)
- {
- App.Instance.NavigateToSettingsPage();
- }
-
- /// <summary>
- /// This is a common element that appears on every page.
- /// </summary>
- /// <value>The view button.</value>
- public Button ViewButton
- {
- get
- {
- return TreeHelper.FindChild<Button>(App.Instance.ApplicationWindow, "ViewButton");
- }
- }
-
- /// <summary>
- /// Gets the now playing button.
- /// </summary>
- /// <value>The now playing button.</value>
- private Button NowPlayingButton
- {
- get
- {
- return TreeHelper.FindChild<Button>(App.Instance.ApplicationWindow, "NowPlayingButton");
- }
- }
-
- /// <summary>
- /// This is a common element that appears on every page.
- /// </summary>
- /// <value>The page title panel.</value>
- public StackPanel PageTitlePanel
- {
- get
- {
- return TreeHelper.FindChild<StackPanel>(App.Instance.ApplicationWindow, "PageTitlePanel");
- }
- }
-
- /// <summary>
- /// Gets the content of the header.
- /// </summary>
- /// <value>The content of the header.</value>
- public StackPanel HeaderContent
- {
- get
- {
- return TreeHelper.FindChild<StackPanel>(App.Instance.ApplicationWindow, "HeaderContent");
- }
- }
-
- /// <summary>
- /// Sets the default page title.
- /// </summary>
- public void SetDefaultPageTitle()
- {
- var img = new Image { };
- img.SetResourceReference(Image.StyleProperty, "MBLogoImageWhite");
-
- SetPageTitle(img);
- }
-
- /// <summary>
- /// Clears the page title.
- /// </summary>
- public void ClearPageTitle()
- {
- PageTitlePanel.Children.Clear();
- }
-
- /// <summary>
- /// Sets the page title.
- /// </summary>
- /// <param name="item">The item.</param>
- public async Task SetPageTitle(BaseItemDto item)
- {
- if (item.HasLogo || !string.IsNullOrEmpty(item.ParentLogoItemId))
- {
- var url = App.Instance.ApiClient.GetLogoImageUrl(item, new ImageOptions
- {
- Quality = 100
- });
-
- try
- {
- var image = await App.Instance.GetRemoteImageAsync(url);
-
- image.SetResourceReference(Image.StyleProperty, "ItemLogo");
- SetPageTitle(image);
- }
- catch (HttpException)
- {
- SetPageTitleText(item);
- }
- }
- else
- {
- SetPageTitleText(item);
- }
- }
-
- /// <summary>
- /// Sets the page title text.
- /// </summary>
- /// <param name="item">The item.</param>
- private void SetPageTitleText(BaseItemDto item)
- {
- SetPageTitle(item.SeriesName ?? item.Album ?? item.Name);
- }
-
- /// <summary>
- /// Sets the page title.
- /// </summary>
- /// <param name="title">The title.</param>
- public void SetPageTitle(string title)
- {
- var textblock = new TextBlock { Text = title, Margin = new Thickness(0, 10, 0, 0) };
- textblock.SetResourceReference(TextBlock.StyleProperty, "Heading2TextBlockStyle");
-
- SetPageTitle(textblock);
- }
-
- /// <summary>
- /// Sets the page title.
- /// </summary>
- /// <param name="element">The element.</param>
- public void SetPageTitle(UIElement element)
- {
- var panel = PageTitlePanel;
-
- panel.Children.Clear();
- panel.Children.Add(element);
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/AppResources.xaml b/MediaBrowser.Plugins.DefaultTheme/Resources/AppResources.xaml
deleted file mode 100644
index 8a8d0ceaa..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/AppResources.xaml
+++ /dev/null
@@ -1,617 +0,0 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:themeconverters="clr-namespace:MediaBrowser.Plugins.DefaultTheme.Converters"
- xmlns:themecontrols="clr-namespace:MediaBrowser.Plugins.DefaultTheme.Controls"
- xmlns:ee="http://schemas.microsoft.com/expression/2010/effects"
- xmlns:ViewModels="clr-namespace:MediaBrowser.UI.ViewModels;assembly=MediaBrowser.UI"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- xmlns:dto="clr-namespace:MediaBrowser.Model.Dto;assembly=MediaBrowser.Model"
- x:Class="MediaBrowser.Plugins.DefaultTheme.Resources.AppResources">
-
- <themeconverters:WeatherImageConverter x:Key="WeatherImageConverter"></themeconverters:WeatherImageConverter>
-
- <Style TargetType="Grid" x:Key="WindowBackgroundContent">
- <Setter Property="Background">
- <Setter.Value>
- <LinearGradientBrush SpreadMethod="Reflect" ColorInterpolationMode="SRgbLinearInterpolation" StartPoint="0,0" EndPoint="0,1" >
- <GradientStop Color="#ff000000" Offset="0" />
- <GradientStop Color="#ffbbbbbb" Offset="1" />
- </LinearGradientBrush>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style TargetType="Grid" x:Key="WindowBackgroundContentDuringPlayback">
- <Setter Property="Opacity" Value=".75"/>
- <Setter Property="Background">
- <Setter.Value>
- <LinearGradientBrush SpreadMethod="Reflect" ColorInterpolationMode="SRgbLinearInterpolation" StartPoint="0,0" EndPoint="0,1" >
- <GradientStop Color="#ff000000" Offset="0" />
- <GradientStop Color="#ffbbbbbb" Offset="1" />
- </LinearGradientBrush>
- </Setter.Value>
- </Setter>
- </Style>
-
- <!--Default font for text. Themes should override these as needed-->
- <Brush x:Key="DefaultForeground">#ffffff</Brush>
-
- <!--Default font for small text. Themes should override these as needed-->
- <Brush x:Key="SmallForeground">#ffffff</Brush>
-
- <!--Default font for h1 headers. Themes should override these as needed-->
- <Brush x:Key="Heading1Foreground">#ffffff</Brush>
-
- <!--Default font for h2 headers. Themes should override these as needed-->
- <Brush x:Key="Heading2Foreground">#ffffff</Brush>
-
- <DataTemplate DataType="{x:Type dto:UserDto}">
- <Grid HorizontalAlignment="Left">
- <Border Background="{Binding Converter={StaticResource MetroTileBackgroundConverter},Mode=OneWay}">
- <Image Stretch="Uniform" Width="330" Height="330">
- <Image.Style>
- <Style TargetType="{x:Type Image}">
- <Style.Triggers>
- <DataTrigger Binding="{Binding HasPrimaryImage}" Value="true">
- <Setter Property="Image.Source" Value="{Binding Converter={StaticResource UserImageConverter}, ConverterParameter='0,0,0,0',Mode=OneWay}" />
- </DataTrigger>
- <DataTrigger Binding="{Binding HasPrimaryImage}" Value="false">
- <Setter Property="Image.Source" Value="../Resources/Images/UserLoginDefault.png" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Image.Style>
- </Image>
- </Border>
-
- <Grid HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
- <Grid.Background>
- <SolidColorBrush Color="#A6000000"></SolidColorBrush>
- </Grid.Background>
- <StackPanel Orientation="Vertical" Margin="10 5 0 10">
- <TextBlock Foreground="White" Text="{Binding Name,Mode=OneWay}" Style="{StaticResource TextBlockStyle}"></TextBlock>
- <TextBlock Foreground="White" Text="{Binding Converter={StaticResource LastSeenTextConverter},Mode=OneWay}" Style="{StaticResource SmallTextBlockStyle}"></TextBlock>
- </StackPanel>
- </Grid>
-
- </Grid>
- </DataTemplate>
-
- <DataTemplate x:Key="HomePageListBoxItemTemplate" DataType="{x:Type ViewModels:DtoBaseItemViewModel}">
- <themecontrols:HomePageTile DataContext="{Binding Mode=OneWay}"></themecontrols:HomePageTile>
- </DataTemplate>
-
- <Style x:Key="SpotlightButtonStyle" TargetType="{x:Type Button}">
- <Setter Property="SnapsToDevicePixels" Value="true"/>
- <Setter Property="OverridesDefaultStyle" Value="true"/>
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="Margin" Value="0"/>
- <Setter Property="Padding" Value="0"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border x:Name="Bd" SnapsToDevicePixels="true" RenderTransformOrigin="0.5,0.5" Padding="3">
- <Border.RenderTransform>
- <TransformGroup>
- <ScaleTransform/>
- <SkewTransform/>
- <RotateTransform/>
- <TranslateTransform/>
- </TransformGroup>
- </Border.RenderTransform>
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup x:Name="CommonStates">
- <VisualStateGroup.Transitions>
- <VisualTransition GeneratedDuration="0:0:0.25"/>
- </VisualStateGroup.Transitions>
- <VisualState x:Name="Normal"/>
- <VisualState x:Name="MouseOver">
- </VisualState>
- <VisualState x:Name="Disabled"/>
- <VisualState x:Name="Focused">
- <Storyboard>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="Bd">
- <EasingDoubleKeyFrame KeyTime="0" Value="1.035">
- <EasingDoubleKeyFrame.EasingFunction>
- <ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
- </EasingDoubleKeyFrame.EasingFunction>
- </EasingDoubleKeyFrame>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="Bd">
- <EasingDoubleKeyFrame KeyTime="0" Value="1.035">
- <EasingDoubleKeyFrame.EasingFunction>
- <ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
- </EasingDoubleKeyFrame.EasingFunction>
- </EasingDoubleKeyFrame>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="Bd">
- <EasingDoubleKeyFrame KeyTime="0" Value="0">
- <EasingDoubleKeyFrame.EasingFunction>
- <ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
- </EasingDoubleKeyFrame.EasingFunction>
- </EasingDoubleKeyFrame>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="Bd">
- <EasingDoubleKeyFrame KeyTime="0" Value="0">
- <EasingDoubleKeyFrame.EasingFunction>
- <ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
- </EasingDoubleKeyFrame.EasingFunction>
- </EasingDoubleKeyFrame>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.Opacity)" Storyboard.TargetName="BdDropShadow">
- <EasingDoubleKeyFrame KeyTime="0" Value="1">
- <EasingDoubleKeyFrame.EasingFunction>
- <ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
- </EasingDoubleKeyFrame.EasingFunction>
- </EasingDoubleKeyFrame>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </VisualState>
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- <Grid x:Name="ContentGrid">
- <Border x:Name="BdDropShadow" Margin="-15" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{DynamicResource SelectedItemHighlightColor}" SnapsToDevicePixels="true" CornerRadius="10" Visibility="Hidden">
- <Border.Effect>
- <BlurEffect Radius="10" KernelType="Gaussian"></BlurEffect>
- </Border.Effect>
- </Border>
- <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsFocused" Value="true">
- <Setter Property="Visibility" TargetName="BdDropShadow" Value="Visible"/>
- <Setter Property="Panel.ZIndex" Value="5"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <!--Item logos. -->
- <Style TargetType="Image" x:Key="ItemLogo">
- <Setter Property="Margin" Value="0 10 0 0"/>
- <Setter Property="MaxHeight" Value="100"/>
- <Setter Property="MaxWidth" Value="700"/>
- <Setter Property="VerticalAlignment" Value="Top"/>
- <Setter Property="HorizontalAlignment" Value="Left"/>
- <Setter Property="Stretch" Value="Uniform"/>
- </Style>
-
- <!--Override PageContentTemplate-->
- <ControlTemplate x:Key="PageContentTemplate">
-
- <Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="0 10 0 0">
-
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="*"></RowDefinition>
- </Grid.RowDefinitions>
-
- <StackPanel x:Name="PageTitlePanel" Grid.Row="0" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="30 0 0 0">
- </StackPanel>
-
- <StackPanel x:Name="HeaderContent" Orientation="Horizontal" Panel.ZIndex="3" Grid.Row="0" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0 10 30 0">
-
- <Button x:Name="NowPlayingButton" Style="{StaticResource ImageButton}" Margin="0 0 40 0" Visibility="Collapsed" Click="NowPlaying_Click">
- <Image Source="..\Resources\Images\NowPlayingButton.png" />
- </Button>
-
- <Button x:Name="ViewButton" Style="{StaticResource ImageButton}" Margin="0 0 40 0" Visibility="Collapsed">
- <Image Source="..\Resources\Images\ViewButton.png" />
- </Button>
-
- <Button Style="{StaticResource ImageButton}" Margin="0 0 40 0">
- <Image Source="..\Resources\Images\SearchButton.png" />
- </Button>
-
- <Button Style="{StaticResource ImageButton}" Margin="0 0 50 0" Click="SettingsButtonClick">
- <Image Source="..\Resources\Images\SettingsButton.png" />
- </Button>
-
- <!--Display CurrentUser-->
- <StackPanel Orientation="Horizontal" Margin="0 0 50 0" Visibility="{Binding Path=CurrentUser,Converter={StaticResource CurrentUserVisibilityConverter},Mode=OneWay}">
- <Button Style="{StaticResource ImageButton}">
- <Image Height="64">
- <Image.Style>
- <Style TargetType="{x:Type Image}">
- <Style.Triggers>
- <DataTrigger Binding="{Binding Path=CurrentUser.HasPrimaryImage,Mode=OneWay}" Value="true">
- <Setter Property="Image.Source" Value="{Binding Path=CurrentUser,Converter={StaticResource UserImageConverter}, ConverterParameter='0,0,0,0',Mode=OneWay}" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Path=CurrentUser.HasPrimaryImage}" Value="false">
- <Setter Property="Image.Source" Value="Images\CurrentUserDefault.png" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Image.Style>
- </Image>
- </Button>
- </StackPanel>
-
- <!--Display Weather-->
- <StackPanel Orientation="Horizontal" Margin="0 0 50 0" Visibility="{Binding Path=CurrentWeather,Converter={StaticResource WeatherVisibilityConverter},Mode=OneWay}">
-
- <TextBlock Style="{StaticResource Heading2TextBlockStyle}" Text="{Binding Path=CurrentWeather,Converter={StaticResource WeatherTemperatureConverter},Mode=OneWay}">
- </TextBlock>
- <Button Style="{StaticResource ImageButton}" Click="WeatherButtonClick">
- <Image Source="{Binding Path=CurrentWeather,Converter={StaticResource WeatherImageConverter},Mode=OneWay}"></Image>
- </Button>
- </StackPanel>
-
- <!--Display Clock-->
- <TextBlock Style="{StaticResource Heading2TextBlockStyle}">
- <TextBlock.Text>
- <Binding Path="CurrentTime" Converter="{StaticResource DateTimeToStringConverter}" ConverterParameter="h:mm" />
- </TextBlock.Text>
- </TextBlock>
- <TextBlock Style="{StaticResource Heading2TextBlockStyle}" Foreground="#52B54B">
- <TextBlock.Text>
- <Binding Path="CurrentTime" Converter="{StaticResource DateTimeToStringConverter}" ConverterParameter="timesuffixlower" />
- </TextBlock.Text>
- </TextBlock>
- </StackPanel>
-
- <!--Add the frame to hold the pages. The UI core expects this to appear somewhere within the template.-->
- <controls:TransitionFrame x:Name="PageFrame" Grid.Row="1">
- <controls:TransitionFrame.TransitionAnimation>
- <DoubleAnimation Duration="0:0:0.35" >
- <DoubleAnimation.EasingFunction>
- <ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
- </DoubleAnimation.EasingFunction>
- </DoubleAnimation>
- </controls:TransitionFrame.TransitionAnimation>
- <controls:TransitionFrame.TransitionType>
- <ee:SlideInTransitionEffect SlideDirection="RightToLeft"></ee:SlideInTransitionEffect>
- </controls:TransitionFrame.TransitionType>
- </controls:TransitionFrame>
- </Grid>
- </ControlTemplate>
-
- <DataTemplate x:Key="ItemSpecialFeaturesTemplate" DataType="{x:Type ViewModels:SpecialFeatureViewModel}">
- <Grid HorizontalAlignment="Left">
-
- <Border Width="{Binding Path=ImageWidth}" Height="{Binding Path=ImageHeight}">
- <Border.Background>
- <LinearGradientBrush SpreadMethod="Reflect" ColorInterpolationMode="SRgbLinearInterpolation" StartPoint="0,0" EndPoint="0,1" >
- <GradientStop Color="#ff545358" Offset="0" />
- <GradientStop Color="#ffCBCBCB" Offset="1" />
- </LinearGradientBrush>
- </Border.Background>
- <Image>
- <Image.Style>
- <Style TargetType="{x:Type Image}">
- <Setter Property="Stretch" Value="Uniform" />
- <Style.Triggers>
- <DataTrigger Binding="{Binding Path=Item.HasPrimaryImage}" Value="True">
- <Setter Property="Source" Value="{Binding Path=Image}" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Path=Item.HasPrimaryImage}" Value="False">
- <Setter Property="Source" Value="../Resources/Images/ChapterDefault.png" />
- <Setter Property="VerticalAlignment" Value="Top" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Image.Style>
- </Image>
- </Border>
-
- <Grid HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
- <Grid.Background>
- <SolidColorBrush Color="#A6000000"></SolidColorBrush>
- </Grid.Background>
- <StackPanel Orientation="Vertical" Margin="10 5 0 10">
- <TextBlock Foreground="White" Text="{Binding Path=Item.Name}" Style="{StaticResource TextBlockStyle}"></TextBlock>
- <TextBlock Foreground="White" Text="{Binding Path=MinutesString}" Style="{StaticResource SmallTextBlockStyle}"></TextBlock>
- </StackPanel>
- </Grid>
- </Grid>
- </DataTemplate>
-
- <DataTemplate x:Key="ItemPerformersTemplate" DataType="{x:Type ViewModels:DtoBaseItemViewModel}">
- <Grid HorizontalAlignment="Left">
-
- <TextBlock Text="{Binding Path=Item.Name}"></TextBlock>
-
- </Grid>
- </DataTemplate>
-
- <DataTemplate x:Key="ItemChaptersTemplate" DataType="{x:Type ViewModels:ChapterInfoDtoViewModel}">
- <Grid HorizontalAlignment="Left">
-
- <Border Width="{Binding Path=ImageWidth}" Height="{Binding Path=ImageHeight}">
- <Border.Background>
- <LinearGradientBrush SpreadMethod="Reflect" ColorInterpolationMode="SRgbLinearInterpolation" StartPoint="0,0" EndPoint="0,1" >
- <GradientStop Color="#ff545358" Offset="0" />
- <GradientStop Color="#ffCBCBCB" Offset="1" />
- </LinearGradientBrush>
- </Border.Background>
- <Image>
- <Image.Style>
- <Style TargetType="{x:Type Image}">
- <Setter Property="Stretch" Value="Uniform" />
- <Style.Triggers>
- <DataTrigger Binding="{Binding Path=Chapter.HasImage}" Value="True">
- <Setter Property="Source" Value="{Binding Path=Image}" />
- </DataTrigger>
- <DataTrigger Binding="{Binding Path=Chapter.HasImage}" Value="False">
- <Setter Property="Source" Value="../Resources/Images/ChapterDefault.png" />
- <Setter Property="VerticalAlignment" Value="Top" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Image.Style>
- </Image>
- </Border>
-
- <Grid HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
- <Grid.Background>
- <SolidColorBrush Color="#A6000000"></SolidColorBrush>
- </Grid.Background>
- <StackPanel Orientation="Vertical" Margin="10 5 0 10">
- <TextBlock Foreground="White" Text="{Binding Path=Chapter.Name}" Style="{StaticResource TextBlockStyle}"></TextBlock>
- <TextBlock Foreground="White" Text="{Binding Path=TimeString}" Style="{StaticResource SmallTextBlockStyle}"></TextBlock>
- </StackPanel>
- </Grid>
-
- </Grid>
- </DataTemplate>
-
- <DataTemplate x:Key="ItemGalleryTemplate" DataType="{x:Type BitmapImage}">
- <Image Source="{Binding}" Height="297" VerticalAlignment="Center" HorizontalAlignment="Center">
-
- </Image>
- </DataTemplate>
-
- <DataTemplate x:Key="ListPageItemTemplate" DataType="{x:Type ViewModels:DtoBaseItemViewModel}">
- <themecontrols:BaseItemTile DataContext="{Binding}"></themecontrols:BaseItemTile>
- </DataTemplate>
-
- <!--List Page ListBox. -->
- <Style TargetType="controls:ExtendedListBox" x:Key="ListPageListBoxStyle" BasedOn="{StaticResource ListBoxStyle}">
- <Style.Triggers>
- <DataTrigger Binding="{Binding Path=DisplayPreferences.ViewType,Mode=OneWay}" Value="Poster">
- <Setter Property="ItemTemplate" Value="{StaticResource ListPageItemTemplate}"></Setter>
- <Setter Property="ItemsPanel">
- <Setter.Value>
- <ItemsPanelTemplate>
- <controls:VirtualizingWrapPanel ItemHeight="{Binding Path=DisplayPreferences.PrimaryImageHeight,Mode=OneWay}" ItemWidth="{Binding Path=DisplayPreferences.PrimaryImageWidth,Mode=OneWay}" Orientation="{Binding WrapPanelOrientation}" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="20 50 20 50">
- </controls:VirtualizingWrapPanel>
- </ItemsPanelTemplate>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding Path=DisplayPreferences.ViewType,Mode=OneWay}" Value="CoverFlow">
- <Setter Property="ItemTemplate" Value="{StaticResource ListPageItemTemplate}"></Setter>
- <Setter Property="ItemsPanel">
- <Setter.Value>
- <ItemsPanelTemplate>
- <VirtualizingStackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="50"></VirtualizingStackPanel>
- </ItemsPanelTemplate>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding Path=DisplayPreferences.ViewType,Mode=OneWay}" Value="ThumbStrip">
- <Setter Property="ItemTemplate" Value="{StaticResource ListPageItemTemplate}"></Setter>
- <Setter Property="ItemsPanel">
- <Setter.Value>
- <ItemsPanelTemplate>
- <VirtualizingStackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="50"></VirtualizingStackPanel>
- </ItemsPanelTemplate>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding Path=DisplayPreferences.ViewType}" Value="List">
- <Setter Property="ItemTemplate" Value="{StaticResource ListPageItemTemplate}"></Setter>
- <Setter Property="ItemsPanel">
- <Setter.Value>
- <ItemsPanelTemplate>
- <VirtualizingStackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="50"></VirtualizingStackPanel>
- </ItemsPanelTemplate>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
-
- <Style TargetType="Button" x:Key="TextButton" BasedOn="{StaticResource ImageButton}">
- <Setter Property="HorizontalAlignment" Value="Left"></Setter>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border x:Name="Border" Background="{TemplateBinding Background}" BorderThickness="0 0 0 2" BorderBrush="Transparent">
- <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsKeyboardFocused" Value="true">
- <Setter TargetName="Border" Property="BorderBrush" Value="White" />
- </Trigger>
- <Trigger Property="IsFocused" Value="true">
- <Setter TargetName="Border" Property="BorderBrush" Value="White" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="Border" Property="BorderBrush" Value="White" />
- </Trigger>
- <Trigger Property="IsPressed" Value="true">
- <Setter TargetName="Border" Property="BorderBrush" Value="Gray" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="Border" Property="Opacity" Value=".2" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style TargetType="Button" x:Key="ViewMenuButton" BasedOn="{StaticResource ImageButton}">
- <Setter Property="HorizontalAlignment" Value="Left"></Setter>
- <Setter Property="Margin" Value="0 15 0 0"></Setter>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border x:Name="Border" Background="{TemplateBinding Background}" BorderThickness="2" BorderBrush="Transparent" Padding="0 5 20 5">
- <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsKeyboardFocused" Value="true">
- <Setter TargetName="Border" Property="BorderBrush" Value="White" />
- </Trigger>
- <Trigger Property="IsFocused" Value="true">
- <Setter TargetName="Border" Property="BorderBrush" Value="White" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="Border" Property="BorderBrush" Value="White" />
- </Trigger>
- <Trigger Property="IsPressed" Value="true">
- <Setter TargetName="Border" Property="BorderBrush" Value="Gray" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="Border" Property="Opacity" Value=".2" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <LinearGradientBrush x:Key="PressedBrush" StartPoint="0,0" EndPoint="0,1">
- <GradientBrush.GradientStops>
- <GradientStopCollection>
- <GradientStop Color="#444" Offset="0.0"/>
- <GradientStop Color="#888" Offset="0.1"/>
- <GradientStop Color="#EEE" Offset="0.9"/>
- <GradientStop Color="#FFF" Offset="1.0"/>
- </GradientStopCollection>
- </GradientBrush.GradientStops>
- </LinearGradientBrush>
-
- <!-- Miscellaneous Brushes -->
- <SolidColorBrush x:Key="GlyphBrush" Color="#ffffff" />
- <SolidColorBrush x:Key="FocusBackgroundBrush" Color="#ffffff" />
- <SolidColorBrush x:Key="FocusGlyphBrush" Color="#022255" />
- <SolidColorBrush x:Key="NormalBackgroundBrush" Color="Transparent" />
- <SolidColorBrush x:Key="NormalBorderBrush" Color="#ffffff" />
-
- <Style TargetType="RadioButton" x:Key="RadioButtonStyle">
- <Setter Property="HorizontalAlignment" Value="Left"></Setter>
- <Setter Property="BorderBrush" Value="Transparent"></Setter>
- <Setter Property="BorderThickness" Value="2"></Setter>
- <Setter Property="KeyboardNavigation.AcceptsReturn" Value="true"/>
- <Setter Property="SnapsToDevicePixels" Value="true"/>
- <Setter Property="OverridesDefaultStyle" Value="true"/>
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RadioButton}">
- <BulletDecorator Background="Transparent">
- <BulletDecorator.Bullet>
- <Grid Width="32" Height="32" VerticalAlignment="Center">
- <Ellipse x:Name="Border" Fill="{StaticResource NormalBackgroundBrush}" StrokeThickness="3" Stroke="{StaticResource NormalBorderBrush}" />
- <Ellipse x:Name="CheckMark" Margin="8" Fill="{StaticResource GlyphBrush}" />
- </Grid>
- </BulletDecorator.Bullet>
- <ContentPresenter Margin="20,0,0,0" HorizontalAlignment="Left" RecognizesAccessKey="True"/>
- </BulletDecorator>
- <ControlTemplate.Triggers>
- <Trigger Property="IsKeyboardFocused" Value="true">
- <Setter TargetName="Border" Property="Fill" Value="{StaticResource FocusBackgroundBrush}" />
- <Setter TargetName="CheckMark" Property="Fill" Value="{StaticResource FocusGlyphBrush}" />
- </Trigger>
- <Trigger Property="IsFocused" Value="true">
- <Setter TargetName="Border" Property="Fill" Value="{StaticResource FocusBackgroundBrush}" />
- <Setter TargetName="CheckMark" Property="Fill" Value="{StaticResource FocusGlyphBrush}" />
- </Trigger>
- <Trigger Property="IsChecked" Value="false">
- <Setter TargetName="CheckMark" Property="Visibility" Value="Collapsed"/>
- </Trigger>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="Border" Property="Fill" Value="{StaticResource FocusBackgroundBrush}" />
- <Setter TargetName="CheckMark" Property="Fill" Value="{StaticResource FocusGlyphBrush}" />
- </Trigger>
- <Trigger Property="IsPressed" Value="true">
- <Setter TargetName="Border" Property="Fill" Value="{StaticResource PressedBrush}" />
- <Setter TargetName="Border" Property="Stroke" Value="{StaticResource GlyphBrush}" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="Border" Property="Fill" Value="#eeeeee" />
- <Setter TargetName="Border" Property="Stroke" Value="#40000000" />
- <Setter Property="Foreground" Value="#80000000"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style TargetType="RadioButton" x:Key="ViewMenuRadioButton" BasedOn="{StaticResource RadioButtonStyle}">
- <Setter Property="Margin" Value="0 25 0 0"></Setter>
- </Style>
-
- <LinearGradientBrush x:Key="PressedBorderBrush" StartPoint="0,0" EndPoint="0,1">
- <GradientBrush.GradientStops>
- <GradientStopCollection>
- <GradientStop Color="#444" Offset="0.0"/>
- <GradientStop Color="#888" Offset="1.0"/>
- </GradientStopCollection>
- </GradientBrush.GradientStops>
- </LinearGradientBrush>
-
- <SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#EEE" />
- <SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA" />
- <SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888" />
-
- <Style TargetType="CheckBox" x:Key="CheckBoxStyle">
- <Setter Property="SnapsToDevicePixels" Value="true"/>
- <Setter Property="OverridesDefaultStyle" Value="true"/>
- <Setter Property="KeyboardNavigation.AcceptsReturn" Value="true"/>
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="CheckBox">
- <BulletDecorator Background="Transparent">
- <BulletDecorator.Bullet>
- <Border x:Name="Border" Width="32" Height="32" CornerRadius="0" Background="{StaticResource NormalBackgroundBrush}" BorderThickness="3" BorderBrush="{StaticResource NormalBorderBrush}">
- <Path Width="15" Height="15" VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="CheckMark" SnapsToDevicePixels="False" Stroke="{StaticResource GlyphBrush}" StrokeThickness="10" Data="M 0 0 L 7 7 M 0 7 L 7 0" />
- </Border>
- </BulletDecorator.Bullet>
- <ContentPresenter Margin="20,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" RecognizesAccessKey="True"/>
- </BulletDecorator>
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="false">
- <Setter TargetName="CheckMark" Property="Visibility" Value="Collapsed"/>
- </Trigger>
- <Trigger Property="IsKeyboardFocused" Value="true">
- <Setter TargetName="Border" Property="Background" Value="{StaticResource FocusBackgroundBrush}" />
- <Setter TargetName="CheckMark" Property="Stroke" Value="{StaticResource FocusGlyphBrush}" />
- </Trigger>
- <Trigger Property="IsFocused" Value="true">
- <Setter TargetName="Border" Property="Background" Value="{StaticResource FocusBackgroundBrush}" />
- <Setter TargetName="CheckMark" Property="Stroke" Value="{StaticResource FocusGlyphBrush}" />
- </Trigger>
- <Trigger Property="IsChecked" Value="{x:Null}">
- <Setter TargetName="CheckMark" Property="Data" Value="M 0 7 L 7 0" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="Border" Property="Background" Value="{StaticResource FocusBackgroundBrush}" />
- <Setter TargetName="CheckMark" Property="Stroke" Value="{StaticResource FocusGlyphBrush}" />
- </Trigger>
- <Trigger Property="IsPressed" Value="true">
- <Setter TargetName="Border" Property="Background" Value="{StaticResource PressedBrush}" />
- <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource PressedBorderBrush}" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
- <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
- <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
-</ResourceDictionary> \ No newline at end of file
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/AudioDefault.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/AudioDefault.png
deleted file mode 100644
index 4c5908457..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/AudioDefault.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ChapterDefault.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ChapterDefault.png
deleted file mode 100644
index 47b737521..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ChapterDefault.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/CurrentUserDefault.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/CurrentUserDefault.png
deleted file mode 100644
index 7a80db6e8..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/CurrentUserDefault.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/DislikeOverlay.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/DislikeOverlay.png
deleted file mode 100644
index da3af3821..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/DislikeOverlay.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/FavoriteOverlay.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/FavoriteOverlay.png
deleted file mode 100644
index f948ea11f..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/FavoriteOverlay.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/LikeOverlay.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/LikeOverlay.png
deleted file mode 100644
index 93bff88f9..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/LikeOverlay.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/NowPlayingButton.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/NowPlayingButton.png
deleted file mode 100644
index b0a4f26f9..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/NowPlayingButton.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/SearchButton.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/SearchButton.png
deleted file mode 100644
index cb7291996..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/SearchButton.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/SettingsButton.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/SettingsButton.png
deleted file mode 100644
index 37187dece..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/SettingsButton.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/UserLoginDefault.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/UserLoginDefault.png
deleted file mode 100644
index 14c83e749..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/UserLoginDefault.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/VideoDefault.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/VideoDefault.png
deleted file mode 100644
index 9c5e0a4ce..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/VideoDefault.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewButton.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewButton.png
deleted file mode 100644
index c0a8611bf..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewButton.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Close.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Close.png
deleted file mode 100644
index 5472b93aa..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Close.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Decrease.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Decrease.png
deleted file mode 100644
index 9b756c0a9..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Decrease.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Increase.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Increase.png
deleted file mode 100644
index dadc5d0d2..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Increase.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Index.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Index.png
deleted file mode 100644
index 3e04dc643..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Index.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Scroll.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Scroll.png
deleted file mode 100644
index a52e85fbf..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Scroll.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Sort.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Sort.png
deleted file mode 100644
index 45a9e5895..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/Sort.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/View.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/View.png
deleted file mode 100644
index d83fb70a3..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/ViewMenu/View.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Watched.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Watched.png
deleted file mode 100644
index f126059d7..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Watched.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Cloudy.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Cloudy.png
deleted file mode 100644
index cef9cb574..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Cloudy.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Overcast.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Overcast.png
deleted file mode 100644
index 7ee2942e3..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Overcast.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/PartlyCloudy.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/PartlyCloudy.png
deleted file mode 100644
index d0e1cce56..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/PartlyCloudy.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Rain.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Rain.png
deleted file mode 100644
index c19363310..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Rain.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Snow.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Snow.png
deleted file mode 100644
index 1867ee40f..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Snow.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Sunny.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Sunny.png
deleted file mode 100644
index be36d8446..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Sunny.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Thunder.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Thunder.png
deleted file mode 100644
index 1269cfd77..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Thunder.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/starEmpty.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/starEmpty.png
deleted file mode 100644
index b8355c7b1..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/starEmpty.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/starFull.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/starFull.png
deleted file mode 100644
index d5df24102..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/starFull.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/starHalf.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/starHalf.png
deleted file mode 100644
index e3251f0dd..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/starHalf.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.Plugins.DefaultTheme/Theme.cs b/MediaBrowser.Plugins.DefaultTheme/Theme.cs
deleted file mode 100644
index 5a730cf08..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/Theme.cs
+++ /dev/null
@@ -1,81 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Plugins.DefaultTheme.Pages;
-using MediaBrowser.Plugins.DefaultTheme.Resources;
-using MediaBrowser.UI;
-using MediaBrowser.UI.Controller;
-using System.Collections.Generic;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace MediaBrowser.Plugins.DefaultTheme
-{
- /// <summary>
- /// Class Theme
- /// </summary>
- class Theme : BaseTheme
- {
- /// <summary>
- /// Gets the detail page.
- /// </summary>
- /// <param name="item">The item.</param>
- /// <returns>Page.</returns>
- public override Page GetDetailPage(BaseItemDto item)
- {
- return new DetailPage(item.Id);
- }
-
- /// <summary>
- /// Gets the list page.
- /// </summary>
- /// <param name="item">The item.</param>
- /// <returns>Page.</returns>
- public override Page GetListPage(BaseItemDto item)
- {
- return new ListPage(item.Id);
- }
-
- /// <summary>
- /// Gets the home page.
- /// </summary>
- /// <returns>Page.</returns>
- public override Page GetHomePage()
- {
- return new HomePage();
- }
-
- /// <summary>
- /// Displays the weather.
- /// </summary>
- public override void DisplayWeather()
- {
- App.Instance.Navigate(new WeatherPage());
- }
-
- /// <summary>
- /// Gets the login page.
- /// </summary>
- /// <returns>Page.</returns>
- public override Page GetLoginPage()
- {
- return new LoginPage();
- }
-
- /// <summary>
- /// Gets the internal player page.
- /// </summary>
- /// <returns>Page.</returns>
- public override Page GetInternalPlayerPage()
- {
- return new InternalPlayerPage();
- }
-
- /// <summary>
- /// Gets the global resources.
- /// </summary>
- /// <returns>IEnumerable{ResourceDictionary}.</returns>
- public override IEnumerable<ResourceDictionary> GetGlobalResources()
- {
- return new[] { new AppResources() };
- }
- }
-}
diff --git a/MediaBrowser.Plugins.DefaultTheme/app.config b/MediaBrowser.Plugins.DefaultTheme/app.config
deleted file mode 100644
index 29abde1f6..000000000
--- a/MediaBrowser.Plugins.DefaultTheme/app.config
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<configuration>
- <runtime>
- <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
- <dependentAssembly>
- <assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
- </dependentAssembly>
- </assemblyBinding>
- </runtime>
-</configuration> \ No newline at end of file
diff --git a/MediaBrowser.UI.Controls/BaseModalWindow.cs b/MediaBrowser.UI.Controls/BaseModalWindow.cs
deleted file mode 100644
index 90bd8114f..000000000
--- a/MediaBrowser.UI.Controls/BaseModalWindow.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-using System;
-using System.Windows;
-
-namespace MediaBrowser.UI.Controls
-{
- /// <summary>
- /// Class BaseModalWindow
- /// </summary>
- public class BaseModalWindow : BaseWindow
- {
- /// <summary>
- /// Shows the modal.
- /// </summary>
- /// <param name="owner">The owner.</param>
- public void ShowModal(Window owner)
- {
- WindowStyle = WindowStyle.None;
- ResizeMode = ResizeMode.NoResize;
- ShowInTaskbar = false;
- WindowStartupLocation = WindowStartupLocation.Manual;
- AllowsTransparency = true;
-
- Width = owner.Width;
- Height = owner.Height;
- Top = owner.Top;
- Left = owner.Left;
- WindowState = owner.WindowState;
- Owner = owner;
-
- ShowDialog();
- }
-
- /// <summary>
- /// Called when [browser back].
- /// </summary>
- protected override void OnBrowserBack()
- {
- base.OnBrowserBack();
-
- CloseModal();
- }
-
- /// <summary>
- /// Raises the <see cref="E:System.Windows.FrameworkElement.Initialized" /> event. This method is invoked whenever <see cref="P:System.Windows.FrameworkElement.IsInitialized" /> is set to true internally.
- /// </summary>
- /// <param name="e">The <see cref="T:System.Windows.RoutedEventArgs" /> that contains the event data.</param>
- protected override void OnInitialized(EventArgs e)
- {
- base.OnInitialized(e);
-
- DataContext = this;
- }
-
- /// <summary>
- /// Closes the modal.
- /// </summary>
- protected virtual void CloseModal()
- {
- Close();
- }
- }
-}
diff --git a/MediaBrowser.UI.Controls/BaseUserControl.cs b/MediaBrowser.UI.Controls/BaseUserControl.cs
deleted file mode 100644
index e47fc84cf..000000000
--- a/MediaBrowser.UI.Controls/BaseUserControl.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System.ComponentModel;
-using System.Windows.Controls;
-
-namespace MediaBrowser.UI.Controls
-{
- /// <summary>
- /// Provides a base class for all user controls
- /// </summary>
- public abstract class BaseUserControl : UserControl
- {
- public event PropertyChangedEventHandler PropertyChanged;
-
- public virtual void OnPropertyChanged(string name)
- {
- if (PropertyChanged != null)
- {
- PropertyChanged(this, new PropertyChangedEventArgs(name));
- }
- }
- }
-}
diff --git a/MediaBrowser.UI.Controls/BaseWindow.cs b/MediaBrowser.UI.Controls/BaseWindow.cs
deleted file mode 100644
index 0f3ff2874..000000000
--- a/MediaBrowser.UI.Controls/BaseWindow.cs
+++ /dev/null
@@ -1,175 +0,0 @@
-using System;
-using System.ComponentModel;
-using System.Windows;
-using System.Windows.Input;
-
-namespace MediaBrowser.UI.Controls
-{
- /// <summary>
- /// Provides a base class for all Windows
- /// </summary>
- public abstract class BaseWindow : Window, INotifyPropertyChanged
- {
- /// <summary>
- /// Occurs when [property changed].
- /// </summary>
- public event PropertyChangedEventHandler PropertyChanged;
-
- /// <summary>
- /// Called when [property changed].
- /// </summary>
- /// <param name="info">The info.</param>
- public void OnPropertyChanged(String info)
- {
- if (PropertyChanged != null)
- {
- PropertyChanged(this, new PropertyChangedEventArgs(info));
- }
- }
-
- /// <summary>
- /// The _content scale
- /// </summary>
- private double _contentScale = 1;
- /// <summary>
- /// Gets the content scale.
- /// </summary>
- /// <value>The content scale.</value>
- public double ContentScale
- {
- get { return _contentScale; }
- private set
- {
- _contentScale = value;
- OnPropertyChanged("ContentScale");
- }
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="BaseWindow" /> class.
- /// </summary>
- protected BaseWindow()
- : base()
- {
- SizeChanged += MainWindow_SizeChanged;
- Loaded += BaseWindowLoaded;
- }
-
- /// <summary>
- /// Bases the window loaded.
- /// </summary>
- /// <param name="sender">The sender.</param>
- /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
- void BaseWindowLoaded(object sender, RoutedEventArgs e)
- {
- OnLoaded();
- }
-
- /// <summary>
- /// Called when [loaded].
- /// </summary>
- protected virtual void OnLoaded()
- {
- MoveFocus(new TraversalRequest(FocusNavigationDirection.First));
- }
-
- /// <summary>
- /// Handles the SizeChanged event of the MainWindow control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="SizeChangedEventArgs" /> instance containing the event data.</param>
- void MainWindow_SizeChanged(object sender, SizeChangedEventArgs e)
- {
- ContentScale = e.NewSize.Height / 1080;
- }
-
- /// <summary>
- /// Called when [browser back].
- /// </summary>
- protected virtual void OnBrowserBack()
- {
-
- }
-
- /// <summary>
- /// Called when [browser forward].
- /// </summary>
- protected virtual void OnBrowserForward()
- {
-
- }
-
- /// <summary>
- /// Invoked when an unhandled <see cref="E:System.Windows.Input.Keyboard.PreviewKeyDown" /> attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
- /// </summary>
- /// <param name="e">The <see cref="T:System.Windows.Input.KeyEventArgs" /> that contains the event data.</param>
- protected override void OnPreviewKeyDown(KeyEventArgs e)
- {
- if (IsBackPress(e))
- {
- e.Handled = true;
-
- if (!e.IsRepeat)
- {
- OnBrowserBack();
- }
- }
-
- else if (IsForwardPress(e))
- {
- e.Handled = true;
-
- if (!e.IsRepeat)
- {
- OnBrowserForward();
- }
- }
- base.OnPreviewKeyDown(e);
- }
-
- /// <summary>
- /// Determines if a keypress should be treated as a backward press
- /// </summary>
- /// <param name="e">The <see cref="KeyEventArgs" /> instance containing the event data.</param>
- /// <returns><c>true</c> if [is back press] [the specified e]; otherwise, <c>false</c>.</returns>
- private bool IsBackPress(KeyEventArgs e)
- {
- if (e.Key == Key.Escape)
- {
- return true;
- }
-
- if (e.Key == Key.BrowserBack || e.Key == Key.Back)
- {
- return true;
- }
-
- if (e.SystemKey == Key.Left && e.KeyboardDevice.Modifiers.HasFlag(ModifierKeys.Alt))
- {
- return true;
- }
-
- return false;
- }
-
- /// <summary>
- /// Determines if a keypress should be treated as a forward press
- /// </summary>
- /// <param name="e">The <see cref="KeyEventArgs" /> instance containing the event data.</param>
- /// <returns><c>true</c> if [is forward press] [the specified e]; otherwise, <c>false</c>.</returns>
- private bool IsForwardPress(KeyEventArgs e)
- {
- if (e.Key == Key.BrowserForward)
- {
- return true;
- }
-
- if (e.SystemKey == Key.RightAlt && e.KeyboardDevice.Modifiers.HasFlag(ModifierKeys.Alt))
- {
- return true;
- }
-
- return false;
- }
- }
-}
diff --git a/MediaBrowser.UI.Controls/ExtendedButton.cs b/MediaBrowser.UI.Controls/ExtendedButton.cs
deleted file mode 100644
index 1b8e9039d..000000000
--- a/MediaBrowser.UI.Controls/ExtendedButton.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Input;
-
-namespace MediaBrowser.UI.Controls
-{
- /// <summary>
- /// This subclass simply autofocuses itself when the mouse moves over it
- /// </summary>
- public class ExtendedButton : Button
- {
- private Point? _lastMouseMovePoint;
-
- /// <summary>
- /// Handles OnMouseMove to auto-select the item that's being moused over
- /// </summary>
- protected override void OnMouseMove(MouseEventArgs e)
- {
- base.OnMouseMove(e);
-
- var window = this.GetWindow();
-
- // If the cursor is currently hidden, don't bother reacting to it
- if (Cursor == Cursors.None || window.Cursor == Cursors.None)
- {
- return;
- }
-
- // Store the last position for comparison purposes
- // Even if the mouse is not moving this event will fire as elements are showing and hiding
- var pos = e.GetPosition(window);
-
- if (!_lastMouseMovePoint.HasValue)
- {
- _lastMouseMovePoint = pos;
- return;
- }
-
- if (pos == _lastMouseMovePoint)
- {
- return;
- }
-
- _lastMouseMovePoint = pos;
-
- Focus();
- }
- }
-}
diff --git a/MediaBrowser.UI.Controls/ExtendedCheckbox.cs b/MediaBrowser.UI.Controls/ExtendedCheckbox.cs
deleted file mode 100644
index 120fa3c24..000000000
--- a/MediaBrowser.UI.Controls/ExtendedCheckbox.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Input;
-
-namespace MediaBrowser.UI.Controls
-{
- /// <summary>
- /// Extends Checkbox to provide focus on mouse over
- /// </summary>
- public class ExtendedCheckbox : CheckBox
- {
- private Point? _lastMouseMovePoint;
-
- /// <summary>
- /// Handles OnMouseMove to auto-select the item that's being moused over
- /// </summary>
- protected override void OnMouseMove(MouseEventArgs e)
- {
- base.OnMouseMove(e);
-
- var window = this.GetWindow();
-
- // If the cursor is currently hidden, don't bother reacting to it
- if (Cursor == Cursors.None || window.Cursor == Cursors.None)
- {
- return;
- }
-
- // Store the last position for comparison purposes
- // Even if the mouse is not moving this event will fire as elements are showing and hiding
- var pos = e.GetPosition(window);
-
- if (!_lastMouseMovePoint.HasValue)
- {
- _lastMouseMovePoint = pos;
- return;
- }
-
- if (pos == _lastMouseMovePoint)
- {
- return;
- }
-
- _lastMouseMovePoint = pos;
-
- Focus();
- }
- }
-}
diff --git a/MediaBrowser.UI.Controls/ExtendedListBox.cs b/MediaBrowser.UI.Controls/ExtendedListBox.cs
deleted file mode 100644
index fb6738939..000000000
--- a/MediaBrowser.UI.Controls/ExtendedListBox.cs
+++ /dev/null
@@ -1,260 +0,0 @@
-using System;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Controls.Primitives;
-using System.Windows.Input;
-using System.Windows.Media;
-
-namespace MediaBrowser.UI.Controls
-{
- /// <summary>
- /// Extends the ListBox to provide auto-focus behavior when items are moused over
- /// This also adds an ItemInvoked event that is fired when an item is clicked or invoked using the enter key
- /// </summary>
- public class ExtendedListBox : ListBox
- {
- /// <summary>
- /// Fired when an item is clicked or invoked using the enter key
- /// </summary>
- public event EventHandler<ItemEventArgs<object>> ItemInvoked;
-
- /// <summary>
- /// Called when [item invoked].
- /// </summary>
- /// <param name="boundObject">The bound object.</param>
- protected virtual void OnItemInvoked(object boundObject)
- {
- if (ItemInvoked != null)
- {
- ItemInvoked(this, new ItemEventArgs<object> { Argument = boundObject });
- }
- }
-
- /// <summary>
- /// The _auto focus
- /// </summary>
- private bool _autoFocus = true;
- /// <summary>
- /// Gets or sets a value indicating if the first list item should be auto-focused on load
- /// </summary>
- /// <value><c>true</c> if [auto focus]; otherwise, <c>false</c>.</value>
- public bool AutoFocus
- {
- get { return _autoFocus; }
- set
- {
- _autoFocus = value;
- }
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="ExtendedListBox" /> class.
- /// </summary>
- public ExtendedListBox()
- : base()
- {
- ItemContainerGenerator.StatusChanged += ItemContainerGeneratorStatusChanged;
- }
-
- /// <summary>
- /// The mouse down object
- /// </summary>
- private object mouseDownObject;
-
- /// <summary>
- /// Invoked when an unhandled <see cref="E:System.Windows.Input.Mouse.PreviewMouseDown" /> attached routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
- /// </summary>
- /// <param name="e">The <see cref="T:System.Windows.Input.MouseButtonEventArgs" /> that contains the event data. The event data reports that one or more mouse buttons were pressed.</param>
- protected override void OnPreviewMouseDown(MouseButtonEventArgs e)
- {
- base.OnPreviewMouseDown(e);
-
- // Get the item that the mouse down event occurred on
- mouseDownObject = GetBoundListItemObject((DependencyObject)e.OriginalSource);
- }
-
- /// <summary>
- /// Invoked when an unhandled <see cref="E:System.Windows.UIElement.MouseLeftButtonUp" /> routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
- /// </summary>
- /// <param name="e">The <see cref="T:System.Windows.Input.MouseButtonEventArgs" /> that contains the event data. The event data reports that the left mouse button was released.</param>
- protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
- {
- base.OnMouseLeftButtonUp(e);
-
- // If the mouse up event occurred on the same item as the mousedown event, then fire ItemInvoked
- if (mouseDownObject != null)
- {
- var boundObject = GetBoundListItemObject((DependencyObject)e.OriginalSource);
-
- if (mouseDownObject == boundObject)
- {
- mouseDownObject = null;
- OnItemInvoked(boundObject);
- }
- }
- }
-
- /// <summary>
- /// The key down object
- /// </summary>
- private object keyDownObject;
-
- /// <summary>
- /// Responds to the <see cref="E:System.Windows.UIElement.KeyDown" /> event.
- /// </summary>
- /// <param name="e">Provides data for <see cref="T:System.Windows.Input.KeyEventArgs" />.</param>
- protected override void OnKeyDown(KeyEventArgs e)
- {
- if (e.Key == Key.Enter)
- {
- if (!e.IsRepeat)
- {
- // Get the item that the keydown event occurred on
- keyDownObject = GetBoundListItemObject((DependencyObject)e.OriginalSource);
- }
-
- e.Handled = true;
- }
-
- base.OnKeyDown(e);
- }
-
- /// <summary>
- /// Invoked when an unhandled <see cref="E:System.Windows.Input.Keyboard.KeyUp" /> attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
- /// </summary>
- /// <param name="e">The <see cref="T:System.Windows.Input.KeyEventArgs" /> that contains the event data.</param>
- protected override void OnKeyUp(KeyEventArgs e)
- {
- base.OnKeyUp(e);
-
- // Fire ItemInvoked when enter is pressed on an item
- if (e.Key == Key.Enter)
- {
- if (!e.IsRepeat)
- {
- // If the keyup event occurred on the same item as the keydown event, then fire ItemInvoked
- if (keyDownObject != null)
- {
- var boundObject = GetBoundListItemObject((DependencyObject)e.OriginalSource);
-
- if (keyDownObject == boundObject)
- {
- keyDownObject = null;
- OnItemInvoked(boundObject);
- }
- }
- }
-
- e.Handled = true;
- }
- }
-
- /// <summary>
- /// The _last mouse move point
- /// </summary>
- private Point? _lastMouseMovePoint;
-
- /// <summary>
- /// Handles OnMouseMove to auto-select the item that's being moused over
- /// </summary>
- /// <param name="e">Provides data for <see cref="T:System.Windows.Input.MouseEventArgs" />.</param>
- protected override void OnMouseMove(MouseEventArgs e)
- {
- base.OnMouseMove(e);
-
- var window = this.GetWindow();
-
- // If the cursor is currently hidden, don't bother reacting to it
- if (Cursor == Cursors.None || window.Cursor == Cursors.None)
- {
- return;
- }
-
- // Store the last position for comparison purposes
- // Even if the mouse is not moving this event will fire as elements are showing and hiding
- var pos = e.GetPosition(window);
-
- if (!_lastMouseMovePoint.HasValue)
- {
- _lastMouseMovePoint = pos;
- return;
- }
-
- if (pos == _lastMouseMovePoint)
- {
- return;
- }
-
- _lastMouseMovePoint = pos;
-
- var dep = (DependencyObject)e.OriginalSource;
-
- while ((dep != null) && !(dep is ListBoxItem))
- {
- dep = VisualTreeHelper.GetParent(dep);
- }
-
- if (dep != null)
- {
- var listBoxItem = dep as ListBoxItem;
-
- if (!listBoxItem.IsFocused)
- {
- listBoxItem.Focus();
- }
- }
- }
-
- /// <summary>
- /// Gets the datacontext for a given ListBoxItem
- /// </summary>
- /// <param name="dep">The dep.</param>
- /// <returns>System.Object.</returns>
- private object GetBoundListItemObject(DependencyObject dep)
- {
- while ((dep != null) && !(dep is ListBoxItem))
- {
- dep = VisualTreeHelper.GetParent(dep);
- }
-
- if (dep == null)
- {
- return null;
- }
-
- return ItemContainerGenerator.ItemFromContainer(dep);
- }
-
- /// <summary>
- /// Autofocuses the first list item when the list is loaded
- /// </summary>
- /// <param name="sender">The sender.</param>
- /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
- void ItemContainerGeneratorStatusChanged(object sender, EventArgs e)
- {
- if (ItemContainerGenerator.Status == GeneratorStatus.ContainersGenerated && AutoFocus)
- {
- Dispatcher.InvokeAsync(OnContainersGenerated);
- }
- }
-
- /// <summary>
- /// Called when [containers generated].
- /// </summary>
- void OnContainersGenerated()
- {
- var index = 0;
-
- if (index >= 0)
- {
- var item = ItemContainerGenerator.ContainerFromIndex(index) as ListBoxItem;
-
- if (item != null)
- {
- item.Focus();
- ItemContainerGenerator.StatusChanged -= ItemContainerGeneratorStatusChanged;
- }
- }
- }
- }
-}
diff --git a/MediaBrowser.UI.Controls/ExtendedRadioButton.cs b/MediaBrowser.UI.Controls/ExtendedRadioButton.cs
deleted file mode 100644
index 82aad7f09..000000000
--- a/MediaBrowser.UI.Controls/ExtendedRadioButton.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Input;
-
-namespace MediaBrowser.UI.Controls
-{
- /// <summary>
- /// Extends RadioButton to provide focus on mouse over, and invoke on enter press
- /// </summary>
- public class ExtendedRadioButton : RadioButton
- {
- private Point? _lastMouseMovePoint;
-
- /// <summary>
- /// Handles OnMouseMove to auto-select the item that's being moused over
- /// </summary>
- protected override void OnMouseMove(MouseEventArgs e)
- {
- base.OnMouseMove(e);
-
- var window = this.GetWindow();
-
- // If the cursor is currently hidden, don't bother reacting to it
- if (Cursor == Cursors.None || window.Cursor == Cursors.None)
- {
- return;
- }
-
- // Store the last position for comparison purposes
- // Even if the mouse is not moving this event will fire as elements are showing and hiding
- var pos = e.GetPosition(window);
-
- if (!_lastMouseMovePoint.HasValue)
- {
- _lastMouseMovePoint = pos;
- return;
- }
-
- if (pos == _lastMouseMovePoint)
- {
- return;
- }
-
- _lastMouseMovePoint = pos;
-
- Focus();
- }
- }
-}
diff --git a/MediaBrowser.UI.Controls/ExtendedScrollViewer.cs b/MediaBrowser.UI.Controls/ExtendedScrollViewer.cs
deleted file mode 100644
index c1a6f1c47..000000000
--- a/MediaBrowser.UI.Controls/ExtendedScrollViewer.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using System.Windows.Controls;
-using System.Windows.Input;
-
-namespace MediaBrowser.UI.Controls
-{
- /// <summary>
- /// This subclass solves the problem of ScrollViewers eating KeyDown for all arrow keys
- /// </summary>
- public class ExtendedScrollViewer : ScrollViewer
- {
- protected override void OnKeyDown(KeyEventArgs e)
- {
- if (e.Handled || e.OriginalSource == this)
- {
- base.OnKeyDown(e);
- return;
- }
-
- // Don't eat left/right if horizontal scrolling is disabled
- if (e.Key == Key.Left || e.Key == Key.Right)
- {
- if (HorizontalScrollBarVisibility == ScrollBarVisibility.Disabled)
- {
- return;
- }
- }
-
- // Don't eat up/down if vertical scrolling is disabled
- if (e.Key == Key.Up || e.Key == Key.Down)
- {
- if (VerticalScrollBarVisibility == ScrollBarVisibility.Disabled)
- {
- return;
- }
- }
-
- // Let the base class do it's thing
- base.OnKeyDown(e);
- }
- }
-}
diff --git a/MediaBrowser.UI.Controls/ItemEventArgs.cs b/MediaBrowser.UI.Controls/ItemEventArgs.cs
deleted file mode 100644
index e0c24b2f5..000000000
--- a/MediaBrowser.UI.Controls/ItemEventArgs.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-using System;
-
-namespace MediaBrowser.UI.Controls
-{
- /// <summary>
- /// Provides a generic EventArgs subclass that can hold any kind of object
- /// </summary>
- /// <typeparam name="T"></typeparam>
- public class ItemEventArgs<T> : EventArgs
- {
- /// <summary>
- /// Gets or sets the argument.
- /// </summary>
- /// <value>The argument.</value>
- public T Argument { get; set; }
- }
-}
diff --git a/MediaBrowser.UI.Controls/MediaBrowser.UI.Controls.csproj b/MediaBrowser.UI.Controls/MediaBrowser.UI.Controls.csproj
deleted file mode 100644
index ee8d2dca7..000000000
--- a/MediaBrowser.UI.Controls/MediaBrowser.UI.Controls.csproj
+++ /dev/null
@@ -1,110 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{1ADFE460-FD95-46FA-8871-CCCB4B62E2E8}</ProjectGuid>
- <OutputType>library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>MediaBrowser.UI.Controls</RootNamespace>
- <AssemblyName>MediaBrowser.UI.Controls</AssemblyName>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Microsoft.Expression.Effects">
- <HintPath>..\ThirdParty\Expression\Microsoft.Expression.Effects.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Expression.Interactions">
- <HintPath>..\ThirdParty\Expression\Microsoft.Expression.Interactions.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="System.Core" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="System.Xaml">
- <RequiredTargetFramework>4.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="WindowsBase" />
- <Reference Include="PresentationCore" />
- <Reference Include="PresentationFramework" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="BaseModalWindow.cs" />
- <Compile Include="BaseUserControl.cs" />
- <Compile Include="BaseWindow.cs" />
- <Compile Include="ExtendedButton.cs" />
- <Compile Include="ExtendedCheckbox.cs" />
- <Compile Include="ExtendedListBox.cs" />
- <Compile Include="ExtendedRadioButton.cs" />
- <Compile Include="ExtendedScrollViewer.cs" />
- <Compile Include="ItemEventArgs.cs" />
- <Compile Include="Properties\AssemblyInfo.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="Properties\Resources.Designer.cs">
- <AutoGen>True</AutoGen>
- <DesignTime>True</DesignTime>
- <DependentUpon>Resources.resx</DependentUpon>
- </Compile>
- <Compile Include="Properties\Settings.Designer.cs">
- <AutoGen>True</AutoGen>
- <DependentUpon>Settings.settings</DependentUpon>
- <DesignTimeSharedInput>True</DesignTimeSharedInput>
- </Compile>
- <Compile Include="ScrollingPanel.cs" />
- <Compile Include="TransitionControl.cs" />
- <Compile Include="TransitionFrame.cs" />
- <Compile Include="TreeHelper.cs" />
- <Compile Include="VirtualizingWrapPanel.cs" />
- <EmbeddedResource Include="Properties\Resources.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>Resources.Designer.cs</LastGenOutput>
- </EmbeddedResource>
- <None Include="Properties\Settings.settings">
- <Generator>SettingsSingleFileGenerator</Generator>
- <LastGenOutput>Settings.Designer.cs</LastGenOutput>
- </None>
- <AppDesigner Include="Properties\" />
- </ItemGroup>
- <ItemGroup>
- <Page Include="Themes\Generic.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <PropertyGroup>
- <PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\Nuget\dlls\" /y /d /r /i</PostBuildEvent>
- </PropertyGroup>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
diff --git a/MediaBrowser.UI.Controls/Properties/AssemblyInfo.cs b/MediaBrowser.UI.Controls/Properties/AssemblyInfo.cs
deleted file mode 100644
index 0d360004c..000000000
--- a/MediaBrowser.UI.Controls/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Windows;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("MediaBrowser.UI.Controls")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("MediaBrowser.UI.Controls")]
-[assembly: AssemblyCopyright("Copyright © 2013")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-//In order to begin building localizable applications, set
-//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
-//inside a <PropertyGroup>. For example, if you are using US english
-//in your source files, set the <UICulture> to en-US. Then uncomment
-//the NeutralResourceLanguage attribute below. Update the "en-US" in
-//the line below to match the UICulture setting in the project file.
-
-//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
-
-
-[assembly:ThemeInfo(
- ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
- //(used if a resource is not found in the page,
- // or application resource dictionaries)
- ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
- //(used if a resource is not found in the page,
- // app, or any theme specific resource dictionaries)
-)]
-
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/MediaBrowser.UI.Controls/Properties/Resources.Designer.cs b/MediaBrowser.UI.Controls/Properties/Resources.Designer.cs
deleted file mode 100644
index b03f1d59b..000000000
--- a/MediaBrowser.UI.Controls/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.18033
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace MediaBrowser.UI.Controls.Properties {
-
-
- /// <summary>
- /// A strongly-typed resource class, for looking up localized strings, etc.
- /// </summary>
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources() {
- }
-
- /// <summary>
- /// Returns the cached ResourceManager instance used by this class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager {
- get {
- if ((resourceMan == null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MediaBrowser.UI.Controls.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- /// <summary>
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/MediaBrowser.UI.Controls/Properties/Resources.resx b/MediaBrowser.UI.Controls/Properties/Resources.resx
deleted file mode 100644
index af7dbebba..000000000
--- a/MediaBrowser.UI.Controls/Properties/Resources.resx
+++ /dev/null
@@ -1,117 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root> \ No newline at end of file
diff --git a/MediaBrowser.UI.Controls/Properties/Settings.Designer.cs b/MediaBrowser.UI.Controls/Properties/Settings.Designer.cs
deleted file mode 100644
index d256289c1..000000000
--- a/MediaBrowser.UI.Controls/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.18033
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace MediaBrowser.UI.Controls.Properties
-{
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/MediaBrowser.UI.Controls/Properties/Settings.settings b/MediaBrowser.UI.Controls/Properties/Settings.settings
deleted file mode 100644
index 033d7a5e9..000000000
--- a/MediaBrowser.UI.Controls/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
- <Profiles>
- <Profile Name="(Default)" />
- </Profiles>
- <Settings />
-</SettingsFile> \ No newline at end of file
diff --git a/MediaBrowser.UI.Controls/ScrollingPanel.cs b/MediaBrowser.UI.Controls/ScrollingPanel.cs
deleted file mode 100644
index 636661f54..000000000
--- a/MediaBrowser.UI.Controls/ScrollingPanel.cs
+++ /dev/null
@@ -1,404 +0,0 @@
-using System;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Controls.Primitives;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-
-namespace MediaBrowser.UI.Controls
-{
- /// <summary>
- /// This started from:
- /// http://www.switchonthecode.com/tutorials/wpf-tutorial-implementing-iscrollinfo
- /// Then, after implementing this, content was being displayed in stack panel like manner.
- /// I then reviewed the source code of ScrollContentPresenter and updated MeasureOverride and ArrangeOverride to match.
- /// </summary>
- public class ScrollingPanel : Grid, IScrollInfo
- {
- /// <summary>
- /// The infinite size
- /// </summary>
- private static Size InfiniteSize = new Size(double.PositiveInfinity, double.PositiveInfinity);
- /// <summary>
- /// The line size
- /// </summary>
- private const double LineSize = 16;
- /// <summary>
- /// The wheel size
- /// </summary>
- private const double WheelSize = 3 * LineSize;
-
- /// <summary>
- /// The _ offset
- /// </summary>
- private Vector _Offset;
- /// <summary>
- /// The _ extent
- /// </summary>
- private Size _Extent;
- /// <summary>
- /// The _ viewport
- /// </summary>
- private Size _Viewport;
-
- /// <summary>
- /// The _ animation length
- /// </summary>
- private TimeSpan _AnimationLength = TimeSpan.FromMilliseconds(125);
-
- /// <summary>
- /// When overridden in a derived class, measures the size in layout required for child elements and determines a size for the <see cref="T:System.Windows.FrameworkElement" />-derived class.
- /// </summary>
- /// <param name="availableSize">The available size that this element can give to child elements. Infinity can be specified as a value to indicate that the element will size to whatever content is available.</param>
- /// <returns>The size that this element determines it needs during layout, based on its calculations of child element sizes.</returns>
- protected override Size MeasureOverride(Size availableSize)
- {
- if (Children == null || Children.Count == 0)
- {
- return availableSize;
- }
-
- var constraint2 = availableSize;
- if (CanHorizontallyScroll)
- {
- constraint2.Width = double.PositiveInfinity;
- }
- if (CanVerticallyScroll)
- {
- constraint2.Height = double.PositiveInfinity;
- }
-
- var uiElement = Children[0];
-
- uiElement.Measure(constraint2);
- var size = uiElement.DesiredSize;
-
- VerifyScrollData(availableSize, size);
-
- size.Width = Math.Min(availableSize.Width, size.Width);
- size.Height = Math.Min(availableSize.Height, size.Height);
-
- return size;
- }
-
- /// <summary>
- /// Arranges the content of a <see cref="T:System.Windows.Controls.Grid" /> element.
- /// </summary>
- /// <param name="arrangeSize">Specifies the size this <see cref="T:System.Windows.Controls.Grid" /> element should use to arrange its child elements.</param>
- /// <returns><see cref="T:System.Windows.Size" /> that represents the arranged size of this Grid element and its children.</returns>
- protected override Size ArrangeOverride(Size arrangeSize)
- {
- this.VerifyScrollData(arrangeSize, _Extent);
-
- if (this.Children == null || this.Children.Count == 0)
- {
- return arrangeSize;
- }
-
- TranslateTransform trans = null;
-
- var uiElement = Children[0];
-
- var finalRect = new Rect(uiElement.DesiredSize);
-
- // ScrollContentPresenter sets these to 0 - current offset
- // We need to set it to zero in order to make the animation work
- finalRect.X = 0;
- finalRect.Y = 0;
-
- finalRect.Width = Math.Max(finalRect.Width, arrangeSize.Width);
- finalRect.Height = Math.Max(finalRect.Height, arrangeSize.Height);
-
- trans = uiElement.RenderTransform as TranslateTransform;
-
- if (trans == null)
- {
- uiElement.RenderTransformOrigin = new Point(0, 0);
- trans = new TranslateTransform();
- uiElement.RenderTransform = trans;
- }
-
- uiElement.Arrange(finalRect);
-
- trans.BeginAnimation(TranslateTransform.XProperty,
- GetAnimation(0 - HorizontalOffset),
- HandoffBehavior.Compose);
- trans.BeginAnimation(TranslateTransform.YProperty,
- GetAnimation(0 - VerticalOffset),
- HandoffBehavior.Compose);
-
- return arrangeSize;
- }
-
- /// <summary>
- /// Gets the animation.
- /// </summary>
- /// <param name="toValue">To value.</param>
- /// <returns>DoubleAnimation.</returns>
- private DoubleAnimation GetAnimation(double toValue)
- {
- var animation = new DoubleAnimation(toValue, _AnimationLength);
-
- animation.EasingFunction = new ExponentialEase { EasingMode = EasingMode.EaseInOut };
-
- return animation;
- }
-
- #region Movement Methods
- /// <summary>
- /// Scrolls down within content by one logical unit.
- /// </summary>
- public void LineDown()
- { SetVerticalOffset(VerticalOffset + LineSize); }
-
- /// <summary>
- /// Scrolls up within content by one logical unit.
- /// </summary>
- public void LineUp()
- { SetVerticalOffset(VerticalOffset - LineSize); }
-
- /// <summary>
- /// Scrolls left within content by one logical unit.
- /// </summary>
- public void LineLeft()
- { SetHorizontalOffset(HorizontalOffset - LineSize); }
-
- /// <summary>
- /// Scrolls right within content by one logical unit.
- /// </summary>
- public void LineRight()
- { SetHorizontalOffset(HorizontalOffset + LineSize); }
-
- /// <summary>
- /// Scrolls down within content after a user clicks the wheel button on a mouse.
- /// </summary>
- public void MouseWheelDown()
- { SetVerticalOffset(VerticalOffset + WheelSize); }
-
- /// <summary>
- /// Scrolls up within content after a user clicks the wheel button on a mouse.
- /// </summary>
- public void MouseWheelUp()
- { SetVerticalOffset(VerticalOffset - WheelSize); }
-
- /// <summary>
- /// Scrolls left within content after a user clicks the wheel button on a mouse.
- /// </summary>
- public void MouseWheelLeft()
- { SetHorizontalOffset(HorizontalOffset - WheelSize); }
-
- /// <summary>
- /// Scrolls right within content after a user clicks the wheel button on a mouse.
- /// </summary>
- public void MouseWheelRight()
- { SetHorizontalOffset(HorizontalOffset + WheelSize); }
-
- /// <summary>
- /// Scrolls down within content by one page.
- /// </summary>
- public void PageDown()
- { SetVerticalOffset(VerticalOffset + ViewportHeight); }
-
- /// <summary>
- /// Scrolls up within content by one page.
- /// </summary>
- public void PageUp()
- { SetVerticalOffset(VerticalOffset - ViewportHeight); }
-
- /// <summary>
- /// Scrolls left within content by one page.
- /// </summary>
- public void PageLeft()
- { SetHorizontalOffset(HorizontalOffset - ViewportWidth); }
-
- /// <summary>
- /// Scrolls right within content by one page.
- /// </summary>
- public void PageRight()
- { SetHorizontalOffset(HorizontalOffset + ViewportWidth); }
- #endregion
-
- /// <summary>
- /// Gets or sets a <see cref="T:System.Windows.Controls.ScrollViewer" /> element that controls scrolling behavior.
- /// </summary>
- /// <value>The scroll owner.</value>
- /// <returns>A <see cref="T:System.Windows.Controls.ScrollViewer" /> element that controls scrolling behavior. This property has no default value.</returns>
- public ScrollViewer ScrollOwner { get; set; }
-
- /// <summary>
- /// Gets or sets a value that indicates whether scrolling on the horizontal axis is possible.
- /// </summary>
- /// <value><c>true</c> if this instance can horizontally scroll; otherwise, <c>false</c>.</value>
- /// <returns>true if scrolling is possible; otherwise, false. This property has no default value.</returns>
- public bool CanHorizontallyScroll { get; set; }
-
- /// <summary>
- /// Gets or sets a value that indicates whether scrolling on the vertical axis is possible.
- /// </summary>
- /// <value><c>true</c> if this instance can vertically scroll; otherwise, <c>false</c>.</value>
- /// <returns>true if scrolling is possible; otherwise, false. This property has no default value.</returns>
- public bool CanVerticallyScroll { get; set; }
-
- /// <summary>
- /// Gets the vertical size of the extent.
- /// </summary>
- /// <value>The height of the extent.</value>
- /// <returns>A <see cref="T:System.Double" /> that represents, in device independent pixels, the vertical size of the extent.This property has no default value.</returns>
- public double ExtentHeight
- { get { return _Extent.Height; } }
-
- /// <summary>
- /// Gets the horizontal size of the extent.
- /// </summary>
- /// <value>The width of the extent.</value>
- /// <returns>A <see cref="T:System.Double" /> that represents, in device independent pixels, the horizontal size of the extent. This property has no default value.</returns>
- public double ExtentWidth
- { get { return _Extent.Width; } }
-
- /// <summary>
- /// Gets the horizontal offset of the scrolled content.
- /// </summary>
- /// <value>The horizontal offset.</value>
- /// <returns>A <see cref="T:System.Double" /> that represents, in device independent pixels, the horizontal offset. This property has no default value.</returns>
- public double HorizontalOffset
- { get { return _Offset.X; } }
-
- /// <summary>
- /// Gets the vertical offset of the scrolled content.
- /// </summary>
- /// <value>The vertical offset.</value>
- /// <returns>A <see cref="T:System.Double" /> that represents, in device independent pixels, the vertical offset of the scrolled content. Valid values are between zero and the <see cref="P:System.Windows.Controls.Primitives.IScrollInfo.ExtentHeight" /> minus the <see cref="P:System.Windows.Controls.Primitives.IScrollInfo.ViewportHeight" />. This property has no default value.</returns>
- public double VerticalOffset
- { get { return _Offset.Y; } }
-
- /// <summary>
- /// Gets the vertical size of the viewport for this content.
- /// </summary>
- /// <value>The height of the viewport.</value>
- /// <returns>A <see cref="T:System.Double" /> that represents, in device independent pixels, the vertical size of the viewport for this content. This property has no default value.</returns>
- public double ViewportHeight
- { get { return _Viewport.Height; } }
-
- /// <summary>
- /// Gets the horizontal size of the viewport for this content.
- /// </summary>
- /// <value>The width of the viewport.</value>
- /// <returns>A <see cref="T:System.Double" /> that represents, in device independent pixels, the horizontal size of the viewport for this content. This property has no default value.</returns>
- public double ViewportWidth
- { get { return _Viewport.Width; } }
-
- /// <summary>
- /// Forces content to scroll until the coordinate space of a <see cref="T:System.Windows.Media.Visual" /> object is visible.
- /// </summary>
- /// <param name="visual">A <see cref="T:System.Windows.Media.Visual" /> that becomes visible.</param>
- /// <param name="rectangle">A bounding rectangle that identifies the coordinate space to make visible.</param>
- /// <returns>A <see cref="T:System.Windows.Rect" /> that is visible.</returns>
- public Rect MakeVisible(Visual visual, Rect rectangle)
- {
- if (rectangle.IsEmpty || visual == null
- || visual == this || !base.IsAncestorOf(visual))
- { return Rect.Empty; }
-
- rectangle = visual.TransformToAncestor(this).TransformBounds(rectangle);
-
- //rectangle.Inflate(50, 50);
- rectangle.Scale(1.2, 1.2);
-
- Rect viewRect = new Rect(HorizontalOffset,
- VerticalOffset, ViewportWidth, ViewportHeight);
- rectangle.X += viewRect.X;
- rectangle.Y += viewRect.Y;
-
- viewRect.X = CalculateNewScrollOffset(viewRect.Left,
- viewRect.Right, rectangle.Left, rectangle.Right);
- viewRect.Y = CalculateNewScrollOffset(viewRect.Top,
- viewRect.Bottom, rectangle.Top, rectangle.Bottom);
- SetHorizontalOffset(viewRect.X);
- SetVerticalOffset(viewRect.Y);
- rectangle.Intersect(viewRect);
- rectangle.X -= viewRect.X;
- rectangle.Y -= viewRect.Y;
-
- return rectangle;
- }
-
- /// <summary>
- /// Calculates the new scroll offset.
- /// </summary>
- /// <param name="topView">The top view.</param>
- /// <param name="bottomView">The bottom view.</param>
- /// <param name="topChild">The top child.</param>
- /// <param name="bottomChild">The bottom child.</param>
- /// <returns>System.Double.</returns>
- private static double CalculateNewScrollOffset(double topView,
- double bottomView, double topChild, double bottomChild)
- {
- bool offBottom = topChild < topView && bottomChild < bottomView;
- bool offTop = bottomChild > bottomView && topChild > topView;
- bool tooLarge = (bottomChild - topChild) > (bottomView - topView);
-
- if (!offBottom && !offTop)
- { return topView; } //Don't do anything, already in view
-
- if ((offBottom && !tooLarge) || (offTop && tooLarge))
- { return topChild; }
-
- return (bottomChild - (bottomView - topView));
- }
-
- /// <summary>
- /// Verifies the scroll data.
- /// </summary>
- /// <param name="viewport">The viewport.</param>
- /// <param name="extent">The extent.</param>
- protected void VerifyScrollData(Size viewport, Size extent)
- {
- if (double.IsInfinity(viewport.Width))
- { viewport.Width = extent.Width; }
-
- if (double.IsInfinity(viewport.Height))
- { viewport.Height = extent.Height; }
-
- _Extent = extent;
- _Viewport = viewport;
-
- _Offset.X = Math.Max(0,
- Math.Min(_Offset.X, ExtentWidth - ViewportWidth));
- _Offset.Y = Math.Max(0,
- Math.Min(_Offset.Y, ExtentHeight - ViewportHeight));
-
- if (ScrollOwner != null)
- { ScrollOwner.InvalidateScrollInfo(); }
- }
-
- /// <summary>
- /// Sets the amount of horizontal offset.
- /// </summary>
- /// <param name="offset">The degree to which content is horizontally offset from the containing viewport.</param>
- public void SetHorizontalOffset(double offset)
- {
- offset = Math.Max(0,
- Math.Min(offset, ExtentWidth - ViewportWidth));
- if (!offset.Equals(_Offset.X))
- {
- _Offset.X = offset;
- InvalidateArrange();
- }
- }
-
- /// <summary>
- /// Sets the amount of vertical offset.
- /// </summary>
- /// <param name="offset">The degree to which content is vertically offset from the containing viewport.</param>
- public void SetVerticalOffset(double offset)
- {
- offset = Math.Max(0,
- Math.Min(offset, ExtentHeight - ViewportHeight));
- if (!offset.Equals(_Offset.Y))
- {
- _Offset.Y = offset;
- InvalidateArrange();
- }
- }
- }
-}
diff --git a/MediaBrowser.UI.Controls/Themes/Generic.xaml b/MediaBrowser.UI.Controls/Themes/Generic.xaml
deleted file mode 100644
index 44e50a559..000000000
--- a/MediaBrowser.UI.Controls/Themes/Generic.xaml
+++ /dev/null
@@ -1,17 +0,0 @@
-<ResourceDictionary
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:local="clr-namespace:MediaBrowser.UI.Controls">
-
- <Style TargetType="local:TransitionControl">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="local:TransitionControl">
- <Grid>
- <ContentPresenter x:Name="ContentPresenter" />
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-</ResourceDictionary>
diff --git a/MediaBrowser.UI.Controls/TransitionControl.cs b/MediaBrowser.UI.Controls/TransitionControl.cs
deleted file mode 100644
index d1e5ccf0a..000000000
--- a/MediaBrowser.UI.Controls/TransitionControl.cs
+++ /dev/null
@@ -1,147 +0,0 @@
-using Microsoft.Expression.Media.Effects;
-using System.ComponentModel;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-
-namespace MediaBrowser.UI.Controls
-{
- /// <summary>
- /// http://victorcher.blogspot.com/2012/02/wpf-transactions.html
- /// </summary>
- public class TransitionControl : ContentControl
- {
- /// <summary>
- /// The _content presenter
- /// </summary>
- private ContentPresenter _contentPresenter;
-
- /// <summary>
- /// Initializes static members of the <see cref="TransitionControl" /> class.
- /// </summary>
- static TransitionControl()
- {
- DefaultStyleKeyProperty.OverrideMetadata(
- typeof(TransitionControl), new FrameworkPropertyMetadata(typeof(TransitionControl)));
-
- ContentProperty.OverrideMetadata(
- typeof(TransitionControl), new FrameworkPropertyMetadata(OnContentPropertyChanged));
- }
-
- /// <summary>
- /// When overridden in a derived class, is invoked whenever application code or internal processes call <see cref="M:System.Windows.FrameworkElement.ApplyTemplate" />.
- /// </summary>
- public override void OnApplyTemplate()
- {
- base.OnApplyTemplate();
- _contentPresenter = (ContentPresenter)Template.FindName("ContentPresenter", this);
- }
-
- #region DP TransitionType
-
- /// <summary>
- /// Gets or sets the type of the transition.
- /// </summary>
- /// <value>The type of the transition.</value>
- public TransitionEffect TransitionType
- {
- get { return (TransitionEffect)GetValue(TransitionTypeProperty); }
- set { SetValue(TransitionTypeProperty, value); }
- }
-
- // Using a DependencyProperty as the backing store for TransitionType. This enables animation, styling, binding, etc...
- /// <summary>
- /// The transition type property
- /// </summary>
- public static readonly DependencyProperty TransitionTypeProperty =
- DependencyProperty.Register("TransitionType", typeof(TransitionEffect), typeof(TransitionControl),
- new UIPropertyMetadata(new BlindsTransitionEffect()));
-
- #endregion DP TransitionType
-
- #region DP Transition Animation
-
- /// <summary>
- /// Gets or sets the transition animation.
- /// </summary>
- /// <value>The transition animation.</value>
- public DoubleAnimation TransitionAnimation
- {
- get { return (DoubleAnimation)GetValue(TransitionAnimationProperty); }
- set { SetValue(TransitionAnimationProperty, value); }
- }
-
- // Using a DependencyProperty as the backing store for TransitionAnimation. This enables animation, styling, binding, etc...
- /// <summary>
- /// The transition animation property
- /// </summary>
- public static readonly DependencyProperty TransitionAnimationProperty =
- DependencyProperty.Register("TransitionAnimation", typeof(DoubleAnimation), typeof(TransitionControl), new UIPropertyMetadata(null));
-
- #endregion DP Transition Animation
-
- /// <summary>
- /// Called when [content property changed].
- /// </summary>
- /// <param name="dp">The dp.</param>
- /// <param name="args">The <see cref="DependencyPropertyChangedEventArgs" /> instance containing the event data.</param>
- private static void OnContentPropertyChanged(DependencyObject dp, DependencyPropertyChangedEventArgs args)
- {
- var oldContent = args.OldValue;
- var newContent = args.NewValue;
-
- var transitionControl = (TransitionControl)dp;
-
- if (DesignerProperties.GetIsInDesignMode(transitionControl))
- return;
-
- if (oldContent != null && newContent != null && transitionControl.IsVisible)
- {
- transitionControl.AnimateContent(oldContent, newContent);
- }
- else if (newContent != null)
- {
- transitionControl.Content = newContent;
- }
- }
-
- /// <summary>
- /// Animates the content.
- /// </summary>
- /// <param name="oldContent">The old content.</param>
- /// <param name="newContent">The new content.</param>
- private void AnimateContent(object oldContent, object newContent)
- {
- FrameworkElement oldContentVisual;
-
- try
- {
- oldContentVisual = VisualTreeHelper.GetChild(_contentPresenter, 0) as FrameworkElement;
- }
- catch
- {
- return;
- }
-
- var transitionEffect = TransitionType;
-
- if (transitionEffect == null)
- {
- _contentPresenter.Content = newContent;
- return;
- }
-
- var da = TransitionAnimation;
- da.From = 0;
- da.To = 1;
- da.FillBehavior = FillBehavior.HoldEnd;
-
- transitionEffect.OldImage = new VisualBrush(oldContentVisual);
- transitionEffect.BeginAnimation(TransitionEffect.ProgressProperty, da);
-
- _contentPresenter.Effect = transitionEffect;
- _contentPresenter.Content = newContent;
- }
- }
-} \ No newline at end of file
diff --git a/MediaBrowser.UI.Controls/TransitionFrame.cs b/MediaBrowser.UI.Controls/TransitionFrame.cs
deleted file mode 100644
index e6f8325cc..000000000
--- a/MediaBrowser.UI.Controls/TransitionFrame.cs
+++ /dev/null
@@ -1,194 +0,0 @@
-using Microsoft.Expression.Media.Effects;
-using System;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-
-namespace MediaBrowser.UI.Controls
-{
- /// <summary>
- /// Class TransitionFrame
- /// </summary>
- public class TransitionFrame : Frame
- {
- /// <summary>
- /// The _content presenter
- /// </summary>
- private ContentPresenter _contentPresenter = null;
-
- #region DP TransitionType
-
- /// <summary>
- /// Gets or sets the type of the transition.
- /// </summary>
- /// <value>The type of the transition.</value>
- public TransitionEffect TransitionType
- {
- get { return (TransitionEffect)GetValue(TransitionTypeProperty); }
- set { SetValue(TransitionTypeProperty, value); }
- }
-
- // Using a DependencyProperty as the backing store for TransitionType. This enables animation, styling, binding, etc...
- /// <summary>
- /// The transition type property
- /// </summary>
- public static readonly DependencyProperty TransitionTypeProperty =
- DependencyProperty.Register("TransitionType", typeof(TransitionEffect), typeof(TransitionFrame),
- new UIPropertyMetadata(new BlindsTransitionEffect()));
-
- #endregion DP TransitionType
-
- #region DP Transition Animation
-
- /// <summary>
- /// Gets or sets the transition animation.
- /// </summary>
- /// <value>The transition animation.</value>
- public DoubleAnimation TransitionAnimation
- {
- get { return (DoubleAnimation)GetValue(TransitionAnimationProperty); }
- set { SetValue(TransitionAnimationProperty, value); }
- }
-
- // Using a DependencyProperty as the backing store for TransitionAnimation. This enables animation, styling, binding, etc...
- /// <summary>
- /// The transition animation property
- /// </summary>
- public static readonly DependencyProperty TransitionAnimationProperty =
- DependencyProperty.Register("TransitionAnimation", typeof(DoubleAnimation), typeof(TransitionFrame), new UIPropertyMetadata(null));
-
- #endregion DP Transition Animation
-
- /// <summary>
- /// Called when the template generation for the visual tree is created.
- /// </summary>
- public override void OnApplyTemplate()
- {
- // get a reference to the frame's content presenter
- // this is the element we will fade in and out
- _contentPresenter = GetTemplateChild("PART_FrameCP") as ContentPresenter;
- base.OnApplyTemplate();
- }
-
- /// <summary>
- /// Animates the content.
- /// </summary>
- /// <param name="navigationAction">The navigation action.</param>
- /// <param name="checkContent">if set to <c>true</c> [check content].</param>
- /// <param name="isBack">if set to <c>true</c> [is back].</param>
- private void AnimateContent(Action navigationAction, bool checkContent = true, bool isBack = false)
- {
- if (TransitionType == null || (checkContent && Content == null))
- {
- CommandBindings.Clear();
- navigationAction();
- CommandBindings.Clear();
- return;
- }
-
- var oldContentVisual = this as FrameworkElement;
-
- _contentPresenter.IsHitTestVisible = false;
-
- var da = TransitionAnimation.Clone();
- da.From = 0;
- da.To = 1;
- da.FillBehavior = FillBehavior.HoldEnd;
-
- var transitionEffect = TransitionType.Clone() as TransitionEffect;
-
- if (isBack)
- {
- ReverseDirection(transitionEffect);
- }
-
- transitionEffect.OldImage = new VisualBrush(oldContentVisual);
- transitionEffect.BeginAnimation(TransitionEffect.ProgressProperty, da);
-
- _contentPresenter.Effect = transitionEffect;
- _contentPresenter.IsHitTestVisible = true;
-
- // Remove base class bindings to remote buttons
- CommandBindings.Clear();
-
- navigationAction();
-
- CommandBindings.Clear();
- }
-
- /// <summary>
- /// Navigates the with transition.
- /// </summary>
- /// <param name="page">The page.</param>
- public void NavigateWithTransition(Page page)
- {
- AnimateContent(() => Navigate(page));
- }
-
- /// <summary>
- /// Navigates the with transition.
- /// </summary>
- /// <param name="page">The page.</param>
- public void NavigateWithTransition(Uri page)
- {
- AnimateContent(() => Navigate(page));
- }
-
- /// <summary>
- /// Goes the back with transition.
- /// </summary>
- public void GoBackWithTransition()
- {
- if (CanGoBack)
- {
- AnimateContent(GoBack, false, true);
- }
- }
-
- /// <summary>
- /// Goes the forward with transition.
- /// </summary>
- public void GoForwardWithTransition()
- {
- if (CanGoForward)
- {
- AnimateContent(GoForward, false);
- }
- }
-
- /// <summary>
- /// Reverses the direction.
- /// </summary>
- /// <param name="transitionEffect">The transition effect.</param>
- private void ReverseDirection(TransitionEffect transitionEffect)
- {
- var circleRevealTransitionEffect = transitionEffect as CircleRevealTransitionEffect;
-
- if (circleRevealTransitionEffect != null)
- {
- circleRevealTransitionEffect.Reverse = true;
- return;
- }
-
- var slideInTransitionEffect = transitionEffect as SlideInTransitionEffect;
- if (slideInTransitionEffect != null)
- {
- if (slideInTransitionEffect.SlideDirection == SlideDirection.RightToLeft)
- {
- slideInTransitionEffect.SlideDirection = SlideDirection.LeftToRight;
- }
- return;
- }
-
- var wipeTransitionEffect = transitionEffect as WipeTransitionEffect;
- if (wipeTransitionEffect != null)
- {
- if (wipeTransitionEffect.WipeDirection == WipeDirection.RightToLeft)
- {
- wipeTransitionEffect.WipeDirection = WipeDirection.LeftToRight;
- }
- }
- }
- }
-}
diff --git a/MediaBrowser.UI.Controls/TreeHelper.cs b/MediaBrowser.UI.Controls/TreeHelper.cs
deleted file mode 100644
index 0347f1eba..000000000
--- a/MediaBrowser.UI.Controls/TreeHelper.cs
+++ /dev/null
@@ -1,321 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Windows;
-using System.Windows.Media;
-
-namespace MediaBrowser.UI.Controls
-{
- /// <summary>
- /// Helper methods for UI-related tasks.
- /// </summary>
- public static class TreeHelper
- {
- /// <summary>
- /// Gets the window.
- /// </summary>
- /// <param name="element">The element.</param>
- /// <returns>Window.</returns>
- /// <value>The window.</value>
- public static Window GetWindow(this FrameworkElement element)
- {
- return element.ParentOfType<Window>();
- }
-
- /// <summary>
- /// Gets the parent.
- /// </summary>
- /// <param name="element">The element.</param>
- /// <returns>DependencyObject.</returns>
- private static DependencyObject GetParent(this DependencyObject element)
- {
- DependencyObject parent = VisualTreeHelper.GetParent(element);
- if (parent == null)
- {
- FrameworkElement frameworkElement = element as FrameworkElement;
- if (frameworkElement != null)
- {
- parent = frameworkElement.Parent;
- }
- }
- return parent;
- }
-
- /// <summary>
- /// Gets the parents.
- /// </summary>
- /// <param name="element">The element.</param>
- /// <returns>IEnumerable{DependencyObject}.</returns>
- /// <exception cref="System.ArgumentNullException">element</exception>
- public static IEnumerable<DependencyObject> GetParents(this DependencyObject element)
- {
- if (element == null)
- {
- throw new ArgumentNullException("element");
- }
- while ((element = element.GetParent()) != null)
- {
- yield return element;
- }
- yield break;
- }
-
- /// <summary>
- /// Parents the type of the of.
- /// </summary>
- /// <typeparam name="T"></typeparam>
- /// <param name="element">The element.</param>
- /// <returns>``0.</returns>
- public static T ParentOfType<T>(this DependencyObject element) where T : DependencyObject
- {
- if (element == null)
- {
- return default(T);
- }
- return element.GetParents().OfType<T>().FirstOrDefault<T>();
- }
-
- /// <summary>
- /// Finds a Child of a given item in the visual tree.
- /// </summary>
- /// <typeparam name="T">The type of the queried item.</typeparam>
- /// <param name="parent">A direct parent of the queried item.</param>
- /// <param name="childName">x:Name or Name of child.</param>
- /// <returns>The first parent item that matches the submitted type parameter.
- /// If not matching item can be found,
- /// a null parent is being returned.</returns>
- public static T FindChild<T>(DependencyObject parent, string childName)
- where T : DependencyObject
- {
- // Confirm parent and childName are valid.
- if (parent == null) return null;
-
- T foundChild = null;
-
- int childrenCount = VisualTreeHelper.GetChildrenCount(parent);
- for (int i = 0; i < childrenCount; i++)
- {
- var child = VisualTreeHelper.GetChild(parent, i);
- // If the child is not of the request child type child
- T childType = child as T;
- if (childType == null)
- {
- // recursively drill down the tree
- foundChild = FindChild<T>(child, childName);
-
- // If the child is found, break so we do not overwrite the found child.
- if (foundChild != null) break;
- }
- else if (!string.IsNullOrEmpty(childName))
- {
- var frameworkElement = child as FrameworkElement;
- // If the child's name is set for search
- if (frameworkElement != null && frameworkElement.Name == childName)
- {
- // if the child's name is of the request name
- foundChild = (T)child;
- break;
- }
- }
- else
- {
- // child element found.
- foundChild = (T)child;
- break;
- }
- }
-
- return foundChild;
- }
-
- /// <summary>
- /// Gets the visual child.
- /// </summary>
- /// <typeparam name="T"></typeparam>
- /// <param name="referenceVisual">The reference visual.</param>
- /// <returns>``0.</returns>
- public static T GetVisualChild<T>(this Visual referenceVisual) where T : Visual
- {
- Visual child = null;
- for (Int32 i = 0; i < VisualTreeHelper.GetChildrenCount(referenceVisual); i++)
- {
- child = VisualTreeHelper.GetChild(referenceVisual, i) as Visual;
- if (child != null && (child.GetType() == typeof(T)))
- {
- break;
- }
- else if (child != null)
- {
- child = GetVisualChild<T>(child);
- if (child != null && (child.GetType() == typeof(T)))
- {
- break;
- }
- }
- }
- return child as T;
- }
-
- #region find parent
-
- /// <summary>
- /// Finds a parent of a given item on the visual tree.
- /// </summary>
- /// <typeparam name="T">The type of the queried item.</typeparam>
- /// <param name="child">A direct or indirect child of the
- /// queried item.</param>
- /// <returns>The first parent item that matches the submitted
- /// type parameter. If not matching item can be found, a null
- /// reference is being returned.</returns>
- public static T TryFindParent<T>(this DependencyObject child)
- where T : DependencyObject
- {
- //get parent item
- DependencyObject parentObject = GetParentObject(child);
-
- //we've reached the end of the tree
- if (parentObject == null) return null;
-
- //check if the parent matches the type we're looking for
- T parent = parentObject as T;
- if (parent != null)
- {
- return parent;
- }
-
- //use recursion to proceed with next level
- return TryFindParent<T>(parentObject);
- }
-
- /// <summary>
- /// This method is an alternative to WPF's
- /// <see cref="VisualTreeHelper.GetParent" /> method, which also
- /// supports content elements. Keep in mind that for content element,
- /// this method falls back to the logical tree of the element!
- /// </summary>
- /// <param name="child">The item to be processed.</param>
- /// <returns>The submitted item's parent, if available. Otherwise
- /// null.</returns>
- public static DependencyObject GetParentObject(this DependencyObject child)
- {
- if (child == null) return null;
-
- //handle content elements separately
- ContentElement contentElement = child as ContentElement;
- if (contentElement != null)
- {
- DependencyObject parent = ContentOperations.GetParent(contentElement);
- if (parent != null) return parent;
-
- FrameworkContentElement fce = contentElement as FrameworkContentElement;
- return fce != null ? fce.Parent : null;
- }
-
- //also try searching for parent in framework elements (such as DockPanel, etc)
- FrameworkElement frameworkElement = child as FrameworkElement;
- if (frameworkElement != null)
- {
- DependencyObject parent = frameworkElement.Parent;
- if (parent != null) return parent;
- }
-
- //if it's not a ContentElement/FrameworkElement, rely on VisualTreeHelper
- return VisualTreeHelper.GetParent(child);
- }
-
- #endregion
-
- #region find children
-
- /// <summary>
- /// Analyzes both visual and logical tree in order to find all elements of a given
- /// type that are descendants of the <paramref name="source" /> item.
- /// </summary>
- /// <typeparam name="T">The type of the queried items.</typeparam>
- /// <param name="source">The root element that marks the source of the search. If the
- /// source is already of the requested type, it will not be included in the result.</param>
- /// <returns>All descendants of <paramref name="source" /> that match the requested type.</returns>
- public static IEnumerable<T> FindChildren<T>(this DependencyObject source) where T : DependencyObject
- {
- if (source != null)
- {
- var childs = GetChildObjects(source);
- foreach (DependencyObject child in childs)
- {
- //analyze if children match the requested type
- if (child is T)
- {
- yield return (T)child;
- }
-
- //recurse tree
- foreach (T descendant in FindChildren<T>(child))
- {
- yield return descendant;
- }
- }
- }
- }
-
-
- /// <summary>
- /// This method is an alternative to WPF's
- /// <see cref="VisualTreeHelper.GetChild" /> method, which also
- /// supports content elements. Keep in mind that for content elements,
- /// this method falls back to the logical tree of the element.
- /// </summary>
- /// <param name="parent">The item to be processed.</param>
- /// <returns>The submitted item's child elements, if available.</returns>
- public static IEnumerable<DependencyObject> GetChildObjects(this DependencyObject parent)
- {
- if (parent == null) yield break;
-
- if (parent is ContentElement || parent is FrameworkElement)
- {
- //use the logical tree for content / framework elements
- foreach (object obj in LogicalTreeHelper.GetChildren(parent))
- {
- var depObj = obj as DependencyObject;
- if (depObj != null) yield return (DependencyObject)obj;
- }
- }
- else
- {
- //use the visual tree per default
- int count = VisualTreeHelper.GetChildrenCount(parent);
- for (int i = 0; i < count; i++)
- {
- yield return VisualTreeHelper.GetChild(parent, i);
- }
- }
- }
-
- #endregion
-
- #region find from point
-
- /// <summary>
- /// Tries to locate a given item within the visual tree,
- /// starting with the dependency object at a given position.
- /// </summary>
- /// <typeparam name="T">The type of the element to be found
- /// on the visual tree of the element at the given location.</typeparam>
- /// <param name="reference">The main element which is used to perform
- /// hit testing.</param>
- /// <param name="point">The position to be evaluated on the origin.</param>
- /// <returns>``0.</returns>
- public static T TryFindFromPoint<T>(UIElement reference, Point point)
- where T : DependencyObject
- {
- DependencyObject element = reference.InputHitTest(point) as DependencyObject;
-
- if (element == null) return null;
-
- if (element is T) return (T)element;
-
- return TryFindParent<T>(element);
- }
-
- #endregion
- }
-}
diff --git a/MediaBrowser.UI.Controls/VirtualizingWrapPanel.cs b/MediaBrowser.UI.Controls/VirtualizingWrapPanel.cs
deleted file mode 100644
index e9753ccea..000000000
--- a/MediaBrowser.UI.Controls/VirtualizingWrapPanel.cs
+++ /dev/null
@@ -1,735 +0,0 @@
-using System;
-using System.Collections.Specialized;
-using System.ComponentModel;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Controls.Primitives;
-using System.Windows.Media;
-
-namespace MediaBrowser.UI.Controls
-{
- /// <summary>
- /// http://www.codeproject.com/Articles/75847/Virtualizing-WrapPanel
- /// Positions child elements in sequential position from left to right, breaking content
- /// to the next line at the edge of the containing box. Subsequent ordering happens
- /// sequentially from top to bottom or from right to left, depending on the value of
- /// the Orientation property.
- /// </summary>
- [DefaultProperty("Orientation")]
- public class VirtualizingWrapPanel : VirtualizingPanel, IScrollInfo
- {
- /// <summary>
- /// Identifies the ItemHeight dependency property.
- /// </summary>
- public static readonly DependencyProperty ItemHeightProperty = DependencyProperty.Register("ItemHeight", typeof(double), typeof(VirtualizingWrapPanel), new PropertyMetadata(100.0, new PropertyChangedCallback(VirtualizingWrapPanel.OnAppearancePropertyChanged)));
- /// <summary>
- /// Identifies the Orientation dependency property.
- /// </summary>
- public static readonly DependencyProperty OrientationProperty = DependencyProperty.Register("Orientation", typeof(Orientation), typeof(VirtualizingWrapPanel), new PropertyMetadata(Orientation.Horizontal, new PropertyChangedCallback(VirtualizingWrapPanel.OnAppearancePropertyChanged)));
- /// <summary>
- /// Identifies the ItemWidth dependency property.
- /// </summary>
- public static readonly DependencyProperty ItemWidthProperty = DependencyProperty.Register("ItemWidth", typeof(double), typeof(VirtualizingWrapPanel), new PropertyMetadata(100.0, new PropertyChangedCallback(VirtualizingWrapPanel.OnAppearancePropertyChanged)));
- /// <summary>
- /// Identifies the ScrollStep dependency property.
- /// </summary>
- public static readonly DependencyProperty ScrollStepProperty = DependencyProperty.Register("ScrollStep", typeof(double), typeof(VirtualizingWrapPanel), new PropertyMetadata(10.0, new PropertyChangedCallback(VirtualizingWrapPanel.OnAppearancePropertyChanged)));
- private bool canHorizontallyScroll;
- private bool canVerticallyScroll;
- private Size contentExtent = new Size(0.0, 0.0);
- private Point contentOffset = default(Point);
- private ScrollViewer scrollOwner;
- private Size viewport = new Size(0.0, 0.0);
- private int previousItemCount;
- /// <summary>
- /// Gets or sets a value that specifies the height of all items that are
- /// contained within a VirtualizingWrapPanel. This is a dependency property.
- /// </summary>
- public double ItemHeight
- {
- get
- {
- return (double)base.GetValue(VirtualizingWrapPanel.ItemHeightProperty);
- }
- set
- {
- base.SetValue(VirtualizingWrapPanel.ItemHeightProperty, value);
- }
- }
- /// <summary>
- /// Gets or sets a value that specifies the width of all items that are
- /// contained within a VirtualizingWrapPanel. This is a dependency property.
- /// </summary>
- public double ItemWidth
- {
- get
- {
- return (double)base.GetValue(VirtualizingWrapPanel.ItemWidthProperty);
- }
- set
- {
- base.SetValue(VirtualizingWrapPanel.ItemWidthProperty, value);
- }
- }
- /// <summary>
- /// Gets or sets a value that specifies the dimension in which child
- /// content is arranged. This is a dependency property.
- /// </summary>
- public Orientation Orientation
- {
- get
- {
- return (Orientation)base.GetValue(VirtualizingWrapPanel.OrientationProperty);
- }
- set
- {
- base.SetValue(VirtualizingWrapPanel.OrientationProperty, value);
- }
- }
- /// <summary>
- /// Gets or sets a value that indicates whether scrolling on the horizontal axis is possible.
- /// </summary>
- public bool CanHorizontallyScroll
- {
- get
- {
- return this.canHorizontallyScroll;
- }
- set
- {
- if (this.canHorizontallyScroll != value)
- {
- this.canHorizontallyScroll = value;
- base.InvalidateMeasure();
- }
- }
- }
- /// <summary>
- /// Gets or sets a value that indicates whether scrolling on the vertical axis is possible.
- /// </summary>
- public bool CanVerticallyScroll
- {
- get
- {
- return this.canVerticallyScroll;
- }
- set
- {
- if (this.canVerticallyScroll != value)
- {
- this.canVerticallyScroll = value;
- base.InvalidateMeasure();
- }
- }
- }
- /// <summary>
- /// Gets or sets a ScrollViewer element that controls scrolling behavior.
- /// </summary>
- public ScrollViewer ScrollOwner
- {
- get
- {
- return this.scrollOwner;
- }
- set
- {
- this.scrollOwner = value;
- }
- }
- /// <summary>
- /// Gets the vertical offset of the scrolled content.
- /// </summary>
- public double VerticalOffset
- {
- get
- {
- return this.contentOffset.Y;
- }
- }
- /// <summary>
- /// Gets the vertical size of the viewport for this content.
- /// </summary>
- public double ViewportHeight
- {
- get
- {
- return this.viewport.Height;
- }
- }
- /// <summary>
- /// Gets the horizontal size of the viewport for this content.
- /// </summary>
- public double ViewportWidth
- {
- get
- {
- return this.viewport.Width;
- }
- }
- /// <summary>
- /// Gets or sets a value for mouse wheel scroll step.
- /// </summary>
- public double ScrollStep
- {
- get
- {
- return (double)base.GetValue(VirtualizingWrapPanel.ScrollStepProperty);
- }
- set
- {
- base.SetValue(VirtualizingWrapPanel.ScrollStepProperty, value);
- }
- }
- /// <summary>
- /// Gets the vertical size of the extent.
- /// </summary>
- public double ExtentHeight
- {
- get
- {
- return this.contentExtent.Height;
- }
- }
- /// <summary>
- /// Gets the horizontal size of the extent.
- /// </summary>
- public double ExtentWidth
- {
- get
- {
- return this.contentExtent.Width;
- }
- }
- /// <summary>
- /// Gets the horizontal offset of the scrolled content.
- /// </summary>
- public double HorizontalOffset
- {
- get
- {
- return this.contentOffset.X;
- }
- }
- /// <summary>
- /// Scrolls down within content by one logical unit.
- /// </summary>
- public void LineDown()
- {
- this.SetVerticalOffset(this.VerticalOffset + this.ScrollStep);
- }
- /// <summary>
- /// Scrolls left within content by one logical unit.
- /// </summary>
- public void LineLeft()
- {
- this.SetHorizontalOffset(this.HorizontalOffset - this.ScrollStep);
- }
- /// <summary>
- /// Scrolls right within content by one logical unit.
- /// </summary>
- public void LineRight()
- {
- this.SetHorizontalOffset(this.HorizontalOffset + this.ScrollStep);
- }
- /// <summary>
- /// Scrolls up within content by one logical unit.
- /// </summary>
- public void LineUp()
- {
- this.SetVerticalOffset(this.VerticalOffset - this.ScrollStep);
- }
- /// <summary>
- /// Forces content to scroll until the coordinate space of a Visual object is visible.
- /// </summary>
- public Rect MakeVisible(Visual visual, Rect rectangle)
- {
- this.MakeVisible(visual as UIElement);
- return rectangle;
- }
- /// <summary>
- /// Scrolls down within content after a user clicks the wheel button on a mouse.
- /// </summary>
- public void MouseWheelDown()
- {
- this.SetVerticalOffset(this.VerticalOffset + this.ScrollStep);
- }
- /// <summary>
- /// Scrolls left within content after a user clicks the wheel button on a mouse.
- /// </summary>
- public void MouseWheelLeft()
- {
- this.SetHorizontalOffset(this.HorizontalOffset - this.ScrollStep);
- }
- /// <summary>
- /// Scrolls right within content after a user clicks the wheel button on a mouse.
- /// </summary>
- public void MouseWheelRight()
- {
- this.SetHorizontalOffset(this.HorizontalOffset + this.ScrollStep);
- }
- /// <summary>
- /// Scrolls up within content after a user clicks the wheel button on a mouse.
- /// </summary>
- public void MouseWheelUp()
- {
- this.SetVerticalOffset(this.VerticalOffset - this.ScrollStep);
- }
- /// <summary>
- /// Scrolls down within content by one page.
- /// </summary>
- public void PageDown()
- {
- this.SetVerticalOffset(this.VerticalOffset + this.ViewportHeight);
- }
- /// <summary>
- /// Scrolls left within content by one page.
- /// </summary>
- public void PageLeft()
- {
- this.SetHorizontalOffset(this.HorizontalOffset - this.ViewportHeight);
- }
- /// <summary>
- /// Scrolls right within content by one page.
- /// </summary>
- public void PageRight()
- {
- this.SetHorizontalOffset(this.HorizontalOffset + this.ViewportHeight);
- }
- /// <summary>
- /// Scrolls up within content by one page.
- /// </summary>
- public void PageUp()
- {
- this.SetVerticalOffset(this.VerticalOffset - this.viewport.Height);
- }
- /// <summary>
- /// Sets the amount of vertical offset.
- /// </summary>
- public void SetVerticalOffset(double offset)
- {
- if (offset < 0.0 || this.ViewportHeight >= this.ExtentHeight)
- {
- offset = 0.0;
- }
- else
- {
- if (offset + this.ViewportHeight >= this.ExtentHeight)
- {
- offset = this.ExtentHeight - this.ViewportHeight;
- }
- }
- this.contentOffset.Y = offset;
- if (this.ScrollOwner != null)
- {
- this.ScrollOwner.InvalidateScrollInfo();
- }
- base.InvalidateMeasure();
- }
- /// <summary>
- /// Sets the amount of horizontal offset.
- /// </summary>
- public void SetHorizontalOffset(double offset)
- {
- if (offset < 0.0 || this.ViewportWidth >= this.ExtentWidth)
- {
- offset = 0.0;
- }
- else
- {
- if (offset + this.ViewportWidth >= this.ExtentWidth)
- {
- offset = this.ExtentWidth - this.ViewportWidth;
- }
- }
- this.contentOffset.X = offset;
- if (this.ScrollOwner != null)
- {
- this.ScrollOwner.InvalidateScrollInfo();
- }
- base.InvalidateMeasure();
- }
- /// <summary>
- /// Note: Works only for vertical.
- /// </summary>
- internal void PageLast()
- {
- this.contentOffset.Y = this.ExtentHeight;
- if (this.ScrollOwner != null)
- {
- this.ScrollOwner.InvalidateScrollInfo();
- }
- base.InvalidateMeasure();
- }
- /// <summary>
- /// Note: Works only for vertical.
- /// </summary>
- internal void PageFirst()
- {
- this.contentOffset.Y = 0.0;
- if (this.ScrollOwner != null)
- {
- this.ScrollOwner.InvalidateScrollInfo();
- }
- base.InvalidateMeasure();
- }
- /// <summary>
- /// When items are removed, remove the corresponding UI if necessary.
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="args"></param>
- protected override void OnItemsChanged(object sender, ItemsChangedEventArgs args)
- {
- switch (args.Action)
- {
- case NotifyCollectionChangedAction.Remove:
- case NotifyCollectionChangedAction.Replace:
- case NotifyCollectionChangedAction.Move:
- base.RemoveInternalChildRange(args.Position.Index, args.ItemUICount);
- return;
- case NotifyCollectionChangedAction.Reset:
- {
- ItemsControl itemsControl = ItemsControl.GetItemsOwner(this);
- if (itemsControl != null)
- {
- if (this.previousItemCount != itemsControl.Items.Count)
- {
- if (this.Orientation == Orientation.Horizontal)
- {
- this.SetVerticalOffset(0.0);
- }
- else
- {
- this.SetHorizontalOffset(0.0);
- }
- }
- this.previousItemCount = itemsControl.Items.Count;
- }
- return;
- }
- default:
- return;
- }
- }
- /// <summary>
- /// Measure the children.
- /// </summary>
- /// <param name="availableSize">The available size.</param>
- /// <returns>The desired size.</returns>
- protected override Size MeasureOverride(Size availableSize)
- {
- this.InvalidateScrollInfo(availableSize);
- int firstVisibleIndex;
- int lastVisibleIndex;
- if (this.Orientation == Orientation.Horizontal)
- {
- this.GetVerticalVisibleRange(out firstVisibleIndex, out lastVisibleIndex);
- }
- else
- {
- this.GetHorizontalVisibleRange(out firstVisibleIndex, out lastVisibleIndex);
- }
- UIElementCollection children = base.Children;
- IItemContainerGenerator generator = base.ItemContainerGenerator;
- if (generator != null)
- {
- GeneratorPosition startPos = generator.GeneratorPositionFromIndex(firstVisibleIndex);
- int childIndex = (startPos.Offset == 0) ? startPos.Index : (startPos.Index + 1);
- if (childIndex == -1)
- {
- this.RefreshOffset();
- }
- using (generator.StartAt(startPos, GeneratorDirection.Forward, true))
- {
- int itemIndex = firstVisibleIndex;
- while (itemIndex <= lastVisibleIndex)
- {
- bool newlyRealized;
- UIElement child = generator.GenerateNext(out newlyRealized) as UIElement;
- if (newlyRealized)
- {
- if (childIndex >= children.Count)
- {
- base.AddInternalChild(child);
- }
- else
- {
- base.InsertInternalChild(childIndex, child);
- }
- generator.PrepareItemContainer(child);
- }
- if (child != null)
- {
- child.Measure(new Size(this.ItemWidth, this.ItemHeight));
- }
- itemIndex++;
- childIndex++;
- }
- }
- this.CleanUpChildren(firstVisibleIndex, lastVisibleIndex);
- }
- if (IsCloseTo(availableSize.Height, double.PositiveInfinity) || IsCloseTo(availableSize.Width, double.PositiveInfinity))
- {
- return base.MeasureOverride(availableSize);
- }
-
- var itemsControl = ItemsControl.GetItemsOwner(this);
- var numItems = itemsControl.Items.Count;
-
- var width = availableSize.Width;
- var height = availableSize.Height;
-
- if (Orientation == Orientation.Vertical)
- {
- var numRows = Math.Floor(availableSize.Height / ItemHeight);
-
- height = numRows * ItemHeight;
-
- var requiredColumns = Math.Ceiling(numItems / numRows);
-
- width = Math.Min(requiredColumns * ItemWidth, width);
- }
- else
- {
- var numColumns = Math.Floor(availableSize.Width / ItemWidth);
-
- width = numColumns * ItemWidth;
-
- //if (numItems > 0 && numItems < numColumns)
- //{
- // width = Math.Min(numColumns, numItems) * ItemWidth;
- //}
-
- var requiredRows = Math.Ceiling(numItems / numColumns);
-
- height = Math.Min(requiredRows * ItemHeight, height);
- }
-
- return new Size(width, height);
- }
-
- /// <summary>
- /// Arranges the children.
- /// </summary>
- /// <param name="finalSize">The available size.</param>
- /// <returns>The used size.</returns>
- protected override Size ArrangeOverride(Size finalSize)
- {
- bool isHorizontal = this.Orientation == Orientation.Horizontal;
- this.InvalidateScrollInfo(finalSize);
- int i = 0;
- foreach (object item in base.Children)
- {
- this.ArrangeChild(isHorizontal, finalSize, i++, item as UIElement);
- }
- return finalSize;
- }
- private static void OnAppearancePropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
- {
- UIElement panel = d as UIElement;
- if (panel != null)
- {
- panel.InvalidateMeasure();
- }
- }
- private void MakeVisible(UIElement element)
- {
- ItemContainerGenerator generator = base.ItemContainerGenerator.GetItemContainerGeneratorForPanel(this);
- if (element != null && generator != null)
- {
- for (int itemIndex = generator.IndexFromContainer(element); itemIndex == -1; itemIndex = generator.IndexFromContainer(element))
- {
- element = element.ParentOfType<UIElement>();
- }
- ScrollViewer scrollViewer = element.ParentOfType<ScrollViewer>();
- if (scrollViewer != null)
- {
- GeneralTransform elementTransform = element.TransformToVisual(scrollViewer);
- Rect elementRectangle = elementTransform.TransformBounds(new Rect(new Point(0.0, 0.0), element.RenderSize));
-
- if (this.Orientation == Orientation.Horizontal)
- {
- var padding = ItemHeight / 3;
-
- if (elementRectangle.Bottom > this.ViewportHeight)
- {
- this.SetVerticalOffset(this.contentOffset.Y + elementRectangle.Bottom - this.ViewportHeight + padding);
- return;
- }
- if (elementRectangle.Top < 0.0)
- {
- this.SetVerticalOffset(this.contentOffset.Y + elementRectangle.Top - padding);
- return;
- }
- }
- else
- {
- var padding = ItemWidth / 3;
-
- if (elementRectangle.Right > this.ViewportWidth)
- {
- this.SetHorizontalOffset(this.contentOffset.X + elementRectangle.Right - this.ViewportWidth + padding);
- return;
- }
- if (elementRectangle.Left < 0.0)
- {
- this.SetHorizontalOffset(this.contentOffset.X + elementRectangle.Left - padding);
- }
- }
- }
- }
- }
- private void GetVerticalVisibleRange(out int firstVisibleItemIndex, out int lastVisibleItemIndex)
- {
- int childrenPerRow = this.GetVerticalChildrenCountPerRow(this.contentExtent);
- firstVisibleItemIndex = (int)Math.Floor(this.VerticalOffset / this.ItemHeight) * childrenPerRow;
- lastVisibleItemIndex = (int)Math.Ceiling((this.VerticalOffset + this.ViewportHeight) / this.ItemHeight) * childrenPerRow - 1;
- this.AdjustVisibleRange(ref firstVisibleItemIndex, ref lastVisibleItemIndex);
- }
- private void GetHorizontalVisibleRange(out int firstVisibleItemIndex, out int lastVisibleItemIndex)
- {
- int childrenPerRow = this.GetHorizontalChildrenCountPerRow(this.contentExtent);
- firstVisibleItemIndex = (int)Math.Floor(this.HorizontalOffset / this.ItemWidth) * childrenPerRow;
- lastVisibleItemIndex = (int)Math.Ceiling((this.HorizontalOffset + this.ViewportWidth) / this.ItemWidth) * childrenPerRow - 1;
- this.AdjustVisibleRange(ref firstVisibleItemIndex, ref lastVisibleItemIndex);
- }
- private void AdjustVisibleRange(ref int firstVisibleItemIndex, ref int lastVisibleItemIndex)
- {
- firstVisibleItemIndex--;
- lastVisibleItemIndex++;
- ItemsControl itemsControl = ItemsControl.GetItemsOwner(this);
- if (itemsControl != null)
- {
- if (firstVisibleItemIndex < 0)
- {
- firstVisibleItemIndex = 0;
- }
- if (lastVisibleItemIndex >= itemsControl.Items.Count)
- {
- lastVisibleItemIndex = itemsControl.Items.Count - 1;
- }
- }
- }
- private void CleanUpChildren(int minIndex, int maxIndex)
- {
- UIElementCollection children = base.Children;
- IItemContainerGenerator generator = base.ItemContainerGenerator;
- for (int i = children.Count - 1; i >= 0; i--)
- {
- GeneratorPosition pos = new GeneratorPosition(i, 0);
- int itemIndex = generator.IndexFromGeneratorPosition(pos);
- if (itemIndex < minIndex || itemIndex > maxIndex)
- {
- generator.Remove(pos, 1);
- base.RemoveInternalChildRange(i, 1);
- }
- }
- }
- private void ArrangeChild(bool isHorizontal, Size finalSize, int index, UIElement child)
- {
- if (child == null)
- {
- return;
- }
- int count = isHorizontal ? this.GetVerticalChildrenCountPerRow(finalSize) : this.GetHorizontalChildrenCountPerRow(finalSize);
- int itemIndex = base.ItemContainerGenerator.IndexFromGeneratorPosition(new GeneratorPosition(index, 0));
- int row = isHorizontal ? (itemIndex / count) : (itemIndex % count);
- int column = isHorizontal ? (itemIndex % count) : (itemIndex / count);
- Rect rect = new Rect((double)column * this.ItemWidth, (double)row * this.ItemHeight, this.ItemWidth, this.ItemHeight);
- if (isHorizontal)
- {
- rect.Y -= this.VerticalOffset;
- }
- else
- {
- rect.X -= this.HorizontalOffset;
- }
- child.Arrange(rect);
- }
- private void InvalidateScrollInfo(Size availableSize)
- {
- ItemsControl ownerItemsControl = ItemsControl.GetItemsOwner(this);
- if (ownerItemsControl != null)
- {
- Size extent = this.GetExtent(availableSize, ownerItemsControl.Items.Count);
- if (extent != this.contentExtent)
- {
- this.contentExtent = extent;
- this.RefreshOffset();
- }
- if (availableSize != this.viewport)
- {
- this.viewport = availableSize;
- this.InvalidateScrollOwner();
- }
- }
- }
- private void RefreshOffset()
- {
- if (this.Orientation == Orientation.Horizontal)
- {
- this.SetVerticalOffset(this.VerticalOffset);
- return;
- }
- this.SetHorizontalOffset(this.HorizontalOffset);
- }
- private void InvalidateScrollOwner()
- {
- if (this.ScrollOwner != null)
- {
- this.ScrollOwner.InvalidateScrollInfo();
- }
- }
- private Size GetExtent(Size availableSize, int itemCount)
- {
- if (this.Orientation == Orientation.Horizontal)
- {
- int childrenPerRow = this.GetVerticalChildrenCountPerRow(availableSize);
- return new Size((double)childrenPerRow * this.ItemWidth, this.ItemHeight * Math.Ceiling((double)itemCount / (double)childrenPerRow));
- }
- int childrenPerRow2 = this.GetHorizontalChildrenCountPerRow(availableSize);
- return new Size(this.ItemWidth * Math.Ceiling((double)itemCount / (double)childrenPerRow2), (double)childrenPerRow2 * this.ItemHeight);
- }
- private int GetVerticalChildrenCountPerRow(Size availableSize)
- {
- int childrenCountPerRow;
- if (availableSize.Width == double.PositiveInfinity)
- {
- childrenCountPerRow = base.Children.Count;
- }
- else
- {
- childrenCountPerRow = Math.Max(1, (int)Math.Floor(availableSize.Width / this.ItemWidth));
- }
- return childrenCountPerRow;
- }
- private int GetHorizontalChildrenCountPerRow(Size availableSize)
- {
- int childrenCountPerRow;
- if (availableSize.Height == double.PositiveInfinity)
- {
- childrenCountPerRow = base.Children.Count;
- }
- else
- {
- childrenCountPerRow = Math.Max(1, (int)Math.Floor(availableSize.Height / this.ItemHeight));
- }
- return childrenCountPerRow;
- }
-
- private static bool IsCloseTo(double value1, double value2)
- {
- return AreClose(value1, value2);
- }
-
- private static bool AreClose(double value1, double value2)
- {
- if (value1 == value2)
- {
- return true;
- }
- double num = (Math.Abs(value1) + Math.Abs(value2) + 10.0) * 2.2204460492503131E-16;
- double num2 = value1 - value2;
- return -num < num2 && num > num2;
- }
- }
-} \ No newline at end of file
diff --git a/MediaBrowser.UI.Uninstall/App.config b/MediaBrowser.UI.Uninstall/App.config
deleted file mode 100644
index 8e1564635..000000000
--- a/MediaBrowser.UI.Uninstall/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<configuration>
- <startup>
- <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
- </startup>
-</configuration> \ No newline at end of file
diff --git a/MediaBrowser.UI.Uninstall/Globals.cs b/MediaBrowser.UI.Uninstall/Globals.cs
deleted file mode 100644
index aa58e0984..000000000
--- a/MediaBrowser.UI.Uninstall/Globals.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-
-namespace MediaBrowser.UI.Uninstall
-{
- /// <summary>
- /// Class Globals
- /// </summary>
- public static class Globals
- {
- /// <summary>
- /// The product name
- /// </summary>
- public static string ProductName = "Media Browser Theater";
-
- /// <summary>
- /// The suite name
- /// </summary>
- public static string SuiteName = "Media Browser 3";
-
- /// <summary>
- /// The publisher name
- /// </summary>
- public static string PublisherName = "Media Browser Team";
- }
-}
diff --git a/MediaBrowser.UI.Uninstall/MediaBrowser.UI.Uninstall.csproj b/MediaBrowser.UI.Uninstall/MediaBrowser.UI.Uninstall.csproj
deleted file mode 100644
index b54eabc48..000000000
--- a/MediaBrowser.UI.Uninstall/MediaBrowser.UI.Uninstall.csproj
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{E4BE0659-4084-407B-B8A8-67802331CC9E}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>MediaBrowser.UI.Uninstall</RootNamespace>
- <AssemblyName>MediaBrowser.UI.Uninstall</AssemblyName>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup>
- <NoWin32Manifest>true</NoWin32Manifest>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Core" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Globals.cs" />
- <Compile Include="Program.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="App.config" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\MediaBrowser.ClickOnce\MediaBrowser.ClickOnce.csproj">
- <Project>{cc96bf3e-0bda-4809-bc4b-bb6d418f4a84}</Project>
- <Name>MediaBrowser.ClickOnce</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
diff --git a/MediaBrowser.UI.Uninstall/Program.cs b/MediaBrowser.UI.Uninstall/Program.cs
deleted file mode 100644
index 14c3d3abf..000000000
--- a/MediaBrowser.UI.Uninstall/Program.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using MediaBrowser.ClickOnce;
-using System;
-using System.IO;
-
-namespace MediaBrowser.UI.Uninstall
-{
- /// <summary>
- /// Class Program
- /// </summary>
- class Program
- {
- /// <summary>
- /// Defines the entry point of the application.
- /// </summary>
- /// <param name="args">The args.</param>
- static void Main(string[] args)
- {
- new ClickOnceHelper(Globals.PublisherName, Globals.ProductName, Globals.SuiteName).Uninstall();
-
- // Delete all files from publisher folder and folder itself on uninstall
-
- var publisherFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), Globals.PublisherName);
-
- if (Directory.Exists(publisherFolder))
- {
- Directory.Delete(publisherFolder, true);
- }
- }
- }
-}
diff --git a/MediaBrowser.UI.Uninstall/Properties/AssemblyInfo.cs b/MediaBrowser.UI.Uninstall/Properties/AssemblyInfo.cs
deleted file mode 100644
index 258e5d5d6..000000000
--- a/MediaBrowser.UI.Uninstall/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("MediaBrowser.UI.Uninstall")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("MediaBrowser.UI.Uninstall")]
-[assembly: AssemblyCopyright("Copyright © 2013")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("a01e166b-048e-4888-8075-0daf64480c79")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/MediaBrowser.UI.sln b/MediaBrowser.UI.sln
deleted file mode 100644
index 8b79d2c6b..000000000
--- a/MediaBrowser.UI.sln
+++ /dev/null
@@ -1,150 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2012
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.UI", "MediaBrowser.UI\MediaBrowser.UI.csproj", "{B5ECE1FB-618E-420B-9A99-8E972D76920A}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.Common", "MediaBrowser.Common\MediaBrowser.Common.csproj", "{9142EEFA-7570-41E1-BFCC-468BB571AF2F}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.Model", "MediaBrowser.Model\MediaBrowser.Model.csproj", "{7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.ApiInteraction", "MediaBrowser.ApiInteraction\MediaBrowser.ApiInteraction.csproj", "{921C0F64-FDA7-4E9F-9E73-0CB0EEDB2422}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.Plugins.DefaultTheme", "MediaBrowser.Plugins.DefaultTheme\MediaBrowser.Plugins.DefaultTheme.csproj", "{6E892999-711D-4E24-8BAC-DACF5BFA783A}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.UI.Uninstall", "MediaBrowser.UI.Uninstall\MediaBrowser.UI.Uninstall.csproj", "{E4BE0659-4084-407B-B8A8-67802331CC9E}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.IsoMounter", "MediaBrowser.IsoMounter\MediaBrowser.IsoMounter.csproj", "{5356AE30-6A6E-4A64-81E3-F76C50595E64}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.UI.Controls", "MediaBrowser.UI.Controls\MediaBrowser.UI.Controls.csproj", "{1ADFE460-FD95-46FA-8871-CCCB4B62E2E8}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.Logging.NLog", "MediaBrowser.Logging.NLog\MediaBrowser.Logging.NLog.csproj", "{67310740-0EC4-4DC2-9921-33DF38B20167}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.ClickOnce", "MediaBrowser.ClickOnce\MediaBrowser.ClickOnce.csproj", "{CC96BF3E-0BDA-4809-BC4B-BB6D418F4A84}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|Mixed Platforms = Debug|Mixed Platforms
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|Mixed Platforms = Release|Mixed Platforms
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {B5ECE1FB-618E-420B-9A99-8E972D76920A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B5ECE1FB-618E-420B-9A99-8E972D76920A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B5ECE1FB-618E-420B-9A99-8E972D76920A}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {B5ECE1FB-618E-420B-9A99-8E972D76920A}.Debug|Mixed Platforms.Build.0 = Debug|x86
- {B5ECE1FB-618E-420B-9A99-8E972D76920A}.Debug|x86.ActiveCfg = Debug|Any CPU
- {B5ECE1FB-618E-420B-9A99-8E972D76920A}.Debug|x86.Build.0 = Debug|Any CPU
- {B5ECE1FB-618E-420B-9A99-8E972D76920A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B5ECE1FB-618E-420B-9A99-8E972D76920A}.Release|Any CPU.Build.0 = Release|Any CPU
- {B5ECE1FB-618E-420B-9A99-8E972D76920A}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {B5ECE1FB-618E-420B-9A99-8E972D76920A}.Release|Mixed Platforms.Build.0 = Release|x86
- {B5ECE1FB-618E-420B-9A99-8E972D76920A}.Release|x86.ActiveCfg = Release|Any CPU
- {B5ECE1FB-618E-420B-9A99-8E972D76920A}.Release|x86.Build.0 = Release|Any CPU
- {9142EEFA-7570-41E1-BFCC-468BB571AF2F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {9142EEFA-7570-41E1-BFCC-468BB571AF2F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9142EEFA-7570-41E1-BFCC-468BB571AF2F}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {9142EEFA-7570-41E1-BFCC-468BB571AF2F}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {9142EEFA-7570-41E1-BFCC-468BB571AF2F}.Debug|x86.ActiveCfg = Debug|Any CPU
- {9142EEFA-7570-41E1-BFCC-468BB571AF2F}.Debug|x86.Build.0 = Debug|Any CPU
- {9142EEFA-7570-41E1-BFCC-468BB571AF2F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9142EEFA-7570-41E1-BFCC-468BB571AF2F}.Release|Any CPU.Build.0 = Release|Any CPU
- {9142EEFA-7570-41E1-BFCC-468BB571AF2F}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {9142EEFA-7570-41E1-BFCC-468BB571AF2F}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {9142EEFA-7570-41E1-BFCC-468BB571AF2F}.Release|x86.ActiveCfg = Release|Any CPU
- {9142EEFA-7570-41E1-BFCC-468BB571AF2F}.Release|x86.Build.0 = Release|Any CPU
- {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B}.Debug|x86.ActiveCfg = Debug|Any CPU
- {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B}.Debug|x86.Build.0 = Debug|Any CPU
- {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B}.Release|Any CPU.Build.0 = Release|Any CPU
- {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B}.Release|x86.ActiveCfg = Release|Any CPU
- {7EEEB4BB-F3E8-48FC-B4C5-70F0FFF8329B}.Release|x86.Build.0 = Release|Any CPU
- {921C0F64-FDA7-4E9F-9E73-0CB0EEDB2422}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {921C0F64-FDA7-4E9F-9E73-0CB0EEDB2422}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {921C0F64-FDA7-4E9F-9E73-0CB0EEDB2422}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {921C0F64-FDA7-4E9F-9E73-0CB0EEDB2422}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {921C0F64-FDA7-4E9F-9E73-0CB0EEDB2422}.Debug|x86.ActiveCfg = Debug|Any CPU
- {921C0F64-FDA7-4E9F-9E73-0CB0EEDB2422}.Debug|x86.Build.0 = Debug|Any CPU
- {921C0F64-FDA7-4E9F-9E73-0CB0EEDB2422}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {921C0F64-FDA7-4E9F-9E73-0CB0EEDB2422}.Release|Any CPU.Build.0 = Release|Any CPU
- {921C0F64-FDA7-4E9F-9E73-0CB0EEDB2422}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {921C0F64-FDA7-4E9F-9E73-0CB0EEDB2422}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {921C0F64-FDA7-4E9F-9E73-0CB0EEDB2422}.Release|x86.ActiveCfg = Release|Any CPU
- {921C0F64-FDA7-4E9F-9E73-0CB0EEDB2422}.Release|x86.Build.0 = Release|Any CPU
- {6E892999-711D-4E24-8BAC-DACF5BFA783A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6E892999-711D-4E24-8BAC-DACF5BFA783A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6E892999-711D-4E24-8BAC-DACF5BFA783A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {6E892999-711D-4E24-8BAC-DACF5BFA783A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {6E892999-711D-4E24-8BAC-DACF5BFA783A}.Debug|x86.ActiveCfg = Debug|Any CPU
- {6E892999-711D-4E24-8BAC-DACF5BFA783A}.Debug|x86.Build.0 = Debug|Any CPU
- {6E892999-711D-4E24-8BAC-DACF5BFA783A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6E892999-711D-4E24-8BAC-DACF5BFA783A}.Release|Any CPU.Build.0 = Release|Any CPU
- {6E892999-711D-4E24-8BAC-DACF5BFA783A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {6E892999-711D-4E24-8BAC-DACF5BFA783A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {6E892999-711D-4E24-8BAC-DACF5BFA783A}.Release|x86.ActiveCfg = Release|Any CPU
- {6E892999-711D-4E24-8BAC-DACF5BFA783A}.Release|x86.Build.0 = Release|Any CPU
- {E4BE0659-4084-407B-B8A8-67802331CC9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E4BE0659-4084-407B-B8A8-67802331CC9E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E4BE0659-4084-407B-B8A8-67802331CC9E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {E4BE0659-4084-407B-B8A8-67802331CC9E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {E4BE0659-4084-407B-B8A8-67802331CC9E}.Debug|x86.ActiveCfg = Debug|Any CPU
- {E4BE0659-4084-407B-B8A8-67802331CC9E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E4BE0659-4084-407B-B8A8-67802331CC9E}.Release|Any CPU.Build.0 = Release|Any CPU
- {E4BE0659-4084-407B-B8A8-67802331CC9E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {E4BE0659-4084-407B-B8A8-67802331CC9E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {E4BE0659-4084-407B-B8A8-67802331CC9E}.Release|x86.ActiveCfg = Release|Any CPU
- {5356AE30-6A6E-4A64-81E3-F76C50595E64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {5356AE30-6A6E-4A64-81E3-F76C50595E64}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {5356AE30-6A6E-4A64-81E3-F76C50595E64}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {5356AE30-6A6E-4A64-81E3-F76C50595E64}.Debug|Mixed Platforms.Build.0 = Debug|x86
- {5356AE30-6A6E-4A64-81E3-F76C50595E64}.Debug|x86.ActiveCfg = Debug|x86
- {5356AE30-6A6E-4A64-81E3-F76C50595E64}.Debug|x86.Build.0 = Debug|x86
- {5356AE30-6A6E-4A64-81E3-F76C50595E64}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {5356AE30-6A6E-4A64-81E3-F76C50595E64}.Release|Any CPU.Build.0 = Release|Any CPU
- {5356AE30-6A6E-4A64-81E3-F76C50595E64}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {5356AE30-6A6E-4A64-81E3-F76C50595E64}.Release|Mixed Platforms.Build.0 = Release|x86
- {5356AE30-6A6E-4A64-81E3-F76C50595E64}.Release|x86.ActiveCfg = Release|x86
- {5356AE30-6A6E-4A64-81E3-F76C50595E64}.Release|x86.Build.0 = Release|x86
- {1ADFE460-FD95-46FA-8871-CCCB4B62E2E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1ADFE460-FD95-46FA-8871-CCCB4B62E2E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1ADFE460-FD95-46FA-8871-CCCB4B62E2E8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {1ADFE460-FD95-46FA-8871-CCCB4B62E2E8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {1ADFE460-FD95-46FA-8871-CCCB4B62E2E8}.Debug|x86.ActiveCfg = Debug|Any CPU
- {1ADFE460-FD95-46FA-8871-CCCB4B62E2E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1ADFE460-FD95-46FA-8871-CCCB4B62E2E8}.Release|Any CPU.Build.0 = Release|Any CPU
- {1ADFE460-FD95-46FA-8871-CCCB4B62E2E8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {1ADFE460-FD95-46FA-8871-CCCB4B62E2E8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {1ADFE460-FD95-46FA-8871-CCCB4B62E2E8}.Release|x86.ActiveCfg = Release|Any CPU
- {67310740-0EC4-4DC2-9921-33DF38B20167}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {67310740-0EC4-4DC2-9921-33DF38B20167}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {67310740-0EC4-4DC2-9921-33DF38B20167}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {67310740-0EC4-4DC2-9921-33DF38B20167}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {67310740-0EC4-4DC2-9921-33DF38B20167}.Debug|x86.ActiveCfg = Debug|Any CPU
- {67310740-0EC4-4DC2-9921-33DF38B20167}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {67310740-0EC4-4DC2-9921-33DF38B20167}.Release|Any CPU.Build.0 = Release|Any CPU
- {67310740-0EC4-4DC2-9921-33DF38B20167}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {67310740-0EC4-4DC2-9921-33DF38B20167}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {67310740-0EC4-4DC2-9921-33DF38B20167}.Release|x86.ActiveCfg = Release|Any CPU
- {CC96BF3E-0BDA-4809-BC4B-BB6D418F4A84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {CC96BF3E-0BDA-4809-BC4B-BB6D418F4A84}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {CC96BF3E-0BDA-4809-BC4B-BB6D418F4A84}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {CC96BF3E-0BDA-4809-BC4B-BB6D418F4A84}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {CC96BF3E-0BDA-4809-BC4B-BB6D418F4A84}.Debug|x86.ActiveCfg = Debug|Any CPU
- {CC96BF3E-0BDA-4809-BC4B-BB6D418F4A84}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {CC96BF3E-0BDA-4809-BC4B-BB6D418F4A84}.Release|Any CPU.Build.0 = Release|Any CPU
- {CC96BF3E-0BDA-4809-BC4B-BB6D418F4A84}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {CC96BF3E-0BDA-4809-BC4B-BB6D418F4A84}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {CC96BF3E-0BDA-4809-BC4B-BB6D418F4A84}.Release|x86.ActiveCfg = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/MediaBrowser.UI/App.config b/MediaBrowser.UI/App.config
deleted file mode 100644
index 72c2c8077..000000000
--- a/MediaBrowser.UI/App.config
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<configuration>
- <configSections>
- <section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" />
- </configSections>
- <system.diagnostics>
- <assert assertuienabled="false" />
- </system.diagnostics>
- <nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <targets async="true"></targets>
- </nlog>
- <appSettings>
- <add key="DebugProgramDataPath" value="..\..\..\..\ProgramData-UI" />
- <add key="ReleaseProgramDataPath" value="%CommonApplicationData%" />
- <add key="ProgramDataFolderName" value="MediaBrowser-UI" />
- </appSettings>
- <startup>
- <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
- </startup>
- <runtime>
- <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
- <dependentAssembly>
- <assemblyIdentity name="NLog" publicKeyToken="5120e14c03d0593c" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
- </dependentAssembly>
- </assemblyBinding>
- </runtime>
-</configuration> \ No newline at end of file
diff --git a/MediaBrowser.UI/App.xaml b/MediaBrowser.UI/App.xaml
deleted file mode 100644
index d8d7a8037..000000000
--- a/MediaBrowser.UI/App.xaml
+++ /dev/null
@@ -1,15 +0,0 @@
-<Application x:Class="MediaBrowser.UI.App"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
- <Application.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="Resources/AppResources.xaml" />
- <ResourceDictionary Source="Resources/MainWindowResources.xaml" />
- <ResourceDictionary Source="Resources/ModalMessage.xaml" />
- <ResourceDictionary Source="Resources/NotificationMessage.xaml" />
- <ResourceDictionary Source="Resources/NavBarResources.xaml"/>
- </ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
- </Application.Resources>
-</Application> \ No newline at end of file
diff --git a/MediaBrowser.UI/App.xaml.cs b/MediaBrowser.UI/App.xaml.cs
deleted file mode 100644
index bcaa0529e..000000000
--- a/MediaBrowser.UI/App.xaml.cs
+++ /dev/null
@@ -1,1098 +0,0 @@
-using MediaBrowser.ApiInteraction;
-using MediaBrowser.ClickOnce;
-using MediaBrowser.Common.Extensions;
-using MediaBrowser.Common.IO;
-using MediaBrowser.Common.Kernel;
-using MediaBrowser.IsoMounter;
-using MediaBrowser.Logging.Nlog;
-using MediaBrowser.Model.Configuration;
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Logging;
-using MediaBrowser.Model.Net;
-using MediaBrowser.Model.Updates;
-using MediaBrowser.Model.Weather;
-using MediaBrowser.UI.Controller;
-using MediaBrowser.UI.Controls;
-using MediaBrowser.UI.Pages;
-using MediaBrowser.UI.Uninstall;
-using Microsoft.Win32;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.IO;
-using System.Linq;
-using System.Net.Cache;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-
-namespace MediaBrowser.UI
-{
- /// <summary>
- /// Interaction logic for App.xaml
- /// </summary>
- public partial class App : Application, IApplicationHost
- {
- /// <summary>
- /// Gets or sets a value indicating whether [last run at startup value].
- /// </summary>
- /// <value><c>null</c> if [last run at startup value] contains no value, <c>true</c> if [last run at startup value]; otherwise, <c>false</c>.</value>
- private bool? LastRunAtStartupValue { get; set; }
-
- /// <summary>
- /// Gets or sets the clock timer.
- /// </summary>
- /// <value>The clock timer.</value>
- private Timer ClockTimer { get; set; }
- /// <summary>
- /// Gets or sets the server configuration timer.
- /// </summary>
- /// <value>The server configuration timer.</value>
- private Timer ServerConfigurationTimer { get; set; }
-
- /// <summary>
- /// The single instance mutex
- /// </summary>
- private Mutex SingleInstanceMutex;
-
- /// <summary>
- /// Gets or sets the kernel.
- /// </summary>
- /// <value>The kernel.</value>
- protected IKernel Kernel { get; set; }
-
- /// <summary>
- /// Gets or sets the logger.
- /// </summary>
- /// <value>The logger.</value>
- protected ILogger Logger { get; set; }
-
- /// <summary>
- /// Gets or sets the log file path.
- /// </summary>
- /// <value>The log file path.</value>
- public string LogFilePath { get; private set; }
-
- /// <summary>
- /// Occurs when [property changed].
- /// </summary>
- public event PropertyChangedEventHandler PropertyChanged;
-
- /// <summary>
- /// Gets the name of the product.
- /// </summary>
- /// <value>The name of the product.</value>
- protected string ProductName
- {
- get { return Globals.ProductName; }
- }
-
- /// <summary>
- /// Gets the name of the publisher.
- /// </summary>
- /// <value>The name of the publisher.</value>
- protected string PublisherName
- {
- get { return Globals.PublisherName; }
- }
-
- /// <summary>
- /// Gets the name of the suite.
- /// </summary>
- /// <value>The name of the suite.</value>
- protected string SuiteName
- {
- get { return Globals.SuiteName; }
- }
-
- /// <summary>
- /// Gets the name of the uninstaller file.
- /// </summary>
- /// <value>The name of the uninstaller file.</value>
- protected string UninstallerFileName
- {
- get { return "MediaBrowser.UI.Uninstall.exe"; }
- }
-
- /// <summary>
- /// The container
- /// </summary>
- private SimpleInjector.Container _container = new SimpleInjector.Container();
-
- /// <summary>
- /// Gets or sets the iso manager.
- /// </summary>
- /// <value>The iso manager.</value>
- private IIsoManager IsoManager { get; set; }
-
- /// <summary>
- /// Gets the instance.
- /// </summary>
- /// <value>The instance.</value>
- public static App Instance
- {
- get
- {
- return Current as App;
- }
- }
-
- /// <summary>
- /// Gets the API client.
- /// </summary>
- /// <value>The API client.</value>
- public ApiClient ApiClient
- {
- get { return UIKernel.Instance.ApiClient; }
- }
-
- /// <summary>
- /// Gets the application window.
- /// </summary>
- /// <value>The application window.</value>
- public MainWindow ApplicationWindow { get; private set; }
-
- /// <summary>
- /// Gets the hidden window.
- /// </summary>
- /// <value>The hidden window.</value>
- public HiddenWindow HiddenWindow { get; private set; }
-
- /// <summary>
- /// The _current user
- /// </summary>
- private UserDto _currentUser;
- /// <summary>
- /// Gets or sets the current user.
- /// </summary>
- /// <value>The current user.</value>
- public UserDto CurrentUser
- {
- get
- {
- return _currentUser;
- }
- set
- {
- _currentUser = value;
-
- if (UIKernel.Instance.ApiClient != null)
- {
- if (value == null)
- {
- UIKernel.Instance.ApiClient.CurrentUserId = null;
- }
- else
- {
- UIKernel.Instance.ApiClient.CurrentUserId = value.Id;
- }
- }
-
- OnPropertyChanged("CurrentUser");
- }
- }
-
- /// <summary>
- /// The _server configuration
- /// </summary>
- private ServerConfiguration _serverConfiguration;
- /// <summary>
- /// Gets or sets the server configuration.
- /// </summary>
- /// <value>The server configuration.</value>
- public ServerConfiguration ServerConfiguration
- {
- get
- {
- return _serverConfiguration;
- }
- set
- {
- _serverConfiguration = value;
- OnPropertyChanged("ServerConfiguration");
- }
- }
-
- /// <summary>
- /// The _current time
- /// </summary>
- private DateTime _currentTime = DateTime.Now;
- /// <summary>
- /// Gets the current time.
- /// </summary>
- /// <value>The current time.</value>
- public DateTime CurrentTime
- {
- get
- {
- return _currentTime;
- }
- private set
- {
- _currentTime = value;
- OnPropertyChanged("CurrentTime");
- }
- }
-
- /// <summary>
- /// The _current weather
- /// </summary>
- private WeatherInfo _currentWeather;
- /// <summary>
- /// Gets the current weather.
- /// </summary>
- /// <value>The current weather.</value>
- public WeatherInfo CurrentWeather
- {
- get
- {
- return _currentWeather;
- }
- private set
- {
- _currentWeather = value;
- OnPropertyChanged("CurrentWeather");
- }
- }
-
- /// <summary>
- /// The _current theme
- /// </summary>
- private BaseTheme _currentTheme;
- /// <summary>
- /// Gets the current theme.
- /// </summary>
- /// <value>The current theme.</value>
- public BaseTheme CurrentTheme
- {
- get
- {
- return _currentTheme;
- }
- private set
- {
- _currentTheme = value;
- OnPropertyChanged("CurrentTheme");
- }
- }
-
- /// <summary>
- /// Defines the entry point of the application.
- /// </summary>
- [STAThread]
- public static void Main()
- {
- var application = new App(new NLogger("App"));
- application.InitializeComponent();
-
- application.Run();
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="App" /> class.
- /// </summary>
- /// <param name="logger">The logger.</param>
- public App(ILogger logger)
- {
- Logger = logger;
-
- InitializeComponent();
- }
-
- /// <summary>
- /// Instantiates the main window.
- /// </summary>
- /// <returns>Window.</returns>
- protected Window InstantiateMainWindow()
- {
- HiddenWindow = new HiddenWindow { };
-
- return HiddenWindow;
- }
-
- /// <summary>
- /// Shows the application window.
- /// </summary>
- private void ShowApplicationWindow()
- {
- var win = new MainWindow(Logger);
-
- var config = UIKernel.Instance.Configuration;
-
- // Restore window position/size
- if (config.WindowState.HasValue)
- {
- // Set window state
- win.WindowState = config.WindowState.Value;
-
- // Set position if not maximized
- if (config.WindowState.Value != WindowState.Maximized)
- {
- double left = 0;
- double top = 0;
-
- // Set left
- if (config.WindowLeft.HasValue)
- {
- win.WindowStartupLocation = WindowStartupLocation.Manual;
- win.Left = left = Math.Max(config.WindowLeft.Value, 0);
- }
-
- // Set top
- if (config.WindowTop.HasValue)
- {
- win.WindowStartupLocation = WindowStartupLocation.Manual;
- win.Top = top = Math.Max(config.WindowTop.Value, 0);
- }
-
- // Set width
- if (config.WindowWidth.HasValue)
- {
- win.Width = Math.Min(config.WindowWidth.Value, SystemParameters.VirtualScreenWidth - left);
- }
-
- // Set height
- if (config.WindowHeight.HasValue)
- {
- win.Height = Math.Min(config.WindowHeight.Value, SystemParameters.VirtualScreenHeight - top);
- }
- }
- }
-
- win.LocationChanged += ApplicationWindow_LocationChanged;
- win.StateChanged += ApplicationWindow_LocationChanged;
- win.SizeChanged += ApplicationWindow_LocationChanged;
-
- ApplicationWindow = win;
-
- ApplicationWindow.Show();
-
- ApplicationWindow.Owner = HiddenWindow;
-
- SyncHiddenWindowLocation();
- }
-
- /// <summary>
- /// Handles the LocationChanged event of the ApplicationWindow control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
- void ApplicationWindow_LocationChanged(object sender, EventArgs e)
- {
- SyncHiddenWindowLocation();
- }
-
- /// <summary>
- /// Syncs the hidden window location.
- /// </summary>
- public void SyncHiddenWindowLocation()
- {
- HiddenWindow.Width = ApplicationWindow.Width;
- HiddenWindow.Height = ApplicationWindow.Height;
- HiddenWindow.Top = ApplicationWindow.Top;
- HiddenWindow.Left = ApplicationWindow.Left;
- HiddenWindow.WindowState = ApplicationWindow.WindowState;
-
- ApplicationWindow.Activate();
- }
-
- /// <summary>
- /// Loads the kernel.
- /// </summary>
- protected async void LoadKernel()
- {
- // Without this the app will shutdown after the splash screen closes
- ShutdownMode = ShutdownMode.OnExplicitShutdown;
-
- RegisterResources();
-
- Kernel = new UIKernel(this, Logger);
-
- try
- {
- var now = DateTime.UtcNow;
-
- await Kernel.Init();
-
- Logger.Info("Kernel.Init completed in {0} seconds.", (DateTime.UtcNow - now).TotalSeconds);
-
- ShutdownMode = System.Windows.ShutdownMode.OnLastWindowClose;
-
- OnKernelLoaded();
-
- InstantiateMainWindow().Show();
-
- ShowApplicationWindow();
-
- await ApplicationWindow.LoadInitialUI().ConfigureAwait(false);
- }
- catch (Exception ex)
- {
- Logger.ErrorException("Error launching application", ex);
-
- MessageBox.Show("There was an error launching Media Browser: " + ex.Message);
-
- // Shutdown the app with an error code
- Shutdown(1);
- }
- }
-
- /// <summary>
- /// Called when [kernel loaded].
- /// </summary>
- /// <returns>Task.</returns>
- protected void OnKernelLoaded()
- {
- Kernel.ConfigurationUpdated += Kernel_ConfigurationUpdated;
-
- ConfigureClickOnceStartup();
-
- PropertyChanged += AppPropertyChanged;
-
- // Update every 10 seconds
- ClockTimer = new Timer(ClockTimerCallback, null, 0, 10000);
-
- // Update every 30 minutes
- ServerConfigurationTimer = new Timer(ServerConfigurationTimerCallback, null, 0, 1800000);
-
- CurrentTheme = UIKernel.Instance.Themes.First();
-
- foreach (var resource in CurrentTheme.GetGlobalResources())
- {
- Resources.MergedDictionaries.Add(resource);
- }
- }
-
- /// <summary>
- /// Raises the <see cref="E:System.Windows.Application.Startup" /> event.
- /// </summary>
- /// <param name="e">A <see cref="T:System.Windows.StartupEventArgs" /> that contains the event data.</param>
- protected override void OnStartup(StartupEventArgs e)
- {
- bool createdNew;
- SingleInstanceMutex = new Mutex(true, @"Local\" + GetType().Assembly.GetName().Name, out createdNew);
- if (!createdNew)
- {
- SingleInstanceMutex = null;
- Shutdown();
- return;
- }
-
- AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
- LoadKernel();
-
- SystemEvents.SessionEnding += SystemEvents_SessionEnding;
- }
-
- /// <summary>
- /// Handles the UnhandledException event of the CurrentDomain control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="UnhandledExceptionEventArgs" /> instance containing the event data.</param>
- void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
- {
- var exception = (Exception)e.ExceptionObject;
-
- Logger.ErrorException("UnhandledException", exception);
-
- MessageBox.Show("Unhandled exception: " + exception.Message);
- }
-
- /// <summary>
- /// Called when [property changed].
- /// </summary>
- /// <param name="info">The info.</param>
- public void OnPropertyChanged(String info)
- {
- if (PropertyChanged != null)
- {
- try
- {
- PropertyChanged(this, new PropertyChangedEventArgs(info));
- }
- catch (Exception ex)
- {
- Logger.ErrorException("Error in event handler", ex);
- }
- }
- }
-
- /// <summary>
- /// Handles the SessionEnding event of the SystemEvents control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="SessionEndingEventArgs" /> instance containing the event data.</param>
- void SystemEvents_SessionEnding(object sender, SessionEndingEventArgs e)
- {
- // Try to shut down gracefully
- Shutdown();
- }
-
- /// <summary>
- /// Raises the <see cref="E:System.Windows.Application.Exit" /> event.
- /// </summary>
- /// <param name="e">An <see cref="T:System.Windows.ExitEventArgs" /> that contains the event data.</param>
- protected override void OnExit(ExitEventArgs e)
- {
- var win = ApplicationWindow;
-
- if (win != null)
- {
- // Save window position
- var config = UIKernel.Instance.Configuration;
- config.WindowState = win.WindowState;
- config.WindowTop = win.Top;
- config.WindowLeft = win.Left;
- config.WindowWidth = win.Width;
- config.WindowHeight = win.Height;
- UIKernel.Instance.SaveConfiguration();
- }
-
- ReleaseMutex();
-
- base.OnExit(e);
-
- Kernel.Dispose();
- }
-
- /// <summary>
- /// Releases the mutex.
- /// </summary>
- private void ReleaseMutex()
- {
- if (SingleInstanceMutex == null)
- {
- return;
- }
-
- SingleInstanceMutex.ReleaseMutex();
- SingleInstanceMutex.Close();
- SingleInstanceMutex.Dispose();
- SingleInstanceMutex = null;
- }
-
- /// <summary>
- /// Apps the property changed.
- /// </summary>
- /// <param name="sender">The sender.</param>
- /// <param name="e">The <see cref="PropertyChangedEventArgs" /> instance containing the event data.</param>
- async void AppPropertyChanged(object sender, PropertyChangedEventArgs e)
- {
- if (e.PropertyName.Equals("ServerConfiguration"))
- {
- if (string.IsNullOrEmpty(ServerConfiguration.WeatherLocation))
- {
- CurrentWeather = null;
- }
- else
- {
- try
- {
- CurrentWeather = await ApiClient.GetWeatherInfoAsync(ServerConfiguration.WeatherLocation);
- }
- catch (HttpException ex)
- {
- Logger.ErrorException("Error downloading weather information", ex);
- }
- }
- }
- }
-
- /// <summary>
- /// Clocks the timer callback.
- /// </summary>
- /// <param name="stateInfo">The state info.</param>
- private void ClockTimerCallback(object stateInfo)
- {
- CurrentTime = DateTime.Now;
- }
-
- /// <summary>
- /// Servers the configuration timer callback.
- /// </summary>
- /// <param name="stateInfo">The state info.</param>
- private async void ServerConfigurationTimerCallback(object stateInfo)
- {
- try
- {
- var b = Kernel;
- //ServerConfiguration = await ApiClient.GetServerConfigurationAsync();
- }
- catch (HttpException ex)
- {
- Logger.ErrorException("Error refreshing server configuration", ex);
- }
- }
-
- /// <summary>
- /// Logouts the user.
- /// </summary>
- /// <returns>Task.</returns>
- public async Task LogoutUser()
- {
- CurrentUser = null;
-
- await Dispatcher.InvokeAsync(() => Navigate(CurrentTheme.GetLoginPage()));
- }
-
- /// <summary>
- /// Navigates the specified page.
- /// </summary>
- /// <param name="page">The page.</param>
- public void Navigate(Page page)
- {
- _remoteImageCache = new FileSystemRepository(UIKernel.Instance.ApplicationPaths.RemoteImageCachePath);
-
- ApplicationWindow.Navigate(page);
- }
-
- /// <summary>
- /// Navigates to settings page.
- /// </summary>
- public void NavigateToSettingsPage()
- {
- Navigate(new SettingsPage());
- }
-
- /// <summary>
- /// Navigates to internal player page.
- /// </summary>
- public void NavigateToInternalPlayerPage()
- {
- Navigate(CurrentTheme.GetInternalPlayerPage());
- }
-
- /// <summary>
- /// Navigates to image viewer.
- /// </summary>
- /// <param name="imageUrl">The image URL.</param>
- /// <param name="caption">The caption.</param>
- public void OpenImageViewer(Uri imageUrl, string caption)
- {
- var tuple = new Tuple<Uri, string>(imageUrl, caption);
-
- OpenImageViewer(new[] { tuple });
- }
-
- /// <summary>
- /// Navigates to image viewer.
- /// </summary>
- /// <param name="images">The images.</param>
- public void OpenImageViewer(IEnumerable<Tuple<Uri, string>> images)
- {
- new ImageViewerWindow(images).ShowModal(ApplicationWindow);
- }
-
- /// <summary>
- /// Navigates to item.
- /// </summary>
- /// <param name="item">The item.</param>
- public void NavigateToItem(BaseItemDto item)
- {
- if (item.IsRoot.HasValue && item.IsRoot.Value)
- {
- NavigateToHomePage();
- }
- else if (item.IsFolder)
- {
- Navigate(CurrentTheme.GetListPage(item));
- }
- else
- {
- Navigate(CurrentTheme.GetDetailPage(item));
- }
- }
-
- /// <summary>
- /// Displays the weather.
- /// </summary>
- public void DisplayWeather()
- {
- CurrentTheme.DisplayWeather();
- }
-
- /// <summary>
- /// Navigates to home page.
- /// </summary>
- public void NavigateToHomePage()
- {
- Navigate(CurrentTheme.GetHomePage());
- }
-
- /// <summary>
- /// Shows a notification message that will disappear on it's own
- /// </summary>
- /// <param name="text">The text.</param>
- /// <param name="caption">The caption.</param>
- /// <param name="icon">The icon.</param>
- public void ShowNotificationMessage(string text, string caption = null, MessageBoxIcon icon = MessageBoxIcon.None)
- {
- ApplicationWindow.ShowModalMessage(text, caption: caption, icon: icon);
- }
-
- /// <summary>
- /// Shows a notification message that will disappear on it's own
- /// </summary>
- /// <param name="text">The text.</param>
- /// <param name="caption">The caption.</param>
- /// <param name="icon">The icon.</param>
- public void ShowNotificationMessage(UIElement text, string caption = null, MessageBoxIcon icon = MessageBoxIcon.None)
- {
- ApplicationWindow.ShowModalMessage(text, caption: caption, icon: icon);
- }
-
- /// <summary>
- /// Shows a modal message box and asynchronously returns a MessageBoxResult
- /// </summary>
- /// <param name="text">The text.</param>
- /// <param name="caption">The caption.</param>
- /// <param name="button">The button.</param>
- /// <param name="icon">The icon.</param>
- /// <returns>MessageBoxResult.</returns>
- public MessageBoxResult ShowModalMessage(string text, string caption = null, MessageBoxButton button = MessageBoxButton.OK, MessageBoxIcon icon = MessageBoxIcon.None)
- {
- return ApplicationWindow.ShowModalMessage(text, caption: caption, button: button, icon: icon);
- }
-
- /// <summary>
- /// Shows a modal message box and asynchronously returns a MessageBoxResult
- /// </summary>
- /// <param name="text">The text.</param>
- /// <param name="caption">The caption.</param>
- /// <param name="button">The button.</param>
- /// <param name="icon">The icon.</param>
- /// <returns>MessageBoxResult.</returns>
- public MessageBoxResult ShowModalMessage(UIElement text, string caption = null, MessageBoxButton button = MessageBoxButton.OK, MessageBoxIcon icon = MessageBoxIcon.None)
- {
- return ApplicationWindow.ShowModalMessage(text, caption: caption, button: button, icon: icon);
- }
-
- /// <summary>
- /// Shows the error message.
- /// </summary>
- /// <param name="message">The message.</param>
- /// <param name="caption">The caption.</param>
- public void ShowErrorMessage(string message, string caption = null)
- {
- caption = caption ?? "Error";
- ShowModalMessage(message, caption: caption, button: MessageBoxButton.OK, icon: MessageBoxIcon.Error);
- }
-
- /// <summary>
- /// Shows the default error message.
- /// </summary>
- public void ShowDefaultErrorMessage()
- {
- ShowErrorMessage("There was an error processing the request", "Error");
- }
-
- /// <summary>
- /// The _remote image cache
- /// </summary>
- private FileSystemRepository _remoteImageCache;
-
- /// <summary>
- /// Gets the remote image async.
- /// </summary>
- /// <param name="url">The URL.</param>
- /// <returns>Task{Image}.</returns>
- public async Task<Image> GetRemoteImageAsync(string url)
- {
- var bitmap = await GetRemoteBitmapAsync(url);
-
- return new Image { Source = bitmap };
- }
-
- /// <summary>
- /// Gets the remote image async.
- /// </summary>
- /// <param name="url">The URL.</param>
- /// <returns>Task{BitmapImage}.</returns>
- /// <exception cref="System.ArgumentNullException">url</exception>
- public Task<BitmapImage> GetRemoteBitmapAsync(string url)
- {
- if (string.IsNullOrEmpty(url))
- {
- throw new ArgumentNullException("url");
- }
-
- Logger.Info("Image url: " + url);
-
- return Task.Run(async () =>
- {
- var cachePath = _remoteImageCache.GetResourcePath(url.GetMD5().ToString());
-
- await _remoteImageCache.WaitForLockAsync(cachePath).ConfigureAwait(false);
-
- var releaseLock = true;
- try
- {
- using (var stream = new FileStream(cachePath, FileMode.Open, FileAccess.Read, FileShare.Read, StreamDefaults.DefaultFileStreamBufferSize, true))
- {
- return await GetRemoteBitmapAsync(stream).ConfigureAwait(false);
- }
- }
- catch (FileNotFoundException)
- {
- // Doesn't exist. No biggie
- releaseLock = false;
- }
- finally
- {
- if (releaseLock)
- {
- _remoteImageCache.ReleaseLock(cachePath);
- }
- }
-
- try
- {
- using (var httpStream = await UIKernel.Instance.ApiClient.GetImageStreamAsync(url + "&x=1"))
- {
- return await GetRemoteBitmapAsync(httpStream, cachePath);
- }
- }
- finally
- {
- _remoteImageCache.ReleaseLock(cachePath);
- }
- });
- }
-
- /// <summary>
- /// Gets the image async.
- /// </summary>
- /// <param name="sourceStream">The source stream.</param>
- /// <param name="cachePath">The cache path.</param>
- /// <returns>Task{BitmapImage}.</returns>
- private async Task<BitmapImage> GetRemoteBitmapAsync(Stream sourceStream, string cachePath = null)
- {
- byte[] bytes;
-
- using (var ms = new MemoryStream())
- {
- await sourceStream.CopyToAsync(ms).ConfigureAwait(false);
-
- bytes = ms.ToArray();
- }
-
- if (!string.IsNullOrEmpty(cachePath))
- {
- using (var fileStream = new FileStream(cachePath, FileMode.Create, FileAccess.Write, FileShare.Read, StreamDefaults.DefaultFileStreamBufferSize, true))
- {
- await fileStream.WriteAsync(bytes, 0, bytes.Length).ConfigureAwait(false);
- }
- }
-
- using (Stream stream = new MemoryStream(bytes))
- {
- var bitmapImage = new BitmapImage
- {
- CreateOptions = BitmapCreateOptions.DelayCreation
- };
-
- bitmapImage.BeginInit();
- bitmapImage.CacheOption = BitmapCacheOption.OnLoad;
- bitmapImage.StreamSource = stream;
- bitmapImage.EndInit();
- bitmapImage.Freeze();
- return bitmapImage;
- }
- }
-
- /// <summary>
- /// Handles the ConfigurationUpdated event of the Kernel control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
- void Kernel_ConfigurationUpdated(object sender, EventArgs e)
- {
- if (!LastRunAtStartupValue.HasValue || LastRunAtStartupValue.Value != Kernel.Configuration.RunAtStartup)
- {
- ConfigureClickOnceStartup();
- }
- }
-
- /// <summary>
- /// Configures the click once startup.
- /// </summary>
- private void ConfigureClickOnceStartup()
- {
- try
- {
- ClickOnceHelper.ConfigureClickOnceStartupIfInstalled(PublisherName, ProductName, SuiteName, Kernel.Configuration.RunAtStartup, UninstallerFileName);
-
- LastRunAtStartupValue = Kernel.Configuration.RunAtStartup;
- }
- catch (Exception ex)
- {
- Logger.ErrorException("Error configuring ClickOnce", ex);
- }
- }
-
- public void Restart()
- {
- Dispatcher.Invoke(ReleaseMutex);
-
- Kernel.Dispose();
-
- System.Windows.Forms.Application.Restart();
-
- Dispatcher.Invoke(Shutdown);
- }
-
- public void ReloadLogger()
- {
- LogFilePath = Path.Combine(Kernel.ApplicationPaths.LogDirectoryPath, "Server-" + DateTime.Now.Ticks + ".log");
-
- NlogManager.AddFileTarget(LogFilePath, Kernel.Configuration.EnableDebugLevelLogging);
- }
-
- /// <summary>
- /// Gets the bitmap image.
- /// </summary>
- /// <param name="uri">The URI.</param>
- /// <returns>BitmapImage.</returns>
- /// <exception cref="System.ArgumentNullException">uri</exception>
- public BitmapImage GetBitmapImage(string uri)
- {
- if (string.IsNullOrEmpty(uri))
- {
- throw new ArgumentNullException("uri");
- }
-
- return GetBitmapImage(new Uri(uri));
- }
-
- /// <summary>
- /// Gets the bitmap image.
- /// </summary>
- /// <param name="uri">The URI.</param>
- /// <returns>BitmapImage.</returns>
- /// <exception cref="System.ArgumentNullException">uri</exception>
- public BitmapImage GetBitmapImage(Uri uri)
- {
- if (uri == null)
- {
- throw new ArgumentNullException("uri");
- }
-
- var bitmap = new BitmapImage
- {
- CreateOptions = BitmapCreateOptions.DelayCreation,
- CacheOption = BitmapCacheOption.OnDemand,
- UriCachePolicy = new RequestCachePolicy(RequestCacheLevel.CacheIfAvailable)
- };
-
- bitmap.BeginInit();
- bitmap.UriSource = uri;
- bitmap.EndInit();
-
- RenderOptions.SetBitmapScalingMode(bitmap, BitmapScalingMode.Fant);
- return bitmap;
- }
-
- /// <summary>
- /// Gets or sets a value indicating whether this instance can self update.
- /// </summary>
- /// <value><c>true</c> if this instance can self update; otherwise, <c>false</c>.</value>
- public bool CanSelfUpdate
- {
- get { return ClickOnceHelper.IsNetworkDeployed; }
- }
-
- /// <summary>
- /// Checks for update.
- /// </summary>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <param name="progress">The progress.</param>
- /// <returns>Task{CheckForUpdateResult}.</returns>
- public Task<CheckForUpdateResult> CheckForApplicationUpdate(CancellationToken cancellationToken, IProgress<double> progress)
- {
- return new ApplicationUpdateCheck().CheckForApplicationUpdate(cancellationToken, progress);
- }
-
- /// <summary>
- /// Registers resources that classes will depend on
- /// </summary>
- private void RegisterResources()
- {
- Register<IApplicationHost>(this);
- Register(Logger);
-
- IsoManager = new PismoIsoManager(Logger);
-
- Register<IIsoManager>(IsoManager);
- }
-
- /// <summary>
- /// Updates the application.
- /// </summary>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <param name="progress">The progress.</param>
- /// <returns>Task.</returns>
- public Task UpdateApplication(CancellationToken cancellationToken, IProgress<double> progress)
- {
- return new ApplicationUpdater().UpdateApplication(cancellationToken, progress);
- }
-
- /// <summary>
- /// Creates an instance of type and resolves all constructor dependancies
- /// </summary>
- /// <param name="type">The type.</param>
- /// <returns>System.Object.</returns>
- public object CreateInstance(Type type)
- {
- try
- {
- return _container.GetInstance(type);
- }
- catch
- {
- Logger.Error("Error creating {0}", type.Name);
-
- throw;
- }
- }
-
- /// <summary>
- /// Registers the specified obj.
- /// </summary>
- /// <typeparam name="T"></typeparam>
- /// <param name="obj">The obj.</param>
- public void Register<T>(T obj)
- where T : class
- {
- _container.RegisterSingle(obj);
- }
-
- /// <summary>
- /// Resolves this instance.
- /// </summary>
- /// <typeparam name="T"></typeparam>
- /// <returns>``0.</returns>
- public T Resolve<T>()
- {
- return (T)_container.GetRegistration(typeof(T), true).GetInstance();
- }
-
- /// <summary>
- /// Resolves this instance.
- /// </summary>
- /// <typeparam name="T"></typeparam>
- /// <returns>``0.</returns>
- public T TryResolve<T>()
- {
- var result = _container.GetRegistration(typeof(T), false);
-
- if (result == null)
- {
- return default(T);
- }
- return (T)result.GetInstance();
- }
- }
-}
diff --git a/MediaBrowser.UI/Configuration/PlayerConfiguration.cs b/MediaBrowser.UI/Configuration/PlayerConfiguration.cs
deleted file mode 100644
index c00f49b5e..000000000
--- a/MediaBrowser.UI/Configuration/PlayerConfiguration.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-using MediaBrowser.Model.Entities;
-
-namespace MediaBrowser.UI.Configuration
-{
- /// <summary>
- /// Class PlayerConfiguration
- /// </summary>
- public class PlayerConfiguration
- {
- /// <summary>
- /// Gets or sets the name of the player.
- /// </summary>
- /// <value>The name of the player.</value>
- public string PlayerName { get; set; }
-
- /// <summary>
- /// Gets or sets the item types.
- /// </summary>
- /// <value>The item types.</value>
- public string[] ItemTypes { get; set; }
-
- /// <summary>
- /// Gets or sets the file extensions.
- /// </summary>
- /// <value>The file extensions.</value>
- public string[] FileExtensions { get; set; }
-
- /// <summary>
- /// Gets or sets the video types.
- /// </summary>
- /// <value>The video types.</value>
- public VideoType[] VideoTypes { get; set; }
-
- /// <summary>
- /// Gets or sets the video formats.
- /// </summary>
- /// <value>The video formats.</value>
- public VideoFormat[] VideoFormats { get; set; }
-
- /// <summary>
- /// Gets or sets the command.
- /// </summary>
- /// <value>The command.</value>
- public string Command { get; set; }
-
- /// <summary>
- /// Gets or sets the args.
- /// </summary>
- /// <value>The args.</value>
- public string Args { get; set; }
- }
-}
diff --git a/MediaBrowser.UI/Configuration/UIApplicationConfiguration.cs b/MediaBrowser.UI/Configuration/UIApplicationConfiguration.cs
deleted file mode 100644
index 703833924..000000000
--- a/MediaBrowser.UI/Configuration/UIApplicationConfiguration.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-using MediaBrowser.Model.Configuration;
-using System.Windows;
-
-namespace MediaBrowser.UI.Configuration
-{
- /// <summary>
- /// This is the UI's device configuration that applies regardless of which user is logged in.
- /// </summary>
- public class UIApplicationConfiguration : BaseApplicationConfiguration
- {
- /// <summary>
- /// Gets or sets the server host name (myserver or 192.168.x.x)
- /// </summary>
- /// <value>The name of the server host.</value>
- public string ServerHostName { get; set; }
-
- /// <summary>
- /// Gets or sets the port number used by the API
- /// </summary>
- /// <value>The server API port.</value>
- public int ServerApiPort { get; set; }
-
- /// <summary>
- /// Gets or sets the player configurations.
- /// </summary>
- /// <value>The player configurations.</value>
- public PlayerConfiguration[] MediaPlayers { get; set; }
-
- /// <summary>
- /// Gets or sets the state of the window.
- /// </summary>
- /// <value>The state of the window.</value>
- public WindowState? WindowState { get; set; }
-
- /// <summary>
- /// Gets or sets the window top.
- /// </summary>
- /// <value>The window top.</value>
- public double? WindowTop { get; set; }
-
- /// <summary>
- /// Gets or sets the window left.
- /// </summary>
- /// <value>The window left.</value>
- public double? WindowLeft { get; set; }
-
- /// <summary>
- /// Gets or sets the width of the window.
- /// </summary>
- /// <value>The width of the window.</value>
- public double? WindowWidth { get; set; }
-
- /// <summary>
- /// Gets or sets the height of the window.
- /// </summary>
- /// <value>The height of the window.</value>
- public double? WindowHeight { get; set; }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="UIApplicationConfiguration" /> class.
- /// </summary>
- public UIApplicationConfiguration()
- : base()
- {
- ServerHostName = "localhost";
- ServerApiPort = 8096;
-
- // Need a different default than the server
- LegacyWebSocketPortNumber = 8946;
- }
- }
-}
diff --git a/MediaBrowser.UI/Configuration/UIApplicationPaths.cs b/MediaBrowser.UI/Configuration/UIApplicationPaths.cs
deleted file mode 100644
index 313c310d3..000000000
--- a/MediaBrowser.UI/Configuration/UIApplicationPaths.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using MediaBrowser.Common.Kernel;
-using System.IO;
-
-namespace MediaBrowser.UI.Configuration
-{
- /// <summary>
- /// Class UIApplicationPaths
- /// </summary>
- public class UIApplicationPaths : BaseApplicationPaths
- {
- /// <summary>
- /// The _remote image cache path
- /// </summary>
- private string _remoteImageCachePath;
- /// <summary>
- /// Gets the remote image cache path.
- /// </summary>
- /// <value>The remote image cache path.</value>
- public string RemoteImageCachePath
- {
- get
- {
- if (_remoteImageCachePath == null)
- {
- _remoteImageCachePath = Path.Combine(CachePath, "remote-images");
-
- if (!Directory.Exists(_remoteImageCachePath))
- {
- Directory.CreateDirectory(_remoteImageCachePath);
- }
- }
-
- return _remoteImageCachePath;
- }
- }
- }
-}
diff --git a/MediaBrowser.UI/Controller/BaseTheme.cs b/MediaBrowser.UI/Controller/BaseTheme.cs
deleted file mode 100644
index bcf882f68..000000000
--- a/MediaBrowser.UI/Controller/BaseTheme.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-using MediaBrowser.Model.Dto;
-using System;
-using System.Collections.Generic;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace MediaBrowser.UI.Controller
-{
- /// <summary>
- /// Class BaseTheme
- /// </summary>
- public abstract class BaseTheme : IDisposable
- {
- /// <summary>
- /// Gets the global resources.
- /// </summary>
- /// <returns>IEnumerable{ResourceDictionary}.</returns>
- public abstract IEnumerable<ResourceDictionary> GetGlobalResources();
-
- /// <summary>
- /// Gets the list page.
- /// </summary>
- /// <param name="item">The item.</param>
- /// <returns>Page.</returns>
- public abstract Page GetListPage(BaseItemDto item);
- /// <summary>
- /// Gets the detail page.
- /// </summary>
- /// <param name="item">The item.</param>
- /// <returns>Page.</returns>
- public abstract Page GetDetailPage(BaseItemDto item);
- /// <summary>
- /// Gets the home page.
- /// </summary>
- /// <returns>Page.</returns>
- public abstract Page GetHomePage();
- /// <summary>
- /// Gets the login page.
- /// </summary>
- /// <returns>Page.</returns>
- public abstract Page GetLoginPage();
- /// <summary>
- /// Gets the internal player page.
- /// </summary>
- /// <returns>Page.</returns>
- public abstract Page GetInternalPlayerPage();
-
- /// <summary>
- /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
- /// </summary>
- public virtual void Dispose()
- {
- }
-
- /// <summary>
- /// Displays the weather.
- /// </summary>
- public abstract void DisplayWeather();
- }
-}
diff --git a/MediaBrowser.UI/Controller/PluginUpdater.cs b/MediaBrowser.UI/Controller/PluginUpdater.cs
deleted file mode 100644
index e56b6f54f..000000000
--- a/MediaBrowser.UI/Controller/PluginUpdater.cs
+++ /dev/null
@@ -1,313 +0,0 @@
-using MediaBrowser.Common.IO;
-using MediaBrowser.Model.Logging;
-using MediaBrowser.Model.Net;
-using MediaBrowser.Model.Plugins;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace MediaBrowser.UI.Controller
-{
- /// <summary>
- /// This keeps ui plugin assemblies in sync with plugins installed on the server
- /// </summary>
- public class PluginUpdater
- {
- private readonly ILogger _logger;
-
- public PluginUpdater(ILogger logger)
- {
- _logger = logger;
- }
-
- /// <summary>
- /// Updates the plugins.
- /// </summary>
- /// <returns>Task{PluginUpdateResult}.</returns>
- public async Task<PluginUpdateResult> UpdatePlugins()
- {
- _logger.Info("Downloading list of installed plugins");
- var allInstalledPlugins = await UIKernel.Instance.ApiClient.GetInstalledPluginsAsync().ConfigureAwait(false);
-
- var uiPlugins = allInstalledPlugins.Where(p => p.DownloadToUI).ToList();
-
- var result = new PluginUpdateResult { };
-
- result.DeletedPlugins = DeleteUninstalledPlugins(uiPlugins);
-
- await DownloadPluginAssemblies(uiPlugins, result).ConfigureAwait(false);
-
- result.UpdatedConfigurations = await DownloadPluginConfigurations(uiPlugins).ConfigureAwait(false);
-
- return result;
- }
-
- /// <summary>
- /// Downloads plugin assemblies from the server, if they need to be installed or updated.
- /// </summary>
- /// <param name="uiPlugins">The UI plugins.</param>
- /// <param name="result">The result.</param>
- /// <returns>Task.</returns>
- private async Task DownloadPluginAssemblies(IEnumerable<PluginInfo> uiPlugins, PluginUpdateResult result)
- {
- var newlyInstalledPlugins = new List<PluginInfo>();
- var updatedPlugins = new List<PluginInfo>();
-
- // Loop through the list of plugins that are on the server
- foreach (var pluginInfo in uiPlugins)
- {
- // See if it is already installed in the UI
- var currentAssemblyPath = Path.Combine(UIKernel.Instance.ApplicationPaths.PluginsPath, pluginInfo.AssemblyFileName);
-
- var isPluginInstalled = File.Exists(currentAssemblyPath);
-
- // Download the plugin if it is not present, or if the current version is out of date
- bool downloadPlugin;
-
- if (!isPluginInstalled)
- {
- downloadPlugin = true;
- _logger.Info("{0} is not installed and needs to be downloaded.", pluginInfo.Name);
- }
- else
- {
- var serverVersion = Version.Parse(pluginInfo.Version);
-
- var fileVersion = FileVersionInfo.GetVersionInfo(currentAssemblyPath).FileVersion ?? string.Empty;
-
- downloadPlugin = string.IsNullOrEmpty(fileVersion) || Version.Parse(fileVersion) < serverVersion;
-
- if (downloadPlugin)
- {
- _logger.Info("{0} has an updated version on the server and needs to be downloaded. Server version: {1}, UI version: {2}", pluginInfo.Name, serverVersion, fileVersion);
- }
- }
-
- if (downloadPlugin)
- {
- if (UIKernel.Instance.ApplicationVersion < Version.Parse(pluginInfo.MinimumRequiredUIVersion))
- {
- _logger.Warn("Can't download new version of {0} because the application needs to be updated first.", pluginInfo.Name);
- continue;
- }
-
- try
- {
- await DownloadPlugin(pluginInfo).ConfigureAwait(false);
-
- if (isPluginInstalled)
- {
- updatedPlugins.Add(pluginInfo);
- }
- else
- {
- newlyInstalledPlugins.Add(pluginInfo);
- }
- }
- catch (HttpException ex)
- {
- _logger.ErrorException("Error downloading {0} configuration", ex, pluginInfo.Name);
- }
- catch (IOException ex)
- {
- _logger.ErrorException("Error saving plugin assembly for {0}", ex, pluginInfo.Name);
- }
- }
- }
-
- result.NewlyInstalledPlugins = newlyInstalledPlugins;
- result.UpdatedPlugins = updatedPlugins;
- }
-
- /// <summary>
- /// Downloads plugin configurations from the server.
- /// </summary>
- /// <param name="uiPlugins">The UI plugins.</param>
- /// <returns>Task{List{PluginInfo}}.</returns>
- private async Task<List<PluginInfo>> DownloadPluginConfigurations(IEnumerable<PluginInfo> uiPlugins)
- {
- var updatedPlugins = new List<PluginInfo>();
-
- // Loop through the list of plugins that are on the server
- foreach (var pluginInfo in uiPlugins
- .Where(p => UIKernel.Instance.ApplicationVersion >= Version.Parse(p.MinimumRequiredUIVersion)))
- {
- // See if it is already installed in the UI
- var path = Path.Combine(UIKernel.Instance.ApplicationPaths.PluginConfigurationsPath, pluginInfo.ConfigurationFileName);
-
- var download = false;
-
- if (!File.Exists(path))
- {
- download = true;
- _logger.Info("{0} configuration was not found needs to be downloaded.", pluginInfo.Name);
- }
- else if (File.GetLastWriteTimeUtc(path) < pluginInfo.ConfigurationDateLastModified)
- {
- download = true;
- _logger.Info("{0} has an updated configuration on the server and needs to be downloaded.", pluginInfo.Name);
- }
-
- if (download)
- {
- if (UIKernel.Instance.ApplicationVersion < Version.Parse(pluginInfo.MinimumRequiredUIVersion))
- {
- _logger.Warn("Can't download updated configuration of {0} because the application needs to be updated first.", pluginInfo.Name);
- continue;
- }
-
- try
- {
- await DownloadPluginConfiguration(pluginInfo, path).ConfigureAwait(false);
-
- updatedPlugins.Add(pluginInfo);
- }
- catch (HttpException ex)
- {
- _logger.ErrorException("Error downloading {0} configuration", ex, pluginInfo.Name);
- }
- catch (IOException ex)
- {
- _logger.ErrorException("Error saving plugin configuration to {0}", ex, path);
- }
- }
- }
-
- return updatedPlugins;
- }
-
- /// <summary>
- /// Downloads a plugin assembly from the server
- /// </summary>
- /// <param name="plugin">The plugin.</param>
- /// <returns>Task.</returns>
- private async Task DownloadPlugin(PluginInfo plugin)
- {
- _logger.Info("Downloading {0} Plugin", plugin.Name);
-
- var path = Path.Combine(UIKernel.Instance.ApplicationPaths.PluginsPath, plugin.AssemblyFileName);
-
- // First download to a MemoryStream. This way if the download is cut off, we won't be left with a partial file
- using (var memoryStream = new MemoryStream())
- {
- var assemblyStream = await UIKernel.Instance.ApiClient.GetPluginAssemblyAsync(plugin).ConfigureAwait(false);
-
- await assemblyStream.CopyToAsync(memoryStream).ConfigureAwait(false);
-
- memoryStream.Position = 0;
-
- using (var fileStream = new FileStream(path, FileMode.Create))
- {
- await memoryStream.CopyToAsync(fileStream).ConfigureAwait(false);
- }
- }
- }
-
- /// <summary>
- /// Downloads the latest configuration for a plugin
- /// </summary>
- /// <param name="pluginInfo">The plugin info.</param>
- /// <param name="path">The path.</param>
- /// <returns>Task.</returns>
- private async Task DownloadPluginConfiguration(PluginInfo pluginInfo, string path)
- {
- _logger.Info("Downloading {0} Configuration", pluginInfo.Name);
-
- // First download to a MemoryStream. This way if the download is cut off, we won't be left with a partial file
- using (var stream = await UIKernel.Instance.ApiClient.GetPluginConfigurationFileAsync(pluginInfo.Id).ConfigureAwait(false))
- {
- using (var memoryStream = new MemoryStream())
- {
- await stream.CopyToAsync(memoryStream).ConfigureAwait(false);
-
- memoryStream.Position = 0;
-
- using (var fs = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.Read, StreamDefaults.DefaultFileStreamBufferSize, true))
- {
- await memoryStream.CopyToAsync(fs).ConfigureAwait(false);
- }
- }
- }
-
- File.SetLastWriteTimeUtc(path, pluginInfo.ConfigurationDateLastModified);
- }
-
- /// <summary>
- /// Deletes any plugins that have been uninstalled from the server
- /// </summary>
- /// <param name="uiPlugins">The UI plugins.</param>
- /// <returns>IEnumerable{System.String}.</returns>
- private IEnumerable<string> DeleteUninstalledPlugins(IEnumerable<PluginInfo> uiPlugins)
- {
- var deletedPlugins = new List<string>();
-
- foreach (var plugin in Directory.EnumerateFiles(UIKernel.Instance.ApplicationPaths.PluginsPath, "*.dll", SearchOption.TopDirectoryOnly)
- .Select(Path.GetFileName)
- .ToList())
- {
- var serverPlugin = uiPlugins.FirstOrDefault(p => p.AssemblyFileName.Equals(plugin, StringComparison.OrdinalIgnoreCase));
-
- if (serverPlugin == null)
- {
- try
- {
- DeletePlugin(plugin);
-
- deletedPlugins.Add(plugin);
- }
- catch (IOException ex)
- {
- _logger.ErrorException("Error deleting plugin assembly {0}", ex, plugin);
- }
- }
- }
-
- return deletedPlugins;
- }
-
- /// <summary>
- /// Deletes an installed ui plugin.
- /// Leaves config and data behind in the event it is later re-installed
- /// </summary>
- /// <param name="plugin">The plugin.</param>
- private void DeletePlugin(string plugin)
- {
- _logger.Info("Deleting {0} Plugin", plugin);
-
- if (File.Exists(plugin))
- {
- File.Delete(plugin);
- }
- }
- }
-
- /// <summary>
- /// Class PluginUpdateResult
- /// </summary>
- public class PluginUpdateResult
- {
- /// <summary>
- /// Gets or sets the deleted plugins.
- /// </summary>
- /// <value>The deleted plugins.</value>
- public IEnumerable<string> DeletedPlugins { get; set; }
- /// <summary>
- /// Gets or sets the newly installed plugins.
- /// </summary>
- /// <value>The newly installed plugins.</value>
- public IEnumerable<PluginInfo> NewlyInstalledPlugins { get; set; }
- /// <summary>
- /// Gets or sets the updated plugins.
- /// </summary>
- /// <value>The updated plugins.</value>
- public IEnumerable<PluginInfo> UpdatedPlugins { get; set; }
- /// <summary>
- /// Gets or sets the updated configurations.
- /// </summary>
- /// <value>The updated configurations.</value>
- public IEnumerable<PluginInfo> UpdatedConfigurations { get; set; }
- }
-}
diff --git a/MediaBrowser.UI/Controller/UIKernel.cs b/MediaBrowser.UI/Controller/UIKernel.cs
deleted file mode 100644
index 118067140..000000000
--- a/MediaBrowser.UI/Controller/UIKernel.cs
+++ /dev/null
@@ -1,181 +0,0 @@
-using MediaBrowser.ApiInteraction;
-using MediaBrowser.Common.Kernel;
-using MediaBrowser.Model.Connectivity;
-using MediaBrowser.Model.Logging;
-using MediaBrowser.Model.Net;
-using MediaBrowser.UI.Configuration;
-using MediaBrowser.UI.Playback;
-using System;
-using System.Collections.Generic;
-using System.Net;
-using System.Net.Cache;
-using System.Net.Http;
-using System.Threading.Tasks;
-
-namespace MediaBrowser.UI.Controller
-{
- /// <summary>
- /// This controls application logic as well as server interaction within the UI.
- /// </summary>
- public class UIKernel : BaseKernel<UIApplicationConfiguration, UIApplicationPaths>
- {
- /// <summary>
- /// Gets the instance.
- /// </summary>
- /// <value>The instance.</value>
- public static UIKernel Instance { get; private set; }
-
- /// <summary>
- /// Gets the API client.
- /// </summary>
- /// <value>The API client.</value>
- public ApiClient ApiClient { get; private set; }
-
- /// <summary>
- /// Gets the playback manager.
- /// </summary>
- /// <value>The playback manager.</value>
- public PlaybackManager PlaybackManager { get; private set; }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="UIKernel" /> class.
- /// </summary>
- public UIKernel(IApplicationHost appHost, ILogger logger)
- : base(appHost, logger)
- {
- Instance = this;
- }
-
- /// <summary>
- /// Gets the media players.
- /// </summary>
- /// <value>The media players.</value>
- public IEnumerable<BaseMediaPlayer> MediaPlayers { get; private set; }
-
- /// <summary>
- /// Gets the list of currently loaded themes
- /// </summary>
- /// <value>The themes.</value>
- public IEnumerable<BaseTheme> Themes { get; private set; }
-
- /// <summary>
- /// Gets the kernel context.
- /// </summary>
- /// <value>The kernel context.</value>
- public override KernelContext KernelContext
- {
- get { return KernelContext.Ui; }
- }
-
- /// <summary>
- /// Gets the UDP server port number.
- /// </summary>
- /// <value>The UDP server port number.</value>
- public override int UdpServerPortNumber
- {
- get { return 7360; }
- }
-
- /// <summary>
- /// Give the UI a different url prefix so that they can share the same port, in case they are installed on the same machine.
- /// </summary>
- /// <value>The HTTP server URL prefix.</value>
- public override string HttpServerUrlPrefix
- {
- get
- {
- return "http://+:" + Configuration.HttpServerPortNumber + "/mediabrowserui/";
- }
- }
-
- /// <summary>
- /// Reload api client and update plugins after loading configuration
- /// </summary>
- /// <returns>Task.</returns>
- protected override async Task OnConfigurationLoaded()
- {
- ReloadApiClient();
-
- try
- {
- await new PluginUpdater(Logger).UpdatePlugins().ConfigureAwait(false);
- }
- catch (HttpException ex)
- {
- Logger.ErrorException("Error updating plugins from the server", ex);
- }
- }
-
- /// <summary>
- /// Disposes the current ApiClient and creates a new one
- /// </summary>
- private void ReloadApiClient()
- {
- DisposeApiClient();
-
- ApiClient = new ApiClient(Logger, new AsyncHttpClient(new WebRequestHandler
- {
- AutomaticDecompression = DecompressionMethods.Deflate,
- CachePolicy = new RequestCachePolicy(RequestCacheLevel.Revalidate)
- }))
- {
- ServerHostName = Configuration.ServerHostName,
- ServerApiPort = Configuration.ServerApiPort,
- ClientType = ClientType.Pc,
- DeviceName = Environment.MachineName,
- SerializationFormat = SerializationFormats.Json
- };
- }
-
- /// <summary>
- /// Finds the parts.
- /// </summary>
- /// <param name="allTypes">All types.</param>
- protected override void FindParts(Type[] allTypes)
- {
- PlaybackManager = (PlaybackManager)ApplicationHost.CreateInstance(typeof(PlaybackManager));
-
- base.FindParts(allTypes);
-
- Themes = GetExports<BaseTheme>(allTypes);
- MediaPlayers = GetExports<BaseMediaPlayer>(allTypes);
- }
-
- /// <summary>
- /// Called when [composable parts loaded].
- /// </summary>
- /// <returns>Task.</returns>
- protected override async Task OnComposablePartsLoaded()
- {
- await base.OnComposablePartsLoaded().ConfigureAwait(false);
-
- // Once plugins have loaded give the api a reference to our protobuf serializer
- DataSerializer.DynamicSerializer = ProtobufSerializer.TypeModel;
- }
-
- /// <summary>
- /// Disposes the current ApiClient
- /// </summary>
- private void DisposeApiClient()
- {
- if (ApiClient != null)
- {
- ApiClient.Dispose();
- }
- }
-
- /// <summary>
- /// Releases unmanaged and - optionally - managed resources.
- /// </summary>
- /// <param name="dispose"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
- protected override void Dispose(bool dispose)
- {
- if (dispose)
- {
- DisposeApiClient();
- }
-
- base.Dispose(dispose);
- }
- }
-}
diff --git a/MediaBrowser.UI/Controls/ModalWindow.xaml b/MediaBrowser.UI/Controls/ModalWindow.xaml
deleted file mode 100644
index c2afbe05e..000000000
--- a/MediaBrowser.UI/Controls/ModalWindow.xaml
+++ /dev/null
@@ -1,67 +0,0 @@
-<controls:BaseModalWindow x:Class="MediaBrowser.UI.Controls.ModalWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Controls="clr-namespace:MediaBrowser.UI.Controls"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- Title="ModalWindow"
- AllowsTransparency="True"
- Background="Transparent"
- Style="{StaticResource ModalWindow}">
-
- <Grid>
- <Grid Style="{StaticResource ModalOverlayStyle}">
-
- </Grid>
- <Grid Style="{StaticResource ModalContentStyle}" RenderTransformOrigin="1,0">
- <Grid Style="{StaticResource ModalContentInnerStyle}">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto"></ColumnDefinition>
- <ColumnDefinition Width="*"></ColumnDefinition>
- </Grid.ColumnDefinitions>
-
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- </Grid.RowDefinitions>
-
- <Image Grid.Row="0" Grid.RowSpan="3" Grid.Column="0" Style="{StaticResource ModalButtonImage}"></Image>
-
- <TextBlock x:Name="txtCaption" Text="{Binding Caption}" Style="{StaticResource Heading2TextBlockStyle}" Grid.Row="0" Grid.Column="1" Margin="0 30 0 10"></TextBlock>
-
- <Grid x:Name="pnlContent" HorizontalAlignment="Stretch" Grid.Row="1" Grid.Column="1">
-
- </Grid>
-
- <StackPanel x:Name="pnlButtons" Style="{StaticResource ModalButtonPanel}" Grid.Row="2" Grid.Column="1">
- <controls:ExtendedButton x:Name="btnYes" Content="Yes" Style="{StaticResource ModalButton}"></controls:ExtendedButton>
- <controls:ExtendedButton x:Name="btnNo" Content="No" Style="{StaticResource ModalButton}"></controls:ExtendedButton>
- <controls:ExtendedButton x:Name="btnOk" Content="OK" Style="{StaticResource ModalButton}"></controls:ExtendedButton>
- <controls:ExtendedButton x:Name="btnCancel" Content="Cancel" Style="{StaticResource ModalButton}"></controls:ExtendedButton>
- </StackPanel>
- </Grid>
- <!-- Animation -->
- <Grid.Triggers>
- <EventTrigger RoutedEvent="FrameworkElement.Loaded">
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)">
- <SplineDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
- <SplineDoubleKeyFrame KeyTime="0:0:0.15" Value="1"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </BeginStoryboard>
- </EventTrigger>
- </Grid.Triggers>
-
- <Grid.RenderTransform>
- <ScaleTransform ScaleX="1" />
- </Grid.RenderTransform>
- </Grid>
-
- <Grid.LayoutTransform>
- <ScaleTransform ScaleX="{Binding Path=ContentScale}" ScaleY="{Binding Path=ContentScale}" CenterX="0" CenterY="0" />
- </Grid.LayoutTransform>
-
- </Grid>
-</controls:BaseModalWindow>
diff --git a/MediaBrowser.UI/Controls/ModalWindow.xaml.cs b/MediaBrowser.UI/Controls/ModalWindow.xaml.cs
deleted file mode 100644
index 21f97b8ac..000000000
--- a/MediaBrowser.UI/Controls/ModalWindow.xaml.cs
+++ /dev/null
@@ -1,180 +0,0 @@
-using System;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Media.Animation;
-
-namespace MediaBrowser.UI.Controls
-{
- /// <summary>
- /// Interaction logic for ModalWindow.xaml
- /// </summary>
- public partial class ModalWindow : BaseModalWindow
- {
- public MessageBoxResult MessageBoxResult { get; set; }
-
- public UIElement TextContent
- {
- set
- {
- pnlContent.Children.Clear();
-
- var textBlock = value as TextBlock;
-
- if (textBlock != null)
- {
- textBlock.SetResourceReference(TextBlock.StyleProperty, "ModalTextStyle");
- }
- pnlContent.Children.Add(value);
- }
- }
-
- public string Text
- {
- set { TextContent = new TextBlock { Text = value }; }
- }
-
- private MessageBoxButton _button;
- public MessageBoxButton Button
- {
- get { return _button; }
- set
- {
- _button = value;
- UpdateButtonVisibility();
- OnPropertyChanged("Button");
- }
- }
-
- private MessageBoxIcon _messageBoxImage;
- public MessageBoxIcon MessageBoxImage
- {
- get { return _messageBoxImage; }
- set
- {
- _messageBoxImage = value;
- OnPropertyChanged("MessageBoxImage");
- }
- }
-
- private string _caption;
- public string Caption
- {
- get { return _caption; }
- set
- {
- _caption = value;
- txtCaption.Visibility = string.IsNullOrEmpty(value) ? Visibility.Collapsed : Visibility.Visible;
- OnPropertyChanged("Caption");
- }
- }
-
- public ModalWindow()
- : base()
- {
- InitializeComponent();
- }
-
- protected override void OnInitialized(EventArgs e)
- {
- base.OnInitialized(e);
-
- btnOk.Click += btnOk_Click;
- btnCancel.Click += btnCancel_Click;
- btnYes.Click += btnYes_Click;
- btnNo.Click += btnNo_Click;
- }
-
- void btnNo_Click(object sender, RoutedEventArgs e)
- {
- MessageBoxResult = MessageBoxResult.No;
- CloseModal();
- }
-
- void btnYes_Click(object sender, RoutedEventArgs e)
- {
- MessageBoxResult = MessageBoxResult.Yes;
- CloseModal();
- }
-
- void btnCancel_Click(object sender, RoutedEventArgs e)
- {
- MessageBoxResult = MessageBoxResult.Cancel;
- CloseModal();
- }
-
- void btnOk_Click(object sender, RoutedEventArgs e)
- {
- MessageBoxResult = MessageBoxResult.OK;
- CloseModal();
- }
-
- private void UpdateButtonVisibility()
- {
- btnYes.Visibility = Button == MessageBoxButton.YesNo || Button == MessageBoxButton.YesNoCancel
- ? Visibility.Visible
- : Visibility.Collapsed;
-
- btnNo.Visibility = Button == MessageBoxButton.YesNo || Button == MessageBoxButton.YesNoCancel
- ? Visibility.Visible
- : Visibility.Collapsed;
-
- btnOk.Visibility = Button == MessageBoxButton.OK || Button == MessageBoxButton.OKCancel
- ? Visibility.Visible
- : Visibility.Collapsed;
-
- btnCancel.Visibility = Button == MessageBoxButton.OKCancel || Button == MessageBoxButton.YesNoCancel
- ? Visibility.Visible
- : Visibility.Collapsed;
- }
- }
-
- /// <summary>
- /// I had to make my own enum that essentially clones MessageBoxImage
- /// Some of the options share the same enum int value, and this was preventing databinding from working properly.
- /// </summary>
- public enum MessageBoxIcon
- {
- // Summary:
- // No icon is displayed.
- None,
- //
- // Summary:
- // The message box contains a symbol consisting of white X in a circle with
- // a red background.
- Error,
- //
- // Summary:
- // The message box contains a symbol consisting of a white X in a circle with
- // a red background.
- Hand,
- //
- // Summary:
- // The message box contains a symbol consisting of white X in a circle with
- // a red background.
- Stop,
- //
- // Summary:
- // The message box contains a symbol consisting of a question mark in a circle.
- Question,
- //
- // Summary:
- // The message box contains a symbol consisting of an exclamation point in a
- // triangle with a yellow background.
- Exclamation,
- //
- // Summary:
- // The message box contains a symbol consisting of an exclamation point in a
- // triangle with a yellow background.
- Warning,
- //
- // Summary:
- // The message box contains a symbol consisting of a lowercase letter i in a
- // circle.
- Information,
- //
- // Summary:
- // The message box contains a symbol consisting of a lowercase letter i in a
- // circle.
- Asterisk
- }
-}
diff --git a/MediaBrowser.UI/Controls/NavigationBar.xaml b/MediaBrowser.UI/Controls/NavigationBar.xaml
deleted file mode 100644
index 020fecd6d..000000000
--- a/MediaBrowser.UI/Controls/NavigationBar.xaml
+++ /dev/null
@@ -1,55 +0,0 @@
-<controls:BaseUserControl x:Class="MediaBrowser.UI.Controls.NavigationBar"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300">
- <Grid x:Name="NavBarGrid" Style="{StaticResource NavBarGrid}">
-
- <Grid Style="{StaticResource NavBarBackgroundGrid}"></Grid>
-
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="1*"></ColumnDefinition>
- <ColumnDefinition Width="1*"></ColumnDefinition>
- <ColumnDefinition Width="1*"></ColumnDefinition>
- </Grid.ColumnDefinitions>
-
- <Grid x:Name="SeekGrid" Grid.Row="0" Grid.ColumnSpan="3" Margin="150 15 150 5" Visibility="Collapsed">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto"></ColumnDefinition>
- <ColumnDefinition Width="*"></ColumnDefinition>
- <ColumnDefinition Width="auto"></ColumnDefinition>
- </Grid.ColumnDefinitions>
-
- <TextBlock x:Name="TxtCurrentPosition" Grid.Column="0" Style="{StaticResource TextBlockStyle}" Margin="0 0 10 0"></TextBlock>
- <Slider x:Name="CurrentPositionSlider" Grid.Column="1" VerticalAlignment="Center" Minimum="0" Thumb.DragStarted="CurrentPositionSlider_DragStarted" Thumb.DragCompleted="CurrentPositionSlider_DragCompleted" IsMoveToPointEnabled="True"></Slider>
- <TextBlock x:Name="TxtDuration" Grid.Column="2" Style="{StaticResource TextBlockStyle}" Margin="10 0 0 0"></TextBlock>
-
- </Grid>
-
- <StackPanel Style="{StaticResource NavBarGridLeftPanel}" Grid.Row="1">
- <Button x:Name="BackButton" Style="{StaticResource BackButton}"></Button>
- </StackPanel>
- <StackPanel Style="{StaticResource NavBarGridCenterPanel}" Grid.Row="1">
- <Button x:Name="PreviousChapterButton" Style="{StaticResource PreviousChapterButton}" Visibility="Collapsed"></Button>
- <Button x:Name="PlayButton" Style="{StaticResource PlayButton}" Visibility="Collapsed"></Button>
- <Button x:Name="PauseButton" Style="{StaticResource PauseButton}" Visibility="Collapsed"></Button>
- <Button x:Name="StopButton" Style="{StaticResource StopButton}" Visibility="Collapsed"></Button>
- <Button x:Name="NextChapterButton" Style="{StaticResource NextChapterButton}" Visibility="Collapsed"></Button>
- </StackPanel>
- <StackPanel Style="{StaticResource NavBarGridRightPanel}" Grid.Row="1">
- <Button x:Name="MuteButton" Style="{StaticResource MuteButton}" Visibility="Collapsed"></Button>
- <Button x:Name="VolumeDownButton" Style="{StaticResource VolumeDownButton}" Visibility="Collapsed"></Button>
- <Button x:Name="VolumeUpButton" Style="{StaticResource VolumeUpButton}" Visibility="Collapsed"></Button>
- </StackPanel>
- </Grid>
- </Grid>
-</controls:BaseUserControl>
diff --git a/MediaBrowser.UI/Controls/NavigationBar.xaml.cs b/MediaBrowser.UI/Controls/NavigationBar.xaml.cs
deleted file mode 100644
index 6d59a7d3a..000000000
--- a/MediaBrowser.UI/Controls/NavigationBar.xaml.cs
+++ /dev/null
@@ -1,318 +0,0 @@
-using MediaBrowser.UI.Controller;
-using MediaBrowser.UI.Playback;
-using MediaBrowser.UI.Playback.InternalPlayer;
-using System;
-using System.Threading;
-using System.Windows;
-using System.Windows.Controls.Primitives;
-using System.Windows.Input;
-
-namespace MediaBrowser.UI.Controls
-{
- /// <summary>
- /// Interaction logic for NavigationBar.xaml
- /// </summary>
- public partial class NavigationBar : BaseUserControl
- {
- /// <summary>
- /// Gets or sets the current player.
- /// </summary>
- /// <value>The current player.</value>
- private BaseMediaPlayer CurrentPlayer { get; set; }
-
- /// <summary>
- /// Gets or sets the current position timer.
- /// </summary>
- /// <value>The current position timer.</value>
- private Timer CurrentPositionTimer { get; set; }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="NavigationBar" /> class.
- /// </summary>
- public NavigationBar()
- {
- InitializeComponent();
-
- Loaded += NavigationBar_Loaded;
- }
-
- /// <summary>
- /// Handles the Loaded event of the NavigationBar 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 NavigationBar_Loaded(object sender, RoutedEventArgs e)
- {
- BackButton.Click += BtnApplicationBackClick;
- MuteButton.Click += MuteButton_Click;
-
- VolumeDownButton.PreviewMouseDown += VolumeDownButton_Click;
- VolumeUpButton.PreviewMouseDown += VolumeUpButton_Click;
-
- StopButton.Click += StopButton_Click;
- PlayButton.Click += PlayButton_Click;
- PauseButton.Click += PauseButton_Click;
-
- NextChapterButton.Click += NextChapterButton_Click;
- PreviousChapterButton.Click += PreviousChapterButton_Click;
-
- UIKernel.Instance.PlaybackManager.PlaybackStarted += PlaybackManager_PlaybackStarted;
- UIKernel.Instance.PlaybackManager.PlaybackCompleted += PlaybackManager_PlaybackCompleted;
-
- CurrentPositionSlider.PreviewMouseUp += CurrentPositionSlider_PreviewMouseUp;
- }
-
- /// <summary>
- /// Handles the Click event of the PreviousChapterButton control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
- async void PreviousChapterButton_Click(object sender, RoutedEventArgs e)
- {
- await CurrentPlayer.GoToPreviousChapter();
- }
-
- /// <summary>
- /// Handles the Click event of the NextChapterButton control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
- async void NextChapterButton_Click(object sender, RoutedEventArgs e)
- {
- await CurrentPlayer.GoToNextChapter();
- }
-
- /// <summary>
- /// Handles the Click event of the PauseButton control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
- async void PauseButton_Click(object sender, RoutedEventArgs e)
- {
- await CurrentPlayer.Pause();
- }
-
- /// <summary>
- /// Handles the Click event of the PlayButton control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
- async void PlayButton_Click(object sender, RoutedEventArgs e)
- {
- await CurrentPlayer.UnPause();
- }
-
- /// <summary>
- /// Handles the Click event of the StopButton control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
- async void StopButton_Click(object sender, RoutedEventArgs e)
- {
- await CurrentPlayer.Stop();
- }
-
- /// <summary>
- /// Handles the PlaybackCompleted event of the PlaybackManager control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="PlaybackEventArgs" /> instance containing the event data.</param>
- void PlaybackManager_PlaybackCompleted(object sender, PlaybackStopEventArgs e)
- {
- if (e.Player == CurrentPlayer)
- {
- if (CurrentPositionTimer != null)
- {
- CurrentPositionTimer.Dispose();
- }
-
- CurrentPlayer.PlayStateChanged -= CurrentPlayer_PlayStateChanged;
- CurrentPlayer = null;
- ResetButtonVisibilities(null);
-
- Dispatcher.InvokeAsync(() => TxtCurrentPosition.Text = string.Empty);
- }
- }
-
- /// <summary>
- /// Handles the Click event of the VolumeUpButton 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 VolumeUpButton_Click(object sender, RoutedEventArgs e)
- {
- CurrentPlayer.Volume += 3;
- }
-
- /// <summary>
- /// Handles the Click event of the VolumeDownButton 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 VolumeDownButton_Click(object sender, RoutedEventArgs e)
- {
- CurrentPlayer.Volume -= 3;
- }
-
- /// <summary>
- /// Handles the Click event of the MuteButton 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 MuteButton_Click(object sender, RoutedEventArgs e)
- {
- if (CurrentPlayer.CanMute)
- {
- CurrentPlayer.Mute = !CurrentPlayer.Mute;
- }
- }
-
- /// <summary>
- /// Handles the PlaybackStarted event of the PlaybackManager control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="PlaybackEventArgs" /> instance containing the event data.</param>
- void PlaybackManager_PlaybackStarted(object sender, PlaybackEventArgs e)
- {
- if (e.Player is BaseInternalMediaPlayer)
- {
- CurrentPlayer = e.Player;
- CurrentPlayer.PlayStateChanged += CurrentPlayer_PlayStateChanged;
-
- ResetButtonVisibilities(e.Player);
-
- Dispatcher.InvokeAsync(() =>
- {
- var runtime = e.Player.CurrentMedia.RunTimeTicks ?? 0;
- CurrentPositionSlider.Maximum = runtime;
-
- TxtDuration.Text = GetTimeString(runtime);
-
- });
-
- CurrentPositionTimer = new Timer(CurrentPositionTimerCallback, null, 250, 250);
- }
- }
-
- /// <summary>
- /// Currents the position timer callback.
- /// </summary>
- /// <param name="state">The state.</param>
- private void CurrentPositionTimerCallback(object state)
- {
- var time = string.Empty;
-
- var ticks = CurrentPlayer.CurrentPositionTicks;
-
- if (ticks.HasValue)
- {
- time = GetTimeString(ticks.Value);
- }
-
- Dispatcher.InvokeAsync(() =>
- {
- TxtCurrentPosition.Text = time;
-
- if (!_isPositionSliderDragging)
- {
- CurrentPositionSlider.Value = ticks ?? 0;
- }
- });
- }
-
- /// <summary>
- /// Gets the time string.
- /// </summary>
- /// <param name="ticks">The ticks.</param>
- /// <returns>System.String.</returns>
- private string GetTimeString(long ticks)
- {
- var timespan = TimeSpan.FromTicks(ticks);
-
- return timespan.TotalHours >= 1 ? timespan.ToString("hh':'mm':'ss") : timespan.ToString("mm':'ss");
- }
-
- /// <summary>
- /// Handles the PlayStateChanged event of the CurrentPlayer control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
- void CurrentPlayer_PlayStateChanged(object sender, EventArgs e)
- {
- ResetButtonVisibilities(CurrentPlayer);
- }
-
- /// <summary>
- /// Resets the button visibilities.
- /// </summary>
- /// <param name="player">The player.</param>
- private void ResetButtonVisibilities(BaseMediaPlayer player)
- {
- Dispatcher.Invoke(() =>
- {
- PlayButton.Visibility = player != null && player.PlayState == PlayState.Paused ? Visibility.Visible : Visibility.Collapsed;
- PauseButton.Visibility = player != null && player.CanPause && player.PlayState == PlayState.Playing ? Visibility.Visible : Visibility.Collapsed;
-
- StopButton.Visibility = player != null ? Visibility.Visible : Visibility.Collapsed;
- MuteButton.Visibility = player != null && player.CanMute ? Visibility.Visible : Visibility.Collapsed;
- VolumeUpButton.Visibility = player != null && player.CanControlVolume ? Visibility.Visible : Visibility.Collapsed;
- VolumeDownButton.Visibility = player != null && player.CanControlVolume ? Visibility.Visible : Visibility.Collapsed;
-
- var isSeekabke = player != null && player.CanSeek && player.CurrentMedia != null;
- SeekGrid.Visibility = isSeekabke ? Visibility.Visible : Visibility.Collapsed;
-
- var canSeekChapters = isSeekabke && player.CurrentMedia.Chapters != null && player.CurrentMedia.Chapters.Count > 1;
-
- NextChapterButton.Visibility = canSeekChapters ? Visibility.Visible : Visibility.Collapsed;
- PreviousChapterButton.Visibility = canSeekChapters ? Visibility.Visible : Visibility.Collapsed;
- });
- }
-
- /// <summary>
- /// BTNs the application back click.
- /// </summary>
- /// <param name="sender">The sender.</param>
- /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
- void BtnApplicationBackClick(object sender, RoutedEventArgs e)
- {
- App.Instance.ApplicationWindow.NavigateBack();
- }
-
- /// <summary>
- /// The is position slider dragging
- /// </summary>
- private bool _isPositionSliderDragging;
-
- /// <summary>
- /// Handles the DragStarted event of the CurrentPositionSlider control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="DragStartedEventArgs" /> instance containing the event data.</param>
- private void CurrentPositionSlider_DragStarted(object sender, DragStartedEventArgs e)
- {
- _isPositionSliderDragging = true;
- }
-
- /// <summary>
- /// Handles the DragCompleted event of the CurrentPositionSlider control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="DragCompletedEventArgs" /> instance containing the event data.</param>
- private void CurrentPositionSlider_DragCompleted(object sender, DragCompletedEventArgs e)
- {
- _isPositionSliderDragging = false;
-
- //await CurrentPlayer.Seek(Convert.ToInt64(CurrentPositionSlider.Value));
- }
-
- /// <summary>
- /// Handles the PreviewMouseUp event of the CurrentPositionSlider control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="MouseButtonEventArgs" /> instance containing the event data.</param>
- async void CurrentPositionSlider_PreviewMouseUp(object sender, MouseButtonEventArgs e)
- {
- await CurrentPlayer.Seek(Convert.ToInt64(CurrentPositionSlider.Value));
- }
- }
-}
diff --git a/MediaBrowser.UI/Controls/NotificationMessage.xaml b/MediaBrowser.UI/Controls/NotificationMessage.xaml
deleted file mode 100644
index 6411b6f57..000000000
--- a/MediaBrowser.UI/Controls/NotificationMessage.xaml
+++ /dev/null
@@ -1,33 +0,0 @@
-<controls:BaseUserControl x:Class="MediaBrowser.UI.Controls.NotificationMessage"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:Controls="clr-namespace:MediaBrowser.UI.Controls"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300">
- <Grid Style="{StaticResource NotificationContentStyle}">
- <Grid Style="{StaticResource NotificationContentInnerStyle}">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto"></ColumnDefinition>
- <ColumnDefinition Width="*"></ColumnDefinition>
- </Grid.ColumnDefinitions>
-
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- </Grid.RowDefinitions>
-
- <Image Grid.Row="0" Grid.RowSpan="3" Grid.Column="0" Style="{StaticResource NotificationButtonImage}"></Image>
-
- <TextBlock x:Name="txtCaption" Text="{Binding Caption}" Style="{StaticResource NotificationCaptionStyle}" Grid.Row="0" Grid.Column="1"></TextBlock>
-
- <Grid x:Name="pnlContent" HorizontalAlignment="Stretch" Grid.Row="1" Grid.Column="1">
-
- </Grid>
- </Grid>
- </Grid>
-</controls:BaseUserControl>
diff --git a/MediaBrowser.UI/Controls/NotificationMessage.xaml.cs b/MediaBrowser.UI/Controls/NotificationMessage.xaml.cs
deleted file mode 100644
index 06ed513b1..000000000
--- a/MediaBrowser.UI/Controls/NotificationMessage.xaml.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-using System;
-using System.Windows;
-using System.Windows.Controls;
-
-namespace MediaBrowser.UI.Controls
-{
- /// <summary>
- /// Interaction logic for NotificationMessage.xaml
- /// </summary>
- public partial class NotificationMessage : BaseUserControl
- {
- public NotificationMessage()
- {
- InitializeComponent();
- }
-
- public UIElement TextContent
- {
- set
- {
- pnlContent.Children.Clear();
-
- var textBlock = value as TextBlock;
-
- if (textBlock != null)
- {
- textBlock.SetResourceReference(TextBlock.StyleProperty, "NotificationTextStyle");
- }
- pnlContent.Children.Add(value);
- }
- }
-
- public string Text
- {
- set { TextContent = new TextBlock { Text = value }; }
- }
-
- private MessageBoxIcon _messageBoxImage;
- public MessageBoxIcon MessageBoxImage
- {
- get { return _messageBoxImage; }
- set
- {
- _messageBoxImage = value;
- OnPropertyChanged("MessageBoxImage");
- }
- }
-
- private string _caption;
- public string Caption
- {
- get { return _caption; }
- set
- {
- _caption = value;
- OnPropertyChanged("Caption");
- txtCaption.Visibility = string.IsNullOrEmpty(value) ? Visibility.Collapsed : Visibility.Visible;
- }
- }
-
- protected override void OnInitialized(EventArgs e)
- {
- base.OnInitialized(e);
-
- DataContext = this;
- }
- }
-}
diff --git a/MediaBrowser.UI/Controls/WindowCommands.xaml b/MediaBrowser.UI/Controls/WindowCommands.xaml
deleted file mode 100644
index bca881238..000000000
--- a/MediaBrowser.UI/Controls/WindowCommands.xaml
+++ /dev/null
@@ -1,100 +0,0 @@
-<UserControl x:Class="MediaBrowser.UI.Controls.WindowCommands"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300">
-
- <UserControl.Resources>
-
- <Style TargetType="StackPanel" x:Key="WindowCommandsPanel">
- <Setter Property="Orientation" Value="Horizontal"/>
- <Setter Property="HorizontalAlignment" Value="Right"/>
- </Style>
-
- <Style TargetType="Button" x:Key="WebdingsButton">
- <Setter Property="Margin" Value="0 0 15 0"/>
- <Setter Property="KeyboardNavigation.IsTabStop" Value="false"/>
- <Setter Property="Padding" Value="0"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Opacity" Value=".5" />
- </Trigger>
- </Style.Triggers>
- </Style>
-
- <Style TargetType="TextBlock" x:Key="WebdingsTextBlock">
- <Setter Property="FontFamily" Value="Webdings"/>
- <Setter Property="FontSize" Value="14"/>
- <Setter Property="Foreground" Value="{StaticResource DefaultForeground}"/>
- </Style>
-
- <Style TargetType="Button" x:Key="MinimizeApplicationButton" BasedOn="{StaticResource WebdingsButton}">
- <Setter Property="ToolTip" Value="Minimize"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate>
- <TextBlock Style="{StaticResource WebdingsTextBlock}">0</TextBlock>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style TargetType="Button" x:Key="MaximizeApplicationButton" BasedOn="{StaticResource WebdingsButton}">
- <Setter Property="ToolTip" Value="Maximize"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate>
- <TextBlock Style="{StaticResource WebdingsTextBlock}">1</TextBlock>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding Path=WindowState, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="Maximized">
- <Setter Property="Visibility" Value="Collapsed" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
-
- <Style TargetType="Button" x:Key="UndoMaximizeApplicationButton" BasedOn="{StaticResource WebdingsButton}">
- <Setter Property="Visibility" Value="Collapsed"/>
- <Setter Property="ToolTip" Value="Restore"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate>
- <TextBlock Style="{StaticResource WebdingsTextBlock}">2</TextBlock>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding Path=WindowState, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Value="Maximized">
- <Setter Property="Visibility" Value="Visible" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
-
- <Style TargetType="Button" x:Key="CloseApplicationButton" BasedOn="{StaticResource WebdingsButton}">
- <Setter Property="ToolTip" Value="Close"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate>
- <TextBlock Style="{StaticResource WebdingsTextBlock}">r</TextBlock>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- </UserControl.Resources>
-
- <StackPanel Style="{StaticResource WindowCommandsPanel}">
- <Button x:Name="MinimizeApplicationButton" Style="{StaticResource MinimizeApplicationButton}">
- </Button>
- <Button x:Name="MaximizeApplicationButton" Style="{StaticResource MaximizeApplicationButton}">
- </Button>
- <Button x:Name="UndoMaximizeApplicationButton" Style="{StaticResource UndoMaximizeApplicationButton}"></Button>
- <Button x:Name="CloseApplicationButton" Style="{StaticResource CloseApplicationButton}"></Button>
- </StackPanel>
-
-</UserControl>
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
-{
- /// <summary>
- /// Interaction logic for WindowCommands.xaml
- /// </summary>
- public partial class WindowCommands : UserControl
- {
- /// <summary>
- /// Gets the parent window.
- /// </summary>
- /// <value>The parent window.</value>
- public Window ParentWindow
- {
- get { return TreeHelper.TryFindParent<Window>(this); }
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="WindowCommands" /> class.
- /// </summary>
- public WindowCommands()
- {
- InitializeComponent();
- Loaded += WindowCommandsLoaded;
- }
-
- /// <summary>
- /// Windows the commands loaded.
- /// </summary>
- /// <param name="sender">The sender.</param>
- /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
- void WindowCommandsLoaded(object sender, RoutedEventArgs e)
- {
- CloseApplicationButton.Click += CloseApplicationButtonClick;
- MinimizeApplicationButton.Click += MinimizeApplicationButtonClick;
- MaximizeApplicationButton.Click += MaximizeApplicationButtonClick;
- UndoMaximizeApplicationButton.Click += UndoMaximizeApplicationButtonClick;
- }
-
- /// <summary>
- /// Undoes the maximize application button click.
- /// </summary>
- /// <param name="sender">The sender.</param>
- /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
- void UndoMaximizeApplicationButtonClick(object sender, RoutedEventArgs e)
- {
- ParentWindow.WindowState = WindowState.Normal;
- }
-
- /// <summary>
- /// Maximizes the application button click.
- /// </summary>
- /// <param name="sender">The sender.</param>
- /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
- void MaximizeApplicationButtonClick(object sender, RoutedEventArgs e)
- {
- ParentWindow.WindowState = WindowState.Maximized;
- }
-
- /// <summary>
- /// Minimizes the application button click.
- /// </summary>
- /// <param name="sender">The sender.</param>
- /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
- void MinimizeApplicationButtonClick(object sender, RoutedEventArgs e)
- {
- ParentWindow.WindowState = WindowState.Minimized;
- }
-
- /// <summary>
- /// Closes the application button click.
- /// </summary>
- /// <param name="sender">The sender.</param>
- /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
- void CloseApplicationButtonClick(object sender, RoutedEventArgs e)
- {
- App.Instance.Shutdown();
- }
- }
-}
diff --git a/MediaBrowser.UI/Converters/BaseItemImageVisibilityConverter.cs b/MediaBrowser.UI/Converters/BaseItemImageVisibilityConverter.cs
deleted file mode 100644
index 6e69326fc..000000000
--- a/MediaBrowser.UI/Converters/BaseItemImageVisibilityConverter.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Entities;
-using System;
-using System.Windows;
-using System.Windows.Data;
-
-namespace MediaBrowser.UI.Converters
-{
- /// <summary>
- /// Class BaseItemImageVisibilityConverter
- /// </summary>
- class BaseItemImageVisibilityConverter : IValueConverter
- {
- /// <summary>
- /// Converts a value.
- /// </summary>
- /// <param name="value">The value produced by the binding source.</param>
- /// <param name="targetType">The type of the binding target property.</param>
- /// <param name="parameter">The converter parameter to use.</param>
- /// <param name="culture">The culture to use in the converter.</param>
- /// <returns>A converted value. If the method returns null, the valid null value is used.</returns>
- public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- var item = value as BaseItemDto;
-
- if (item != null)
- {
- var paramString = parameter as string;
-
- var vals = paramString.Split(',');
-
- var imageType = (ImageType)Enum.Parse(typeof(ImageType), vals[0], true);
- bool reverse = vals.Length > 1 && vals[1].Equals("reverse", StringComparison.OrdinalIgnoreCase);
-
- return GetVisibility(item, imageType, reverse);
- }
-
- return Visibility.Collapsed;
- }
-
- /// <summary>
- /// Gets the visibility.
- /// </summary>
- /// <param name="item">The item.</param>
- /// <param name="type">The type.</param>
- /// <param name="reverse">if set to <c>true</c> [reverse].</param>
- /// <returns>Visibility.</returns>
- private Visibility GetVisibility(BaseItemDto item, ImageType type, bool reverse)
- {
- var hasImageVisibility = reverse ? Visibility.Collapsed : Visibility.Visible;
- var hasNoImageVisibility = reverse ? Visibility.Visible : Visibility.Collapsed;
-
- if (type == ImageType.Logo)
- {
- return item.HasLogo || !string.IsNullOrEmpty(item.ParentLogoItemId) ? hasImageVisibility : hasNoImageVisibility;
- }
-
- return item.HasPrimaryImage ? hasImageVisibility : hasNoImageVisibility;
- }
-
- /// <summary>
- /// Converts a value.
- /// </summary>
- /// <param name="value">The value that is produced by the binding target.</param>
- /// <param name="targetType">The type to convert to.</param>
- /// <param name="parameter">The converter parameter to use.</param>
- /// <param name="culture">The culture to use in the converter.</param>
- /// <returns>A converted value. If the method returns null, the valid null value is used.</returns>
- /// <exception cref="System.NotImplementedException"></exception>
- public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/MediaBrowser.UI/Converters/CurrentUserVisibilityConverter.cs b/MediaBrowser.UI/Converters/CurrentUserVisibilityConverter.cs
deleted file mode 100644
index c7853ea9c..000000000
--- a/MediaBrowser.UI/Converters/CurrentUserVisibilityConverter.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System;
-using System.Globalization;
-using System.Windows;
-using System.Windows.Data;
-
-namespace MediaBrowser.UI.Converters
-{
- public class CurrentUserVisibilityConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- if (App.Instance.ServerConfiguration == null)
- {
- return Visibility.Collapsed;
- }
-
- return value == null ? Visibility.Collapsed : Visibility.Visible;
- }
-
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/MediaBrowser.UI/Converters/DateTimeToStringConverter.cs b/MediaBrowser.UI/Converters/DateTimeToStringConverter.cs
deleted file mode 100644
index f0c93e7d5..000000000
--- a/MediaBrowser.UI/Converters/DateTimeToStringConverter.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using System;
-using System.Globalization;
-using System.Windows.Data;
-
-namespace MediaBrowser.UI.Converters
-{
- public class DateTimeToStringConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- var date = (DateTime)value;
-
- string format = parameter as string;
-
- if (string.IsNullOrEmpty(format))
- {
- return date.ToString();
- }
-
- // If a theme asks for this, they know it's only going to work if the current culture is en-us
- if (format.Equals("timesuffixlower", StringComparison.OrdinalIgnoreCase))
- {
- if (CultureInfo.CurrentCulture.Name.Equals("en-US", StringComparison.OrdinalIgnoreCase))
- {
- var time = date.ToString("t");
- var values = time.Split(' ');
- return values[values.Length - 1].ToLower();
- }
- return string.Empty;
- }
-
- return date.ToString(format);
- }
-
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/MediaBrowser.UI/Converters/LastSeenTextConverter.cs b/MediaBrowser.UI/Converters/LastSeenTextConverter.cs
deleted file mode 100644
index 13e6c54b9..000000000
--- a/MediaBrowser.UI/Converters/LastSeenTextConverter.cs
+++ /dev/null
@@ -1,86 +0,0 @@
-using MediaBrowser.Model.Dto;
-using System;
-using System.Globalization;
-using System.Windows.Data;
-
-namespace MediaBrowser.UI.Converters
-{
- public class LastSeenTextConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- var user = value as UserDto;
-
- if (user != null)
- {
- if (user.LastActivityDate.HasValue)
- {
- DateTime date = user.LastActivityDate.Value.ToLocalTime();
-
- return "Last seen " + GetRelativeTimeText(date);
- }
- }
-
- return null;
- }
-
- private static string GetRelativeTimeText(DateTime date)
- {
- TimeSpan ts = DateTime.Now - date;
-
- const int second = 1;
- const int minute = 60 * second;
- const int hour = 60 * minute;
- const int day = 24 * hour;
- const int month = 30 * day;
-
- int delta = System.Convert.ToInt32(ts.TotalSeconds);
-
- if (delta < 0)
- {
- return "not yet";
- }
- if (delta < 1 * minute)
- {
- return ts.Seconds == 1 ? "one second ago" : ts.Seconds + " seconds ago";
- }
- if (delta < 2 * minute)
- {
- return "a minute ago";
- }
- if (delta < 45 * minute)
- {
- return ts.Minutes + " minutes ago";
- }
- if (delta < 90 * minute)
- {
- return "an hour ago";
- }
- if (delta < 24 * hour)
- {
- return ts.Hours == 1 ? "an hour ago" : ts.Hours + " hours ago";
- }
- if (delta < 48 * hour)
- {
- return "yesterday";
- }
- if (delta < 30 * day)
- {
- return ts.Days + " days ago";
- }
- if (delta < 12 * month)
- {
- int months = System.Convert.ToInt32(Math.Floor((double)ts.Days / 30));
- return months <= 1 ? "one month ago" : months + " months ago";
- }
-
- int years = System.Convert.ToInt32(Math.Floor((double)ts.Days / 365));
- return years <= 1 ? "one year ago" : years + " years ago";
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/MediaBrowser.UI/Converters/MetroTileBackgroundConverter.cs b/MediaBrowser.UI/Converters/MetroTileBackgroundConverter.cs
deleted file mode 100644
index 6279711e2..000000000
--- a/MediaBrowser.UI/Converters/MetroTileBackgroundConverter.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-using System;
-using System.Globalization;
-using System.Windows.Data;
-using System.Windows.Media;
-
-namespace MediaBrowser.UI.Converters
-{
- /// <summary>
- /// Generates a random metro-friendly background color
- /// </summary>
- public class MetroTileBackgroundConverter : IValueConverter
- {
- private static readonly Brush[] TileColors = new Brush[] {
- new SolidColorBrush(Color.FromRgb((byte)111,(byte)189,(byte)69)),
- new SolidColorBrush(Color.FromRgb((byte)75,(byte)179,(byte)221)),
- new SolidColorBrush(Color.FromRgb((byte)65,(byte)100,(byte)165)),
- new SolidColorBrush(Color.FromRgb((byte)225,(byte)32,(byte)38)),
- new SolidColorBrush(Color.FromRgb((byte)128,(byte)0,(byte)128)),
- new SolidColorBrush(Color.FromRgb((byte)0,(byte)128,(byte)64)),
- new SolidColorBrush(Color.FromRgb((byte)0,(byte)148,(byte)255)),
- new SolidColorBrush(Color.FromRgb((byte)255,(byte)0,(byte)199)),
- new SolidColorBrush(Color.FromRgb((byte)255,(byte)135,(byte)15)),
- new SolidColorBrush(Color.FromRgb((byte)127,(byte)0,(byte)55))
-
- };
-
- private static int _currentIndex = new Random(DateTime.Now.Millisecond).Next(0, TileColors.Length);
-
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- return GetRandomBackground();
- }
-
- public static Brush GetRandomBackground()
- {
- int index;
-
- lock (TileColors)
- {
- index = (_currentIndex++) % TileColors.Length;
- }
-
- return TileColors[index++];
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new System.NotImplementedException();
- }
- }
-}
diff --git a/MediaBrowser.UI/Converters/UserImageConverter.cs b/MediaBrowser.UI/Converters/UserImageConverter.cs
deleted file mode 100644
index f979107c8..000000000
--- a/MediaBrowser.UI/Converters/UserImageConverter.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Net;
-using System;
-using System.Globalization;
-using System.Windows.Data;
-
-namespace MediaBrowser.UI.Converters
-{
- /// <summary>
- /// Class UserImageConverter
- /// </summary>
- public class UserImageConverter : IValueConverter
- {
- /// <summary>
- /// Converts a value.
- /// </summary>
- /// <param name="value">The value produced by the binding source.</param>
- /// <param name="targetType">The type of the binding target property.</param>
- /// <param name="parameter">The converter parameter to use.</param>
- /// <param name="culture">The culture to use in the converter.</param>
- /// <returns>A converted value. If the method returns null, the valid null value is used.</returns>
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- var user = value as UserDto;
-
- if (user != null && user.HasPrimaryImage)
- {
- var config = parameter as string;
-
- int? maxWidth = null;
- int? maxHeight = null;
- int? width = null;
- int? height = null;
-
- if (!string.IsNullOrEmpty(config))
- {
- var vals = config.Split(',');
-
- width = GetSize(vals[0]);
- height = GetSize(vals[1]);
- maxWidth = GetSize(vals[2]);
- maxHeight = GetSize(vals[3]);
- }
-
- var uri = App.Instance.ApiClient.GetUserImageUrl(user, new ImageOptions
- {
- Width = width,
- Height = height,
- MaxWidth = maxWidth,
- MaxHeight = maxHeight,
- Quality = 100
- });
-
- try
- {
- return App.Instance.GetRemoteBitmapAsync(uri).Result;
- }
- catch (HttpException)
- {
-
- }
- }
-
- return null;
- }
-
- /// <summary>
- /// Gets the size.
- /// </summary>
- /// <param name="val">The val.</param>
- /// <returns>System.Nullable{System.Int32}.</returns>
- private int? GetSize(string val)
- {
- if (string.IsNullOrEmpty(val) || val == "0")
- {
- return null;
- }
-
- return int.Parse(val);
- }
-
-
- /// <summary>
- /// Converts a value.
- /// </summary>
- /// <param name="value">The value that is produced by the binding target.</param>
- /// <param name="targetType">The type to convert to.</param>
- /// <param name="parameter">The converter parameter to use.</param>
- /// <param name="culture">The culture to use in the converter.</param>
- /// <returns>A converted value. If the method returns null, the valid null value is used.</returns>
- /// <exception cref="System.NotImplementedException"></exception>
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/MediaBrowser.UI/Converters/WatchedVisibilityConverter.cs b/MediaBrowser.UI/Converters/WatchedVisibilityConverter.cs
deleted file mode 100644
index 797bb5488..000000000
--- a/MediaBrowser.UI/Converters/WatchedVisibilityConverter.cs
+++ /dev/null
@@ -1,117 +0,0 @@
-using MediaBrowser.Model.Dto;
-using System;
-using System.Globalization;
-using System.Windows;
-using System.Windows.Data;
-
-namespace MediaBrowser.UI.Converters
-{
- public class WatchedVisibilityConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- var item = value as BaseItemDto;
-
- if (item == null)
- {
- return null;
- }
-
- if (item.IsFolder)
- {
- return item.PlayedPercentage.HasValue && item.PlayedPercentage.Value == 100 ? Visibility.Visible : Visibility.Collapsed;
- }
-
- if (item.UserData == null)
- {
- return Visibility.Collapsed;
- }
-
- return item.UserData.PlayCount == 0 ? Visibility.Collapsed : Visibility.Visible;
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
-
- public class FavoriteVisibilityConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- var item = value as BaseItemDto;
-
- if (item == null)
- {
- return null;
- }
-
- if (item.UserData == null)
- {
- return Visibility.Collapsed;
- }
-
- return item.UserData.IsFavorite ? Visibility.Visible : Visibility.Collapsed;
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
-
- public class LikeVisibilityConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- var item = value as BaseItemDto;
-
- if (item == null)
- {
- return null;
- }
-
- if (item.UserData == null)
- {
- return Visibility.Collapsed;
- }
-
- var userdata = item.UserData;
-
- return userdata.Likes.HasValue && userdata.Likes.Value && !userdata.IsFavorite ? Visibility.Visible : Visibility.Collapsed;
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
-
- public class DislikeVisibilityConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- var item = value as BaseItemDto;
-
- if (item == null)
- {
- return null;
- }
-
- if (item.UserData == null)
- {
- return Visibility.Collapsed;
- }
-
- var userdata = item.UserData;
-
- return userdata.Likes.HasValue && !userdata.Likes.Value && !userdata.IsFavorite ? Visibility.Visible : Visibility.Collapsed;
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/MediaBrowser.UI/Converters/WeatherTemperatureConverter.cs b/MediaBrowser.UI/Converters/WeatherTemperatureConverter.cs
deleted file mode 100644
index c297df4f0..000000000
--- a/MediaBrowser.UI/Converters/WeatherTemperatureConverter.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using MediaBrowser.Model.Weather;
-using System;
-using System.Globalization;
-using System.Windows.Data;
-
-namespace MediaBrowser.UI.Converters
-{
- public class WeatherTemperatureConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- var weather = value as WeatherInfo;
-
- if (weather != null && weather.CurrentWeather != null)
- {
- if (App.Instance.ServerConfiguration.WeatherUnit == WeatherUnits.Celsius)
- {
- return weather.CurrentWeather.TemperatureCelsius + "°C";
- }
-
- return weather.CurrentWeather.TemperatureFahrenheit + "°F";
- }
- return null;
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/MediaBrowser.UI/Converters/WeatherVisibilityConverter.cs b/MediaBrowser.UI/Converters/WeatherVisibilityConverter.cs
deleted file mode 100644
index 5706ecec9..000000000
--- a/MediaBrowser.UI/Converters/WeatherVisibilityConverter.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using System;
-using System.Globalization;
-using System.Windows;
-using System.Windows.Data;
-
-namespace MediaBrowser.UI.Converters
-{
- public class WeatherVisibilityConverter : IValueConverter
- {
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- return value == null ? Visibility.Collapsed : Visibility.Visible;
- }
-
- public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/MediaBrowser.UI/Extensions/Extensions.cs b/MediaBrowser.UI/Extensions/Extensions.cs
deleted file mode 100644
index 1d0d7d1c2..000000000
--- a/MediaBrowser.UI/Extensions/Extensions.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System;
-using System.Windows.Threading;
-
-namespace MediaBrowser.UI.Extensions
-{
- public static class Extensions
- {
- /// <summary>
- /// Invokes an action after a specified delay
- /// </summary>
- /// <param name="dispatcher">The dispatcher.</param>
- /// <param name="action">The action.</param>
- /// <param name="delayMs">The delay ms.</param>
- public static void InvokeWithDelay(this Dispatcher dispatcher, Action action, long delayMs)
- {
- var timer = new DispatcherTimer(DispatcherPriority.Normal, dispatcher);
- timer.Interval = TimeSpan.FromMilliseconds(delayMs);
- timer.Tick += (sender, args) =>
- {
- timer.Stop();
- action();
- };
- timer.Start();
- }
- }
-}
diff --git a/MediaBrowser.UI/HiddenWindow.xaml b/MediaBrowser.UI/HiddenWindow.xaml
deleted file mode 100644
index 60afccbe7..000000000
--- a/MediaBrowser.UI/HiddenWindow.xaml
+++ /dev/null
@@ -1,9 +0,0 @@
-<Window x:Class="MediaBrowser.UI.HiddenWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- Title="Media Browser Theater"
- WindowStartupLocation="Manual" ResizeMode="NoResize" WindowStyle="None" BorderThickness="1" Background="Black">
- <Grid x:Name="MainGrid">
- <my:WindowsFormsHost Name="WindowsFormsHost" xmlns:my="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration" />
- </Grid>
-</Window>
diff --git a/MediaBrowser.UI/HiddenWindow.xaml.cs b/MediaBrowser.UI/HiddenWindow.xaml.cs
deleted file mode 100644
index e2f8f7a37..000000000
--- a/MediaBrowser.UI/HiddenWindow.xaml.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using System.Windows;
-using MediaBrowser.UI.Controller;
-
-namespace MediaBrowser.UI
-{
- /// <summary>
- /// Interaction logic for HiddenWindow.xaml
- /// </summary>
- public partial class HiddenWindow : Window
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="HiddenWindow" /> class.
- /// </summary>
- public HiddenWindow()
- {
- InitializeComponent();
-
- Loaded += HiddenWindow_Loaded;
- }
-
- /// <summary>
- /// Handles the Loaded event of the HiddenWindow 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 HiddenWindow_Loaded(object sender, RoutedEventArgs e)
- {
- Title += " " + UIKernel.Instance.ApplicationVersion.ToString();
- }
- }
-}
diff --git a/MediaBrowser.UI/ImageViewerWindow.xaml b/MediaBrowser.UI/ImageViewerWindow.xaml
deleted file mode 100644
index a36bcf42f..000000000
--- a/MediaBrowser.UI/ImageViewerWindow.xaml
+++ /dev/null
@@ -1,9 +0,0 @@
-<controls:BaseModalWindow x:Class="MediaBrowser.UI.ImageViewerWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- Title="ImageViewerWindow" Height="300" Width="300">
- <Grid>
- <Image x:Name="Image" Stretch="Uniform"></Image>
- </Grid>
-</controls:BaseModalWindow>
diff --git a/MediaBrowser.UI/ImageViewerWindow.xaml.cs b/MediaBrowser.UI/ImageViewerWindow.xaml.cs
deleted file mode 100644
index a8baa3e9f..000000000
--- a/MediaBrowser.UI/ImageViewerWindow.xaml.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using MediaBrowser.UI.Controls;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace MediaBrowser.UI
-{
- /// <summary>
- /// Interaction logic for ImageViewerWindow.xaml
- /// </summary>
- public partial class ImageViewerWindow : BaseModalWindow
- {
- /// <summary>
- /// Gets or sets the images.
- /// </summary>
- /// <value>The images.</value>
- private IEnumerable<Tuple<Uri, string>> Images { get; set; }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="ImageViewerWindow" /> class.
- /// </summary>
- /// <param name="images">The images.</param>
- public ImageViewerWindow(IEnumerable<Tuple<Uri, string>> images)
- : base()
- {
- InitializeComponent();
-
- Images = images;
- }
-
- /// <summary>
- /// Called when [loaded].
- /// </summary>
- protected override void OnLoaded()
- {
- base.OnLoaded();
-
- //Image.Source = App.Instance.GetBitmapImage(Images.First().Item1);
- }
- }
-}
diff --git a/MediaBrowser.UI/MainWindow.xaml b/MediaBrowser.UI/MainWindow.xaml
deleted file mode 100644
index 6e8d494ef..000000000
--- a/MediaBrowser.UI/MainWindow.xaml
+++ /dev/null
@@ -1,55 +0,0 @@
-<controls2:BaseWindow x:Class="MediaBrowser.UI.MainWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls"
- xmlns:ee="http://schemas.microsoft.com/expression/2010/effects"
- xmlns:controls2="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls"
- Title="Media Browser Theater"
- Style="{StaticResource MainWindow}"
- WindowStartupLocation="CenterScreen"
- AllowsTransparency="True"
- WindowStyle="None"
- ResizeMode="CanResizeWithGrip"
- KeyboardNavigation.DirectionalNavigation="Contained"
- MinWidth="720"
- MinHeight="480"
- Background="Transparent"
- ShowInTaskbar="False">
-
- <!--The window itself is a tabstop, and it can't be disabled. So this is a workaround.-->
- <Grid x:Name="mainGrid">
-
- <Grid x:Name="InternalPlayerContainer"></Grid>
-
- <!--This allows the user to drag the window.-->
- <Grid x:Name="DragBar" Style="{StaticResource DragBar}"></Grid>
-
- <!--This allows the user to drag the window.-->
- <controls:WindowCommands x:Name="WindowCommands" Style="{StaticResource WindowCommands}"></controls:WindowCommands>
-
- <Grid x:Name="WindowBackgroundContent" Style="{StaticResource WindowBackgroundContent}">
- </Grid>
-
- <controls2:TransitionControl x:Name="BackdropContainer">
- <controls2:TransitionControl.TransitionAnimation>
- <DoubleAnimation Duration="0:0:1" >
- <DoubleAnimation.EasingFunction>
- <ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
- </DoubleAnimation.EasingFunction>
- </DoubleAnimation>
- </controls2:TransitionControl.TransitionAnimation>
- <controls2:TransitionControl.TransitionType>
- <ee:FadeTransitionEffect></ee:FadeTransitionEffect>
- </controls2:TransitionControl.TransitionType>
- </controls2:TransitionControl>
-
- <!--Themes will supply this template to outline the window structure.-->
- <ContentControl x:Name="PageContent" Template="{StaticResource PageContentTemplate}"></ContentControl>
-
- <controls:NavigationBar></controls:NavigationBar>
-
- <Grid.LayoutTransform>
- <ScaleTransform ScaleX="{Binding Path=ApplicationWindow.ContentScale}" ScaleY="{Binding Path=ApplicationWindow.ContentScale}" CenterX="0" CenterY="0" />
- </Grid.LayoutTransform>
- </Grid>
-</controls2:BaseWindow>
diff --git a/MediaBrowser.UI/MainWindow.xaml.cs b/MediaBrowser.UI/MainWindow.xaml.cs
deleted file mode 100644
index d3307e913..000000000
--- a/MediaBrowser.UI/MainWindow.xaml.cs
+++ /dev/null
@@ -1,507 +0,0 @@
-using MediaBrowser.Common.Extensions;
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Logging;
-using MediaBrowser.Model.Net;
-using MediaBrowser.UI.Controller;
-using MediaBrowser.UI.Controls;
-using System;
-using System.Linq;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Input;
-using MediaBrowser.UI.Extensions;
-
-namespace MediaBrowser.UI
-{
- /// <summary>
- /// Interaction logic for MainWindow.xaml
- /// </summary>
- public partial class MainWindow : BaseWindow, IDisposable
- {
- /// <summary>
- /// Gets or sets the mouse idle timer.
- /// </summary>
- /// <value>The mouse idle timer.</value>
- private Timer MouseIdleTimer { get; set; }
- /// <summary>
- /// Gets or sets the backdrop timer.
- /// </summary>
- /// <value>The backdrop timer.</value>
- private Timer BackdropTimer { get; set; }
- /// <summary>
- /// Gets or sets the current backdrops.
- /// </summary>
- /// <value>The current backdrops.</value>
- private string[] CurrentBackdrops { get; set; }
-
- /// <summary>
- /// The _current backdrop index
- /// </summary>
- private int _currentBackdropIndex;
- /// <summary>
- /// Gets or sets the index of the current backdrop.
- /// </summary>
- /// <value>The index of the current backdrop.</value>
- public int CurrentBackdropIndex
- {
- get { return _currentBackdropIndex; }
- set
- {
- _currentBackdropIndex = value;
- OnPropertyChanged("CurrentBackdropIndex");
- Dispatcher.InvokeAsync(OnBackdropIndexChanged);
- }
- }
-
- /// <summary>
- /// The _is mouse idle
- /// </summary>
- private bool _isMouseIdle = true;
- /// <summary>
- /// Gets or sets a value indicating whether this instance is mouse idle.
- /// </summary>
- /// <value><c>true</c> if this instance is mouse idle; otherwise, <c>false</c>.</value>
- public bool IsMouseIdle
- {
- get { return _isMouseIdle; }
- set
- {
- _isMouseIdle = value;
-
- Dispatcher.InvokeAsync(() => Cursor = value ? Cursors.None : Cursors.Arrow);
-
- OnPropertyChanged("IsMouseIdle");
- }
- }
-
- private readonly ILogger _logger;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="MainWindow" /> class.
- /// </summary>
- public MainWindow(ILogger logger)
- : base()
- {
- _logger = logger;
-
- InitializeComponent();
- }
-
- /// <summary>
- /// Called when [loaded].
- /// </summary>
- protected override void OnLoaded()
- {
- base.OnLoaded();
-
- DragBar.MouseDown += DragableGridMouseDown;
-
- DataContext = App.Instance;
- }
-
- /// <summary>
- /// Loads the initial UI.
- /// </summary>
- /// <returns>Task.</returns>
- internal Task LoadInitialUI()
- {
- return LoadInitialPage();
- }
-
- /// <summary>
- /// Called when [backdrop index changed].
- /// </summary>
- private async void OnBackdropIndexChanged()
- {
- var currentBackdropIndex = CurrentBackdropIndex;
-
- if (currentBackdropIndex == -1 )
- {
- // Setting this to null doesn't seem to clear out the content
- // Have to check it for null or get startup errors
- if (BackdropContainer.Content != null)
- {
- BackdropContainer.Content = new FrameworkElement();
- }
- return;
- }
-
- try
- {
- var bitmap = await App.Instance.GetRemoteBitmapAsync(CurrentBackdrops[currentBackdropIndex]);
-
- var img = new Image
- {
- Source = bitmap
- };
-
- img.SetResourceReference(StyleProperty, "BackdropImage");
-
- BackdropContainer.Content = img;
- }
- catch (HttpException)
- {
- if (currentBackdropIndex == 0)
- {
- BackdropContainer.Content = new FrameworkElement();
- }
- }
- }
-
- /// <summary>
- /// Loads the initial page.
- /// </summary>
- /// <returns>Task.</returns>
- private Task LoadInitialPage()
- {
- return App.Instance.LogoutUser();
- }
-
- /// <summary>
- /// Dragables the grid mouse down.
- /// </summary>
- /// <param name="sender">The sender.</param>
- /// <param name="e">The <see cref="MouseButtonEventArgs" /> instance containing the event data.</param>
- private void DragableGridMouseDown(object sender, MouseButtonEventArgs e)
- {
- if (e.ClickCount == 2)
- {
- WindowState = WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized;
- }
- else if (e.LeftButton == MouseButtonState.Pressed)
- {
- DragMove();
- }
- }
-
- /// <summary>
- /// Gets the page frame.
- /// </summary>
- /// <value>The page frame.</value>
- private TransitionFrame PageFrame
- {
- get
- {
- // Finding the grid that is generated by the ControlTemplate of the Button
- return TreeHelper.FindChild<TransitionFrame>(PageContent, "PageFrame");
- }
- }
-
- /// <summary>
- /// Navigates the specified page.
- /// </summary>
- /// <param name="page">The page.</param>
- internal void Navigate(Page page)
- {
- _logger.Info("Navigating to " + page.GetType().Name);
-
- Dispatcher.InvokeAsync(() => PageFrame.NavigateWithTransition(page));
- }
-
- /// <summary>
- /// Sets the backdrop based on a BaseItemDto
- /// </summary>
- /// <param name="item">The item.</param>
- public void SetBackdrops(BaseItemDto item)
- {
- var urls = App.Instance.ApiClient.GetBackdropImageUrls(item, new ImageOptions
- {
- MaxWidth = Convert.ToInt32(SystemParameters.VirtualScreenWidth),
- MaxHeight = Convert.ToInt32(SystemParameters.VirtualScreenHeight)
- });
-
- SetBackdrops(urls);
- }
-
- /// <summary>
- /// Sets the backdrop based on a list of image files
- /// </summary>
- /// <param name="backdrops">The backdrops.</param>
- public void SetBackdrops(string[] backdrops)
- {
- // Don't reload the same backdrops
- if (CurrentBackdrops != null && backdrops.SequenceEqual(CurrentBackdrops))
- {
- return;
- }
-
- DisposeBackdropTimer();
- CurrentBackdrops = backdrops;
-
- if (backdrops == null || backdrops.Length == 0)
- {
- CurrentBackdropIndex = -1;
-
- // Setting this to null doesn't seem to clear out the content
- // Have to check it for null or get startup errors
- if (BackdropContainer.Content != null)
- {
- BackdropContainer.Content = new FrameworkElement();
- }
- return;
- }
-
- CurrentBackdropIndex = 0;
-
- // We only need the timer if there's more than one backdrop
- if (backdrops != null && backdrops.Length > 1)
- {
- BackdropTimer = new Timer(state =>
- {
- // Don't display backdrops during video playback
- if (UIKernel.Instance.PlaybackManager.ActivePlayers.Any(p => p.CurrentMedia.IsVideo))
- {
- return;
- }
-
- var index = CurrentBackdropIndex + 1;
-
- if (index >= backdrops.Length)
- {
- index = 0;
- }
-
- CurrentBackdropIndex = index;
-
- }, null, 5000, 5000);
- }
- }
-
- /// <summary>
- /// Disposes the backdrop timer.
- /// </summary>
- public void DisposeBackdropTimer()
- {
- if (BackdropTimer != null)
- {
- BackdropTimer.Dispose();
- }
- }
-
- /// <summary>
- /// Disposes the mouse idle timer.
- /// </summary>
- public void DisposeMouseIdleTimer()
- {
- if (MouseIdleTimer != null)
- {
- MouseIdleTimer.Dispose();
- }
- }
-
- /// <summary>
- /// Clears the backdrops.
- /// </summary>
- public void ClearBackdrops()
- {
- SetBackdrops(new string[] { });
- }
-
- /// <summary>
- /// Navigates the back.
- /// </summary>
- public void NavigateBack()
- {
- Dispatcher.InvokeAsync(() =>
- {
- if (PageFrame.NavigationService.CanGoBack)
- {
- PageFrame.GoBackWithTransition();
- }
- });
- }
-
- /// <summary>
- /// Navigates the forward.
- /// </summary>
- public void NavigateForward()
- {
- Dispatcher.InvokeAsync(() =>
- {
- if (PageFrame.NavigationService.CanGoForward)
- {
- PageFrame.GoForwardWithTransition();
- }
- });
- }
-
- /// <summary>
- /// Called when [browser back].
- /// </summary>
- protected override void OnBrowserBack()
- {
- base.OnBrowserBack();
-
- NavigateBack();
- }
-
- /// <summary>
- /// Called when [browser forward].
- /// </summary>
- protected override void OnBrowserForward()
- {
- base.OnBrowserForward();
-
- NavigateForward();
- }
-
- /// <summary>
- /// Shows the control bar then starts a timer to hide it
- /// </summary>
- private void StartMouseIdleTimer()
- {
- IsMouseIdle = false;
-
- const int duration = 4000;
-
- // Start the timer if it's null, otherwise reset it
- if (MouseIdleTimer == null)
- {
- MouseIdleTimer = new Timer(MouseIdleTimerCallback, null, duration, Timeout.Infinite);
- }
- else
- {
- MouseIdleTimer.Change(duration, Timeout.Infinite);
- }
- }
-
- /// <summary>
- /// This is the Timer callback method to hide the control bar
- /// </summary>
- /// <param name="stateInfo">The state info.</param>
- private void MouseIdleTimerCallback(object stateInfo)
- {
- IsMouseIdle = true;
-
- if (MouseIdleTimer != null)
- {
- MouseIdleTimer.Dispose();
- MouseIdleTimer = null;
- }
- }
-
- /// <summary>
- /// The _last mouse move point
- /// </summary>
- private Point _lastMouseMovePoint;
-
- /// <summary>
- /// Handles OnMouseMove to show the control box
- /// </summary>
- /// <param name="e">The <see cref="T:System.Windows.Input.MouseEventArgs" /> that contains the event data.</param>
- protected override void OnMouseMove(MouseEventArgs e)
- {
- base.OnMouseMove(e);
-
- // Store the last position for comparison purposes
- // Even if the mouse is not moving this event will fire as elements are showing and hiding
- var pos = e.GetPosition(this);
-
- if (pos == _lastMouseMovePoint)
- {
- return;
- }
-
- _lastMouseMovePoint = pos;
-
- StartMouseIdleTimer();
- }
-
- /// <summary>
- /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
- /// </summary>
- public void Dispose()
- {
- DisposeBackdropTimer();
- DisposeMouseIdleTimer();
- }
-
- /// <summary>
- /// Shows a notification message that will disappear on it's own
- /// </summary>
- /// <param name="text">The text.</param>
- /// <param name="caption">The caption.</param>
- /// <param name="icon">The icon.</param>
- public void ShowNotificationMessage(string text, string caption = null, MessageBoxIcon icon = MessageBoxIcon.None)
- {
- var control = new NotificationMessage
- {
- Caption = caption,
- Text = text,
- MessageBoxImage = icon
- };
-
- mainGrid.Children.Add(control);
-
- Dispatcher.InvokeWithDelay(() => mainGrid.Children.Remove(control), 5000);
- }
-
- /// <summary>
- /// Shows a notification message that will disappear on it's own
- /// </summary>
- /// <param name="text">The text.</param>
- /// <param name="caption">The caption.</param>
- /// <param name="icon">The icon.</param>
- public void ShowNotificationMessage(UIElement text, string caption = null, MessageBoxIcon icon = MessageBoxIcon.None)
- {
- var control = new NotificationMessage
- {
- Caption = caption,
- TextContent = text,
- MessageBoxImage = icon
- };
-
- mainGrid.Children.Add(control);
-
- Dispatcher.InvokeWithDelay(() => mainGrid.Children.Remove(control), 5000);
- }
-
- /// <summary>
- /// Shows a modal message box and asynchronously returns a MessageBoxResult
- /// </summary>
- /// <param name="text">The text.</param>
- /// <param name="caption">The caption.</param>
- /// <param name="button">The button.</param>
- /// <param name="icon">The icon.</param>
- /// <returns>MessageBoxResult.</returns>
- public MessageBoxResult ShowModalMessage(string text, string caption = null, MessageBoxButton button = MessageBoxButton.OK, MessageBoxIcon icon = MessageBoxIcon.None)
- {
- var win = new ModalWindow
- {
- Caption = caption,
- Button = button,
- MessageBoxImage = icon,
- Text = text
- };
-
- win.ShowModal(this);
-
- return win.MessageBoxResult;
- }
-
- /// <summary>
- /// Shows a modal message box and asynchronously returns a MessageBoxResult
- /// </summary>
- /// <param name="text">The text.</param>
- /// <param name="caption">The caption.</param>
- /// <param name="button">The button.</param>
- /// <param name="icon">The icon.</param>
- /// <returns>MessageBoxResult.</returns>
- public MessageBoxResult ShowModalMessage(UIElement text, string caption = null, MessageBoxButton button = MessageBoxButton.OK, MessageBoxIcon icon = MessageBoxIcon.None)
- {
- var win = new ModalWindow
- {
- Caption = caption,
- Button = button,
- MessageBoxImage = icon,
- TextContent = text
- };
-
- win.ShowModal(this);
-
- return win.MessageBoxResult;
- }
- }
-}
diff --git a/MediaBrowser.UI/MediaBrowser.UI.csproj b/MediaBrowser.UI/MediaBrowser.UI.csproj
deleted file mode 100644
index 1f8469cbc..000000000
--- a/MediaBrowser.UI/MediaBrowser.UI.csproj
+++ /dev/null
@@ -1,1330 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{B5ECE1FB-618E-420B-9A99-8E972D76920A}</ProjectGuid>
- <OutputType>WinExe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>MediaBrowser.UI</RootNamespace>
- <AssemblyName>MediaBrowser.UI</AssemblyName>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <WarningLevel>4</WarningLevel>
- <IsWebBootstrapper>true</IsWebBootstrapper>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
- <RestorePackages>true</RestorePackages>
- <PublishUrl>http://www.mb3admin.com/downloads/stdui/</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Web</InstallFrom>
- <UpdateEnabled>false</UpdateEnabled>
- <UpdateMode>Background</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <SupportUrl>http://forum.mediabrowser3.com</SupportUrl>
- <ProductName>Media Browser Theater</ProductName>
- <PublisherName>Media Browser Team</PublisherName>
- <SuiteName>Media Browser 3</SuiteName>
- <ApplicationRevision>2646</ApplicationRevision>
- <ApplicationVersion>2.9.4795.2646</ApplicationVersion>
- <UseApplicationTrust>false</UseApplicationTrust>
- <CreateDesktopShortcut>true</CreateDesktopShortcut>
- <PublishWizardCompleted>true</PublishWizardCompleted>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <PlatformTarget>AnyCPU</PlatformTarget>
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup>
- <StartupObject>
- </StartupObject>
- </PropertyGroup>
- <PropertyGroup>
- <ApplicationIcon>Resources\Images\Icon.ico</ApplicationIcon>
- </PropertyGroup>
- <PropertyGroup>
- <ManifestCertificateThumbprint>9633DCDB4A07D3328EFB99299C6DFB1823EBC4BE</ManifestCertificateThumbprint>
- </PropertyGroup>
- <PropertyGroup>
- <ManifestKeyFile>MediaBrowser.UI_TemporaryKey.pfx</ManifestKeyFile>
- </PropertyGroup>
- <PropertyGroup>
- <GenerateManifests>true</GenerateManifests>
- </PropertyGroup>
- <PropertyGroup>
- <SignManifests>true</SignManifests>
- </PropertyGroup>
- <PropertyGroup>
- <ManifestTimestampUrl>http://timestamp.verisign.com/scripts/timstamp.dll</ManifestTimestampUrl>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
- <PlatformTarget>x86</PlatformTarget>
- <OutputPath>bin\x86\Debug\</OutputPath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
- <PlatformTarget>x86</PlatformTarget>
- <OutputPath>bin\x86\Release\</OutputPath>
- </PropertyGroup>
- <PropertyGroup />
- <PropertyGroup>
- <NoWin32Manifest>true</NoWin32Manifest>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Declarations">
- <HintPath>..\ThirdParty\Taygeta\Declarations.dll</HintPath>
- </Reference>
- <Reference Include="Implementation">
- <HintPath>..\ThirdParty\Taygeta\Implementation.dll</HintPath>
- </Reference>
- <Reference Include="LibVlcWrapper">
- <HintPath>..\ThirdParty\Taygeta\LibVlcWrapper.dll</HintPath>
- </Reference>
- <Reference Include="MahApps.Metro">
- <HintPath>..\packages\MahApps.Metro.0.10.1.21-ALPHA\lib\net40\MahApps.Metro.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Expression.Effects, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\ThirdParty\Expression\Microsoft.Expression.Effects.dll</HintPath>
- </Reference>
- <Reference Include="Microsoft.Expression.Interactions, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\ThirdParty\Expression\Microsoft.Expression.Interactions.dll</HintPath>
- </Reference>
- <Reference Include="NLog">
- <HintPath>..\packages\NLog.2.0.0.2000\lib\net40\NLog.dll</HintPath>
- </Reference>
- <Reference Include="protobuf-net, Version=2.0.0.621, Culture=neutral, PublicKeyToken=257b51d87d2e4d67, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\packages\protobuf-net.2.0.0.621\lib\net40\protobuf-net.dll</HintPath>
- </Reference>
- <Reference Include="SimpleInjector">
- <HintPath>..\packages\SimpleInjector.2.0.0-beta5\lib\net40-client\SimpleInjector.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Net" />
- <Reference Include="System.Net.Http" />
- <Reference Include="System.Net.Http.WebRequest" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Windows.Interactivity">
- <HintPath>..\packages\MahApps.Metro.0.10.1.21-ALPHA\lib\net40\System.Windows.Interactivity.dll</HintPath>
- </Reference>
- <Reference Include="System.Xml" />
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="System.Core" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="System.Xaml">
- <RequiredTargetFramework>4.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="WindowsBase" />
- <Reference Include="PresentationCore" />
- <Reference Include="PresentationFramework" />
- <Reference Include="WindowsFormsIntegration" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Configuration\PlayerConfiguration.cs" />
- <Compile Include="Configuration\UIApplicationConfiguration.cs" />
- <Compile Include="Configuration\UIApplicationPaths.cs" />
- <Compile Include="Controller\BaseTheme.cs" />
- <Compile Include="Controller\PluginUpdater.cs" />
- <Compile Include="Controls\NavigationBar.xaml.cs">
- <DependentUpon>NavigationBar.xaml</DependentUpon>
- </Compile>
- <Compile Include="Controls\ModalWindow.xaml.cs">
- <DependentUpon>ModalWindow.xaml</DependentUpon>
- </Compile>
- <Compile Include="Controls\NotificationMessage.xaml.cs">
- <DependentUpon>NotificationMessage.xaml</DependentUpon>
- </Compile>
- <Compile Include="Extensions\Extensions.cs" />
- <Compile Include="HiddenWindow.xaml.cs">
- <DependentUpon>HiddenWindow.xaml</DependentUpon>
- </Compile>
- <Compile Include="ImageViewerWindow.xaml.cs">
- <DependentUpon>ImageViewerWindow.xaml</DependentUpon>
- </Compile>
- <Compile Include="Pages\BaseInternalPlayerPage.cs" />
- <Compile Include="Playback\BaseMediaPlayer.cs" />
- <Compile Include="Playback\ExternalPlayer\BaseExternalPlayer.cs" />
- <Compile Include="Playback\ExternalPlayer\GenericExternalPlayer.cs" />
- <Compile Include="Playback\InternalPlayer\BaseInternalMediaPlayer.cs" />
- <Compile Include="Playback\NVlc\InternalMediaPlayerNVlc.cs" />
- <Compile Include="Playback\PlaybackEventArgs.cs" />
- <Compile Include="Playback\PlaybackManager.cs" />
- <Compile Include="Playback\PlayOptions.cs" />
- <Compile Include="Playback\PlayState.cs" />
- <Compile Include="UserInput\KeyboardListener.cs" />
- <Compile Include="ViewModels\BaseItemPersonViewModel.cs" />
- <Compile Include="ViewModels\BaseViewModel.cs" />
- <Compile Include="Controls\WindowCommands.xaml.cs">
- <DependentUpon>WindowCommands.xaml</DependentUpon>
- </Compile>
- <Compile Include="Converters\BaseItemImageVisibilityConverter.cs" />
- <Compile Include="Converters\CurrentUserVisibilityConverter.cs" />
- <Compile Include="Converters\DateTimeToStringConverter.cs" />
- <Compile Include="Converters\LastSeenTextConverter.cs" />
- <Compile Include="Converters\MetroTileBackgroundConverter.cs" />
- <Compile Include="Converters\WatchedVisibilityConverter.cs" />
- <Compile Include="Converters\WeatherTemperatureConverter.cs" />
- <Compile Include="Converters\WeatherVisibilityConverter.cs" />
- <Compile Include="Controller\UIKernel.cs" />
- <Compile Include="Pages\BaseDetailPage.cs" />
- <Compile Include="Pages\BaseFolderPage.cs" />
- <Compile Include="Pages\BaseHomePage.cs" />
- <Compile Include="Pages\BaseListPage.cs" />
- <Compile Include="Pages\BaseLoginPage.cs" />
- <Compile Include="ViewModels\ChapterInfoDtoViewModel.cs" />
- <Compile Include="ViewModels\DtoBaseItemViewModel.cs" />
- <Compile Include="ViewModels\ItemCollectionViewModel.cs" />
- <Compile Include="ViewModels\SpecialFeatureViewModel.cs" />
- <Page Include="App.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
- <Page Include="Controls\ModalWindow.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Controls\NavigationBar.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Controls\NotificationMessage.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Controls\WindowCommands.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
- <Page Include="HiddenWindow.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="ImageViewerWindow.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="MainWindow.xaml">
- <Generator>MSBuild:Compile</Generator>
- <SubType>Designer</SubType>
- </Page>
- <Compile Include="App.xaml.cs">
- <DependentUpon>App.xaml</DependentUpon>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="Pages\BasePage.cs" />
- <Compile Include="Converters\UserImageConverter.cs" />
- <Compile Include="MainWindow.xaml.cs">
- <DependentUpon>MainWindow.xaml</DependentUpon>
- <SubType>Code</SubType>
- </Compile>
- <Page Include="Pages\SettingsPage.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Resources\AppResources.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Resources\MainWindowResources.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Resources\ModalMessage.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Resources\NavBarResources.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- <Page Include="Resources\NotificationMessage.xaml">
- <SubType>Designer</SubType>
- <Generator>MSBuild:Compile</Generator>
- </Page>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Pages\BaseWeatherPage.cs" />
- <Compile Include="Pages\SettingsPage.xaml.cs">
- <DependentUpon>SettingsPage.xaml</DependentUpon>
- </Compile>
- <Compile Include="Properties\AssemblyInfo.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="Properties\Resources.Designer.cs">
- <AutoGen>True</AutoGen>
- <DesignTime>True</DesignTime>
- <DependentUpon>Resources.resx</DependentUpon>
- </Compile>
- <Compile Include="Properties\Settings.Designer.cs">
- <AutoGen>True</AutoGen>
- <DependentUpon>Settings.settings</DependentUpon>
- <DesignTimeSharedInput>True</DesignTimeSharedInput>
- </Compile>
- <EmbeddedResource Include="Properties\Resources.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>Resources.Designer.cs</LastGenOutput>
- </EmbeddedResource>
- <None Include="MediaBrowser.UI_TemporaryKey.pfx" />
- <None Include="packages.config" />
- <None Include="Properties\Settings.settings">
- <Generator>SettingsSingleFileGenerator</Generator>
- <LastGenOutput>Settings.Designer.cs</LastGenOutput>
- </None>
- <AppDesigner Include="Properties\" />
- </ItemGroup>
- <ItemGroup>
- <None Include="App.config">
- <SubType>Designer</SubType>
- </None>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\MediaBrowser.ApiInteraction\MediaBrowser.ApiInteraction.csproj">
- <Project>{921c0f64-fda7-4e9f-9e73-0cb0eedb2422}</Project>
- <Name>MediaBrowser.ApiInteraction</Name>
- </ProjectReference>
- <ProjectReference Include="..\MediaBrowser.ClickOnce\MediaBrowser.ClickOnce.csproj">
- <Project>{cc96bf3e-0bda-4809-bc4b-bb6d418f4a84}</Project>
- <Name>MediaBrowser.ClickOnce</Name>
- </ProjectReference>
- <ProjectReference Include="..\MediaBrowser.Common\MediaBrowser.Common.csproj">
- <Project>{9142eefa-7570-41e1-bfcc-468bb571af2f}</Project>
- <Name>MediaBrowser.Common</Name>
- </ProjectReference>
- <ProjectReference Include="..\MediaBrowser.IsoMounter\MediaBrowser.IsoMounter.csproj">
- <Project>{5356ae30-6a6e-4a64-81e3-f76c50595e64}</Project>
- <Name>MediaBrowser.IsoMounter</Name>
- </ProjectReference>
- <ProjectReference Include="..\MediaBrowser.Logging.NLog\MediaBrowser.Logging.NLog.csproj">
- <Project>{67310740-0ec4-4dc2-9921-33df38b20167}</Project>
- <Name>MediaBrowser.Logging.NLog</Name>
- </ProjectReference>
- <ProjectReference Include="..\MediaBrowser.Model\MediaBrowser.Model.csproj">
- <Project>{7eeeb4bb-f3e8-48fc-b4c5-70f0fff8329b}</Project>
- <Name>MediaBrowser.Model</Name>
- </ProjectReference>
- <ProjectReference Include="..\MediaBrowser.UI.Controls\MediaBrowser.UI.Controls.csproj">
- <Project>{1adfe460-fd95-46fa-8871-cccb4b62e2e8}</Project>
- <Name>MediaBrowser.UI.Controls</Name>
- </ProjectReference>
- <ProjectReference Include="..\MediaBrowser.UI.Uninstall\MediaBrowser.UI.Uninstall.csproj">
- <Project>{e4be0659-4084-407b-b8a8-67802331cc9e}</Project>
- <Name>MediaBrowser.UI.Uninstall</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\NavBar\BackButton.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\NavBar\MuteButton.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\Icon.ico" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\mblogoblack.png" />
- <Resource Include="Resources\Images\mblogowhite.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\NavBar\VolumeDownButton.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\NavBar\VolumeUpButton.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\MessageBox\Error.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\MessageBox\Question.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\MessageBox\Information.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\MessageBox\Asterisk.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\MessageBox\Warning.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\MessageBox\Hand.png" />
- <Resource Include="Resources\Images\MessageBox\Stop.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\MessageBox\Exclamation.png" />
- </ItemGroup>
- <ItemGroup>
- <Resource Include="Resources\Images\mblogoblackfull.png" />
- <Resource Include="Resources\Images\mblogowhitefull.png" />
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include=".NETFramework,Version=v4.5">
- <Visible>False</Visible>
- <ProductName>Microsoft .NET Framework 4.5 %28x86 and x64%29</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Visual.C++.10.0.x86">
- <Visible>False</Visible>
- <ProductName>Visual C++ 2010 Runtime Libraries %28x86%29</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Playback\DirectShow\" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="libvlc.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="libvlccore.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="CorePlugins\MediaBrowser.Plugins.DefaultTheme.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\3dnow\libmemcpy3dn_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libaccess_attachment_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libaccess_bd_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libaccess_ftp_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libaccess_http_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libaccess_imem_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libaccess_mms_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libaccess_rar_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libaccess_realrtsp_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libaccess_smb_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libaccess_tcp_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libaccess_udp_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libaccess_vdr_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libcdda_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libdshow_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libdtv_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libdvdnav_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libdvdread_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libfilesystem_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libidummy_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\liblibbluray_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\librtp_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libscreen_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libsdp_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libstream_filter_rar_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libvcd_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access\libzip_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access_output\libaccess_output_dummy_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access_output\libaccess_output_file_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access_output\libaccess_output_http_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access_output\libaccess_output_livehttp_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access_output\libaccess_output_shout_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\access_output\libaccess_output_udp_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\liba52tofloat32_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\liba52tospdif_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\libaudiobargraph_a_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\libaudio_format_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\libchorus_flanger_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\libcompressor_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\libconverter_fixed_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\libdolby_surround_decoder_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\libdtstofloat32_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\libdtstospdif_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\libequalizer_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\libheadphone_channel_mixer_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\libkaraoke_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\libmono_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\libmpgatofixed32_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\libnormvol_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\libparam_eq_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\libsamplerate_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\libscaletempo_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\libsimple_channel_mixer_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\libspatializer_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\libspeex_resampler_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\libtrivial_channel_mixer_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_filter\libugly_resampler_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_mixer\libfixed32_mixer_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_mixer\libfloat32_mixer_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_output\libadummy_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_output\libamem_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_output\libaout_directx_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_output\libaout_file_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\audio_output\libwaveout_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\liba52_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libadpcm_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libaes3_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libaraw_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libavcodec_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libcc_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libcdg_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libcrystalhd_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libcvdsub_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libddummy_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libdmo_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libdts_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libdvbsub_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libedummy_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libfaad_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libflac_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libfluidsynth_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libkate_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\liblibass_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\liblibmpeg2_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\liblpcm_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libmpeg_audio_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libopus_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libpng_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libquicktime_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\librawvideo_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libschroedinger_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libspeex_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libspudec_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libstl_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libsubsdec_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libsubsusf_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libsvcdsub_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libt140_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libtheora_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libtwolame_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libvorbis_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libx264_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\codec\libzvbi_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\control\libdummy_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\control\libgestures_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\control\libglobalhotkeys_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\control\libhotkeys_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\control\libnetsync_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\control\libntservice_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\control\liboldrc_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libaiff_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libasf_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libau_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libavi_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libdemuxdump_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libdemux_cdg_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libdemux_stl_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libdirac_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libes_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libflacsys_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libgme_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libh264_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libimage_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\liblive555_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libmjpeg_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libmkv_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libmod_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libmp4_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libmpc_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libmpgv_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libnsc_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libnsv_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libnuv_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libogg_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libplaylist_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libps_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libpva_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\librawaud_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\librawdv_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\librawvid_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libreal_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libsid_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libsmf_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libsubtitle_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libts_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libtta_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libty_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libvc1_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libvobsub_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libvoc_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libwav_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\demux\libxa_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\gui\libqt4_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\gui\libskins2_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\lua\liblua_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\meta_engine\libfolder_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\meta_engine\libtaglib_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\misc\libaudioscrobbler_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\misc\libexport_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\misc\libgnutls_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\misc\liblogger_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\misc\libmemcpy_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\misc\libosd_parser_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\misc\libstats_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\misc\libvod_rtsp_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\misc\libxml_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\mmxext\libmemcpymmxext_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\mmx\libi420_rgb_mmx_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\mmx\libi420_yuy2_mmx_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\mmx\libi422_yuy2_mmx_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\mmx\libmemcpymmx_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\mux\libmux_asf_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\mux\libmux_avi_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\mux\libmux_dummy_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\mux\libmux_mp4_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\mux\libmux_mpjpeg_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\mux\libmux_ogg_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\mux\libmux_ps_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\mux\libmux_ts_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\mux\libmux_wav_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\notify\libmsn_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\packetizer\libpacketizer_copy_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\packetizer\libpacketizer_dirac_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\packetizer\libpacketizer_flac_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\packetizer\libpacketizer_h264_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\packetizer\libpacketizer_mlp_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\packetizer\libpacketizer_mpeg4audio_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\packetizer\libpacketizer_mpeg4video_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\packetizer\libpacketizer_mpegvideo_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\packetizer\libpacketizer_vc1_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\services_discovery\libmediadirs_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\services_discovery\libpodcast_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\services_discovery\libsap_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\services_discovery\libupnp_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\services_discovery\libwindrive_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\sse2\libi420_rgb_sse2_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\sse2\libi420_yuy2_sse2_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\sse2\libi422_yuy2_sse2_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\stream_filter\libstream_filter_dash_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\stream_filter\libstream_filter_httplive_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\stream_filter\libstream_filter_record_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\stream_out\libstream_out_autodel_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\stream_out\libstream_out_bridge_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\stream_out\libstream_out_delay_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\stream_out\libstream_out_description_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\stream_out\libstream_out_display_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\stream_out\libstream_out_dummy_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\stream_out\libstream_out_duplicate_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\stream_out\libstream_out_es_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\stream_out\libstream_out_gather_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\stream_out\libstream_out_langfromtelx_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\stream_out\libstream_out_mosaic_bridge_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\stream_out\libstream_out_raop_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\stream_out\libstream_out_record_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\stream_out\libstream_out_rtp_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\stream_out\libstream_out_select_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\stream_out\libstream_out_setid_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\stream_out\libstream_out_smem_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\stream_out\libstream_out_standard_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\stream_out\libstream_out_transcode_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\text_renderer\libfreetype_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\text_renderer\libtdummy_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_chroma\libgrey_yuv_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_chroma\libi420_rgb_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_chroma\libi420_yuy2_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_chroma\libi422_i420_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_chroma\libi422_yuy2_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_chroma\librv32_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_chroma\libyuy2_i420_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_chroma\libyuy2_i422_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libadjust_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libalphamask_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libantiflicker_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libatmo_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libaudiobargraph_v_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libball_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libblendbench_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libblend_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libbluescreen_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libcanvas_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libchain_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libclone_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libcolorthres_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libcroppadd_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libdeinterlace_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\liberase_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libextract_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libgaussianblur_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libgradfun_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libgradient_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libgrain_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libhqdn3d_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libinvert_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\liblogo_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libmagnify_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libmarq_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libmirror_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libmosaic_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libmotionblur_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libmotiondetect_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libosdmenu_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libpanoramix_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libposterize_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libpostproc_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libpsychedelic_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libpuzzle_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libremoteosd_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libripple_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\librotate_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\librss_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libscale_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libscene_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libsepia_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libsharpen_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libsubsdelay_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libswscale_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libtransform_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libwall_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libwave_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_filter\libyuvp_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_output\libcaca_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_output\libdirect2d_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_output\libdirect3d_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_output\libdirectx_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_output\libdrawable_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_output\libglwin32_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_output\libvdummy_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_output\libvmem_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_output\libwingdi_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\video_output\libyuv_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\visualization\libgoom_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\visualization\libprojectm_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Content Include="plugins\visualization\libvisual_plugin.dll">
- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
- </Content>
- <Resource Include="Resources\Images\NavBar\MediaBack.png" />
- <Resource Include="Resources\Images\NavBar\MediaFastForward.png" />
- <Resource Include="Resources\Images\NavBar\MediaForward.png" />
- <Resource Include="Resources\Images\NavBar\MediaRewind.png" />
- <Resource Include="Resources\Images\NavBar\PlayButton.png" />
- <Resource Include="Resources\Images\NavBar\PauseButton.png" />
- <Resource Include="Resources\Images\NavBar\StopButton.png" />
- </ItemGroup>
- <ItemGroup>
- <PublishFile Include="MediaBrowser.UI.Uninstall">
- <Visible>False</Visible>
- <Group>
- </Group>
- <TargetPath>
- </TargetPath>
- <PublishState>Include</PublishState>
- <IncludeHash>True</IncludeHash>
- <FileType>Assembly</FileType>
- </PublishFile>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <Import Project="$(SolutionDir)\.nuget\nuget.targets" />
- <PropertyGroup>
- <PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\Nuget\dlls\" /y /d /r /i</PostBuildEvent>
- </PropertyGroup>
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
diff --git a/MediaBrowser.UI/MediaBrowser.UI_TemporaryKey.pfx b/MediaBrowser.UI/MediaBrowser.UI_TemporaryKey.pfx
deleted file mode 100644
index 8a983ab8c..000000000
--- a/MediaBrowser.UI/MediaBrowser.UI_TemporaryKey.pfx
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Pages/BaseDetailPage.cs b/MediaBrowser.UI/Pages/BaseDetailPage.cs
deleted file mode 100644
index b7c54ce2e..000000000
--- a/MediaBrowser.UI/Pages/BaseDetailPage.cs
+++ /dev/null
@@ -1,159 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Net;
-using MediaBrowser.UI.Controller;
-using MediaBrowser.UI.Playback;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
-namespace MediaBrowser.UI.Pages
-{
- /// <summary>
- /// Provides a base class for detail pages
- /// </summary>
- public abstract class BaseDetailPage : BasePage
- {
- /// <summary>
- /// The _item id
- /// </summary>
- private string _itemId;
- /// <summary>
- /// Gets or sets the id of the item being displayed
- /// </summary>
- /// <value>The item id.</value>
- protected string ItemId
- {
- get { return _itemId; }
- private set
- {
- _itemId = value;
- OnPropertyChanged("ItemId");
- }
- }
-
- /// <summary>
- /// The _item
- /// </summary>
- private BaseItemDto _item;
- /// <summary>
- /// Gets or sets the item.
- /// </summary>
- /// <value>The item.</value>
- public BaseItemDto Item
- {
- get { return _item; }
-
- set
- {
- _item = value;
- OnPropertyChanged("Item");
- OnItemChanged();
- }
- }
-
- /// <summary>
- /// Gets a value indicating whether this instance can resume.
- /// </summary>
- /// <value><c>true</c> if this instance can resume; otherwise, <c>false</c>.</value>
- protected bool CanResume
- {
- get { return Item.CanResume; }
- }
-
- /// <summary>
- /// Gets a value indicating whether this instance can queue.
- /// </summary>
- /// <value><c>true</c> if this instance can queue; otherwise, <c>false</c>.</value>
- protected bool CanQueue
- {
- get { return true; }
- }
-
- /// <summary>
- /// Gets a value indicating whether this instance can play trailer.
- /// </summary>
- /// <value><c>true</c> if this instance can play trailer; otherwise, <c>false</c>.</value>
- protected bool CanPlayTrailer
- {
- get { return Item.HasTrailer; }
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="BaseDetailPage" /> class.
- /// </summary>
- /// <param name="itemId">The item id.</param>
- protected BaseDetailPage(string itemId)
- : base()
- {
- ItemId = itemId;
- }
-
- /// <summary>
- /// Called when [property changed].
- /// </summary>
- /// <param name="name">The name.</param>
- public async override void OnPropertyChanged(string name)
- {
- base.OnPropertyChanged(name);
-
- // Reload the item when the itemId changes
- if (name.Equals("ItemId"))
- {
- await ReloadItem();
- }
- }
-
- /// <summary>
- /// Reloads the item.
- /// </summary>
- /// <returns>Task.</returns>
- private async Task ReloadItem()
- {
- try
- {
- Item = await App.Instance.ApiClient.GetItemAsync(ItemId, App.Instance.CurrentUser.Id);
- }
- catch (HttpException)
- {
- App.Instance.ShowDefaultErrorMessage();
- }
- }
-
- /// <summary>
- /// Called when [item changed].
- /// </summary>
- protected virtual void OnItemChanged()
- {
- SetBackdrops(Item);
- }
-
- /// <summary>
- /// Plays this instance.
- /// </summary>
- public async void Play()
- {
- await UIKernel.Instance.PlaybackManager.Play(new PlayOptions
- {
- Items = new List<BaseItemDto> { Item }
- });
- }
-
- /// <summary>
- /// Resumes this instance.
- /// </summary>
- public async void Resume()
- {
- await UIKernel.Instance.PlaybackManager.Play(new PlayOptions
- {
- Items = new List<BaseItemDto> { Item },
- Resume = true
- });
- }
-
- /// <summary>
- /// Queues this instance.
- /// </summary>
- public void Queue()
- {
- }
- }
-}
diff --git a/MediaBrowser.UI/Pages/BaseFolderPage.cs b/MediaBrowser.UI/Pages/BaseFolderPage.cs
deleted file mode 100644
index 52bddcd90..000000000
--- a/MediaBrowser.UI/Pages/BaseFolderPage.cs
+++ /dev/null
@@ -1,502 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Entities;
-using MediaBrowser.Model.Net;
-using MediaBrowser.UI.ViewModels;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows.Controls;
-
-namespace MediaBrowser.UI.Pages
-{
- /// <summary>
- /// Provides a base class for pages based on a folder item (list, home)
- /// </summary>
- public abstract class BaseFolderPage : BasePage
- {
- /// <summary>
- /// Initializes a new instance of the <see cref="BaseFolderPage" /> class.
- /// </summary>
- /// <param name="itemId">The item id.</param>
- protected BaseFolderPage(string itemId)
- : base()
- {
- ItemId = itemId;
- }
-
- /// <summary>
- /// The _item id
- /// </summary>
- private string _itemId;
- /// <summary>
- /// Gets or sets the Id of the item being displayed
- /// </summary>
- /// <value>The item id.</value>
- protected string ItemId
- {
- get { return _itemId; }
- private set
- {
- _itemId = value;
- OnPropertyChanged("ItemId");
- }
- }
-
- /// <summary>
- /// The _index by
- /// </summary>
- private string _indexBy;
- /// <summary>
- /// Gets or sets the name of the current index function
- /// </summary>
- /// <value>The index by.</value>
- public string IndexBy
- {
- get { return _indexBy; }
- private set
- {
- _indexBy = value;
- OnPropertyChanged("IndexBy");
- }
- }
-
- /// <summary>
- /// The _sort by
- /// </summary>
- private string _sortBy;
- /// <summary>
- /// Gets or sets the name of the current sort function
- /// </summary>
- /// <value>The sort by.</value>
- public string SortBy
- {
- get { return _sortBy; }
- private set
- {
- _sortBy = value;
- OnPropertyChanged("SortBy");
- }
- }
-
- /// <summary>
- /// The _folder
- /// </summary>
- private BaseItemDto _folder;
- /// <summary>
- /// Gets or sets the Folder being displayed
- /// </summary>
- /// <value>The folder.</value>
- public BaseItemDto Folder
- {
- get { return _folder; }
-
- set
- {
- _folder = value;
- OnPropertyChanged("Folder");
- OnFolderChanged();
- ReloadChildren();
- }
- }
-
- /// <summary>
- /// If wrap panels are being used this will get the orientation that should be used, based on scroll direction
- /// </summary>
- /// <value>The wrap panel orientation.</value>
- public Orientation WrapPanelOrientation
- {
- get
- {
- return DisplayPreferences.ScrollDirection == ScrollDirection.Horizontal ? Orientation.Vertical : Orientation.Horizontal;
- }
- }
-
- /// <summary>
- /// The _display preferences
- /// </summary>
- private DisplayPreferences _displayPreferences;
- /// <summary>
- /// Gets of sets the current DisplayPreferences
- /// </summary>
- /// <value>The display preferences.</value>
- public DisplayPreferences DisplayPreferences
- {
- get { return _displayPreferences; }
-
- private set
- {
- _displayPreferences = value;
-
- // If the page is using it's own image type and not honoring the DisplayPreferences setting, set it now
- if (_displayPreferences != null && FixedImageType.HasValue)
- {
- _displayPreferences.PrimaryImageType = FixedImageType.Value;
- }
-
- NotifyDisplayPreferencesChanged();
- }
- }
-
- /// <summary>
- /// The _children
- /// </summary>
- private ItemsResult _children;
- /// <summary>
- /// Gets or sets the children of the Folder being displayed
- /// </summary>
- /// <value>The children.</value>
- public ItemsResult Children
- {
- get { return _children; }
-
- private set
- {
- _children = value;
- OnPropertyChanged("Children");
- ChildCount = _children.TotalRecordCount;
- OnChildrenChanged();
-
- DisplayChildren = DtoBaseItemViewModel.GetObservableItems(Children.Items, AveragePrimaryImageAspectRatio, DisplayPreferences);
- }
- }
-
- /// <summary>
- /// The _display children
- /// </summary>
- private ObservableCollection<DtoBaseItemViewModel> _displayChildren;
- /// <summary>
- /// Gets the actual children that should be displayed.
- /// Subclasses should bind to this, not Children.
- /// </summary>
- /// <value>The display children.</value>
- public ObservableCollection<DtoBaseItemViewModel> DisplayChildren
- {
- get { return _displayChildren; }
-
- private set
- {
- _displayChildren = value;
- OnPropertyChanged("DisplayChildren");
- }
- }
-
- /// <summary>
- /// The _child count
- /// </summary>
- private int _childCount;
- /// <summary>
- /// Gets or sets the number of children within the Folder
- /// </summary>
- /// <value>The child count.</value>
- public int ChildCount
- {
- get { return _childCount; }
-
- private set
- {
- _childCount = value;
- OnPropertyChanged("ChildCount");
- }
- }
-
- /// <summary>
- /// If the page is using it's own image type and not honoring the DisplayPreferences setting, it should return it here
- /// </summary>
- /// <value>The type of the fixed image.</value>
- protected virtual ImageType? FixedImageType
- {
- get { return null; }
- }
-
- /// <summary>
- /// The _average primary image aspect ratio
- /// </summary>
- private double _averagePrimaryImageAspectRatio;
- /// <summary>
- /// Gets or sets the average primary image aspect ratio for all items
- /// </summary>
- /// <value>The average primary image aspect ratio.</value>
- public double AveragePrimaryImageAspectRatio
- {
- get { return _averagePrimaryImageAspectRatio; }
-
- private set
- {
- _averagePrimaryImageAspectRatio = value;
- OnPropertyChanged("AveragePrimaryImageAspectRatio");
- }
- }
-
- /// <summary>
- /// Gets the aspect ratio that should be used based on a given ImageType
- /// </summary>
- /// <param name="imageType">Type of the image.</param>
- /// <returns>System.Double.</returns>
- public double GetAspectRatio(ImageType imageType)
- {
- return GetAspectRatio(imageType, AveragePrimaryImageAspectRatio);
- }
-
- /// <summary>
- /// Gets the aspect ratio that should be used based on a given ImageType
- /// </summary>
- /// <param name="imageType">Type of the image.</param>
- /// <param name="averagePrimaryImageAspectRatio">The average primary image aspect ratio.</param>
- /// <returns>System.Double.</returns>
- public static double GetAspectRatio(ImageType imageType, double averagePrimaryImageAspectRatio)
- {
- switch (imageType)
- {
- case ImageType.Art:
- return 1.777777777777778;
- case ImageType.Backdrop:
- return 1.777777777777778;
- case ImageType.Banner:
- return 5.414285714285714;
- case ImageType.Disc:
- return 1;
- case ImageType.Logo:
- return 1.777777777777778;
- case ImageType.Primary:
- return averagePrimaryImageAspectRatio;
- case ImageType.Thumb:
- return 1.777777777777778;
- default:
- return 1;
- }
- }
-
- /// <summary>
- /// Called when [property changed].
- /// </summary>
- /// <param name="name">The name.</param>
- public async override void OnPropertyChanged(string name)
- {
- base.OnPropertyChanged(name);
-
- // Reload the Folder when the itemId changes
- if (name.Equals("ItemId"))
- {
- await ReloadFolder();
- }
- }
-
- /// <summary>
- /// Reloads the folder
- /// </summary>
- /// <returns>Task.</returns>
- private async Task ReloadFolder()
- {
- try
- {
- if (string.IsNullOrEmpty(ItemId))
- {
- Folder = await App.Instance.ApiClient.GetRootFolderAsync(App.Instance.CurrentUser.Id);
- }
- else
- {
- Folder = await App.Instance.ApiClient.GetItemAsync(ItemId, App.Instance.CurrentUser.Id);
- }
- }
- catch (HttpException)
- {
- App.Instance.ShowDefaultErrorMessage();
- }
- }
-
- /// <summary>
- /// Gets called anytime the Folder gets refreshed
- /// </summary>
- protected virtual void OnFolderChanged()
- {
- SetBackdrops(Folder);
-
- DisplayPreferences = Folder.DisplayPreferences;
-
- if (DisplayPreferences.RememberIndexing)
- {
- IndexBy = DisplayPreferences.IndexBy;
- }
-
- if (DisplayPreferences.RememberSorting)
- {
- SortBy = DisplayPreferences.SortBy ?? Folder.SortOptions.FirstOrDefault();
- }
- else if (string.IsNullOrEmpty(SortBy))
- {
- SortBy = Folder.SortOptions.FirstOrDefault();
- }
- }
-
- /// <summary>
- /// Gets called anytime the Children get refreshed
- /// </summary>
- protected virtual void OnChildrenChanged()
- {
- AveragePrimaryImageAspectRatio = DtoBaseItemViewModel.GetAveragePrimaryImageAspectRatio(Children.Items);
-
- if (DisplayPreferences != null)
- {
- DisplayPreferences.PrimaryImageWidth = Convert.ToInt32(DisplayPreferences.PrimaryImageHeight * GetAspectRatio(DisplayPreferences.PrimaryImageType));
- }
-
- NotifyDisplayPreferencesChanged();
- }
-
- /// <summary>
- /// Reloads the Folder's children
- /// </summary>
- /// <returns>Task.</returns>
- public async Task ReloadChildren()
- {
- var query = new ItemQuery
- {
- ParentId = Folder.Id,
-
- Fields = new[] {
- ItemFields.UserData,
- ItemFields.PrimaryImageAspectRatio
- },
-
- UserId = App.Instance.CurrentUser.Id,
-
- IndexBy = IndexBy,
-
- DynamicSortBy = SortBy
- };
-
- try
- {
- Children = await App.Instance.ApiClient.GetItemsAsync(query);
- }
- catch (HttpException)
- {
- App.Instance.ShowDefaultErrorMessage();
- }
- }
-
- /// <summary>
- /// Gets called anytime a DisplayPreferences property is updated
- /// </summary>
- public virtual void NotifyDisplayPreferencesChanged()
- {
- OnPropertyChanged("DisplayPreferences");
-
- if (DisplayChildren != null)
- {
- // Notify all of the child view models
- foreach (var child in DisplayChildren)
- {
- child.AveragePrimaryImageAspectRatio = AveragePrimaryImageAspectRatio;
- child.NotifyDisplayPreferencesChanged();
- }
- }
-
- OnPropertyChanged("WrapPanelOrientation");
- }
-
- /// <summary>
- /// Changes the sort option on the page
- /// </summary>
- /// <param name="option">The option.</param>
- /// <returns>Task.</returns>
- public async Task UpdateSortOption(string option)
- {
- var tasks = new List<Task>();
-
- SortBy = option;
-
- if (DisplayPreferences.RememberSorting)
- {
- DisplayPreferences.SortBy = option;
- NotifyDisplayPreferencesChanged();
-
- tasks.Add(Task.Run(async () =>
- {
- try
- {
- await App.Instance.ApiClient.UpdateDisplayPreferencesAsync(App.Instance.CurrentUser.Id, Folder.Id, DisplayPreferences);
- }
- catch
- {
- App.Instance.ShowDefaultErrorMessage();
- }
- }));
- }
-
- tasks.Add(ReloadChildren());
-
- await Task.WhenAll(tasks);
- }
-
- /// <summary>
- /// Changes the index option on the page
- /// </summary>
- /// <param name="option">The option.</param>
- /// <returns>Task.</returns>
- public async Task UpdateIndexOption(string option)
- {
- var tasks = new List<Task>();
-
- IndexBy = option;
-
- if (DisplayPreferences.RememberIndexing)
- {
- DisplayPreferences.IndexBy = option;
- NotifyDisplayPreferencesChanged();
-
- tasks.Add(Task.Run(async () =>
- {
- try
- {
- await App.Instance.ApiClient.UpdateDisplayPreferencesAsync(App.Instance.CurrentUser.Id, Folder.Id, DisplayPreferences);
- }
- catch
- {
- App.Instance.ShowDefaultErrorMessage();
- }
- }));
- }
-
- tasks.Add(ReloadChildren());
-
- await Task.WhenAll(tasks);
- }
-
- /// <summary>
- /// Updates the index of the remember.
- /// </summary>
- /// <param name="remember">if set to <c>true</c> [remember].</param>
- /// <returns>Task.</returns>
- public async Task UpdateRememberIndex(bool remember)
- {
- DisplayPreferences.RememberIndexing = remember;
-
- if (remember)
- {
- DisplayPreferences.IndexBy = IndexBy;
- }
-
- await App.Instance.ApiClient.UpdateDisplayPreferencesAsync(App.Instance.CurrentUser.Id, Folder.Id, DisplayPreferences);
- }
-
- /// <summary>
- /// Updates the remember sort.
- /// </summary>
- /// <param name="remember">if set to <c>true</c> [remember].</param>
- /// <returns>Task.</returns>
- public async Task UpdateRememberSort(bool remember)
- {
- DisplayPreferences.RememberSorting = remember;
-
- if (remember)
- {
- DisplayPreferences.SortBy = SortBy;
- }
-
- await App.Instance.ApiClient.UpdateDisplayPreferencesAsync(App.Instance.CurrentUser.Id, Folder.Id, DisplayPreferences);
- }
- }
-}
diff --git a/MediaBrowser.UI/Pages/BaseHomePage.cs b/MediaBrowser.UI/Pages/BaseHomePage.cs
deleted file mode 100644
index 6fb41b966..000000000
--- a/MediaBrowser.UI/Pages/BaseHomePage.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-
-namespace MediaBrowser.UI.Pages
-{
- public abstract class BaseHomePage : BaseFolderPage
- {
- protected BaseHomePage()
- : base(string.Empty)
- {
- }
-
- protected override void OnLoaded()
- {
- base.OnLoaded();
- ClearBackdrops();
- }
- }
-}
diff --git a/MediaBrowser.UI/Pages/BaseInternalPlayerPage.cs b/MediaBrowser.UI/Pages/BaseInternalPlayerPage.cs
deleted file mode 100644
index 3d651c4fa..000000000
--- a/MediaBrowser.UI/Pages/BaseInternalPlayerPage.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-using MediaBrowser.UI.Controller;
-using MediaBrowser.UI.Playback;
-using System.Windows;
-
-namespace MediaBrowser.UI.Pages
-{
- /// <summary>
- /// Class BaseInternalPlayerPage
- /// </summary>
- public abstract class BaseInternalPlayerPage : BasePage
- {
- /// <summary>
- /// Called when [loaded].
- /// </summary>
- protected override void OnLoaded()
- {
- base.OnLoaded();
-
- App.Instance.ApplicationWindow.WindowBackgroundContent.Visibility = Visibility.Collapsed;
- App.Instance.ApplicationWindow.PageContent.Visibility = Visibility.Collapsed;
-
- UIKernel.Instance.PlaybackManager.PlaybackCompleted -= PlaybackManager_PlaybackCompleted;
- UIKernel.Instance.PlaybackManager.PlaybackCompleted += PlaybackManager_PlaybackCompleted;
- }
-
- /// <summary>
- /// Handles the PlaybackCompleted event of the PlaybackManager control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="PlaybackEventArgs" /> instance containing the event data.</param>
- void PlaybackManager_PlaybackCompleted(object sender, PlaybackStopEventArgs e)
- {
- App.Instance.ApplicationWindow.NavigateBack();
- }
-
- /// <summary>
- /// Called when [unloaded].
- /// </summary>
- protected override void OnUnloaded()
- {
- UIKernel.Instance.PlaybackManager.PlaybackCompleted -= PlaybackManager_PlaybackCompleted;
-
- base.OnUnloaded();
-
- App.Instance.ApplicationWindow.PageContent.Visibility = Visibility.Visible;
- App.Instance.ApplicationWindow.WindowBackgroundContent.Visibility = Visibility.Visible;
- }
- }
-}
diff --git a/MediaBrowser.UI/Pages/BaseListPage.cs b/MediaBrowser.UI/Pages/BaseListPage.cs
deleted file mode 100644
index 5196e2b32..000000000
--- a/MediaBrowser.UI/Pages/BaseListPage.cs
+++ /dev/null
@@ -1,204 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Entities;
-using MediaBrowser.UI.Controls;
-using MediaBrowser.UI.ViewModels;
-using System;
-using System.Threading;
-using System.Windows.Controls;
-
-namespace MediaBrowser.UI.Pages
-{
- /// <summary>
- /// Provides a base page for all list pages
- /// </summary>
- public abstract class BaseListPage : BaseFolderPage
- {
- /// <summary>
- /// Gets or sets the current selection timer.
- /// </summary>
- /// <value>The current selection timer.</value>
- private Timer CurrentSelectionTimer { get; set; }
-
- /// <summary>
- /// Subclasses must provide the list box that holds the items
- /// </summary>
- /// <value>The items list.</value>
- protected abstract ExtendedListBox ItemsList { get; }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="BaseListPage" /> class.
- /// </summary>
- /// <param name="itemId">The item id.</param>
- protected BaseListPage(string itemId)
- : base(itemId)
- {
- }
-
- /// <summary>
- /// Raises the <see cref="E:Initialized" /> event.
- /// </summary>
- /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
- protected override void OnInitialized(EventArgs e)
- {
- base.OnInitialized(e);
-
- ItemsList.SelectionChanged += ItemsList_SelectionChanged;
- ItemsList.ItemInvoked += ItemsList_ItemInvoked;
- }
-
- /// <summary>
- /// The _current item
- /// </summary>
- private BaseItemDto _currentItem;
- /// <summary>
- /// Gets or sets the current selected item
- /// </summary>
- /// <value>The current item.</value>
- public BaseItemDto CurrentItem
- {
- get { return _currentItem; }
-
- set
- {
- _currentItem = value;
-
- // Update the current item index immediately
- UpdateCurrentItemIndex(value);
-
- // Fire notification events after a short delay
- // We don't want backdrops and logos reloading while the user is navigating quickly
- if (CurrentSelectionTimer != null)
- {
- CurrentSelectionTimer.Change(500, Timeout.Infinite);
- }
- else
- {
- CurrentSelectionTimer = new Timer(CurrentItemChangedTimerCallback, value, 500, Timeout.Infinite);
- }
- }
- }
-
- /// <summary>
- /// Fires when the current item selection timer expires
- /// </summary>
- /// <param name="state">The state.</param>
- private void CurrentItemChangedTimerCallback(object state)
- {
- Dispatcher.InvokeAsync(() =>
- {
- // Fire notification events for the UI
- OnPropertyChanged("CurrentItem");
-
- // Alert subclasses
- OnCurrentItemChanged();
- });
-
- // Dispose the timer
- CurrentSelectionTimer.Dispose();
- CurrentSelectionTimer = null;
- }
-
- /// <summary>
- /// Updates the current item index based on the current selection
- /// </summary>
- /// <param name="value">The value.</param>
- private void UpdateCurrentItemIndex(BaseItemDto value)
- {
- if (value == null)
- {
- CurrentItemIndex = -1;
- }
- else
- {
- CurrentItemIndex = ItemsList.SelectedIndex;
- }
- }
-
- /// <summary>
- /// The _current item index
- /// </summary>
- private int _currentItemIndex;
- /// <summary>
- /// Gets of sets the index of the current item being displayed
- /// </summary>
- /// <value>The index of the current item.</value>
- public int CurrentItemIndex
- {
- get { return _currentItemIndex; }
-
- set
- {
- _currentItemIndex = value;
- OnPropertyChanged("CurrentItemIndex");
- }
- }
-
- /// <summary>
- /// Handles the list selection changed event to update the current item
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="SelectionChangedEventArgs" /> instance containing the event data.</param>
- void ItemsList_SelectionChanged(object sender, SelectionChangedEventArgs e)
- {
- if (e.AddedItems.Count > 0)
- {
- CurrentItem = (e.AddedItems[0] as DtoBaseItemViewModel).Item;
- }
- else
- {
- CurrentItem = null;
- }
- }
-
- /// <summary>
- /// Itemses the list_ item invoked.
- /// </summary>
- /// <param name="sender">The sender.</param>
- /// <param name="e">The e.</param>
- /// <exception cref="System.NotImplementedException"></exception>
- void ItemsList_ItemInvoked(object sender, ItemEventArgs<object> e)
- {
- var model = e.Argument as DtoBaseItemViewModel;
-
- if (model != null)
- {
- App.Instance.NavigateToItem(model.Item);
- }
- }
-
- /// <summary>
- /// Handles current item selection changes
- /// </summary>
- protected virtual void OnCurrentItemChanged()
- {
- if (CurrentItem != null)
- {
- SetBackdrops(CurrentItem);
- }
- }
-
- /// <summary>
- /// Gets called anytime a DisplayPreferences property is updated
- /// </summary>
- public override void NotifyDisplayPreferencesChanged()
- {
- base.NotifyDisplayPreferencesChanged();
-
- // Make sure the items list has been initialized
- if (ItemsList != null)
- {
- if (DisplayPreferences.ScrollDirection == ScrollDirection.Horizontal)
- {
- ScrollViewer.SetHorizontalScrollBarVisibility(ItemsList, ScrollBarVisibility.Hidden);
- ScrollViewer.SetVerticalScrollBarVisibility(ItemsList, ScrollBarVisibility.Disabled);
- }
- else
- {
- ScrollViewer.SetHorizontalScrollBarVisibility(ItemsList, ScrollBarVisibility.Disabled);
- ScrollViewer.SetVerticalScrollBarVisibility(ItemsList, ScrollBarVisibility.Hidden);
- }
- }
- }
-
- }
-}
diff --git a/MediaBrowser.UI/Pages/BaseLoginPage.cs b/MediaBrowser.UI/Pages/BaseLoginPage.cs
deleted file mode 100644
index cc8f96427..000000000
--- a/MediaBrowser.UI/Pages/BaseLoginPage.cs
+++ /dev/null
@@ -1,119 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Net;
-using MediaBrowser.UI.Controls;
-using System;
-using System.Threading.Tasks;
-
-namespace MediaBrowser.UI.Pages
-{
- /// <summary>
- /// Provides a base page for theme login pages
- /// </summary>
- public abstract class BaseLoginPage : BasePage
- {
- /// <summary>
- /// The _users
- /// </summary>
- private UserDto[] _users;
- /// <summary>
- /// Gets or sets the users.
- /// </summary>
- /// <value>The users.</value>
- public UserDto[] Users
- {
- get { return _users; }
-
- set
- {
- _users = value;
- OnPropertyChanged("Users");
- }
- }
-
- /// <summary>
- /// Subclasses must provide the list that holds the users
- /// </summary>
- /// <value>The items list.</value>
- protected abstract ExtendedListBox ItemsList { get; }
-
- /// <summary>
- /// Raises the <see cref="E:Initialized" /> event.
- /// </summary>
- /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
- protected override async void OnInitialized(EventArgs e)
- {
- base.OnInitialized(e);
-
- ItemsList.ItemInvoked += ItemsList_ItemInvoked;
-
- try
- {
- Users = await App.Instance.ApiClient.GetAllUsersAsync();
- }
- catch (HttpException)
- {
- App.Instance.ShowErrorMessage("There was an error retrieving the list of users from the server.");
- }
- }
-
- /// <summary>
- /// Called when [loaded].
- /// </summary>
- protected override void OnLoaded()
- {
- base.OnLoaded();
- ClearBackdrops();
- }
-
- /// <summary>
- /// Logs in a user when one is selected
- /// </summary>
- /// <param name="sender">The sender.</param>
- /// <param name="e">The e.</param>
- async void ItemsList_ItemInvoked(object sender, ItemEventArgs<object> e)
- {
- var user = (UserDto)e.Argument;
-
- try
- {
- await LoginUser(user);
- }
- catch (HttpException ex)
- {
- if (ex.StatusCode.HasValue && ex.StatusCode.Value == System.Net.HttpStatusCode.Unauthorized)
- {
- App.Instance.ShowErrorMessage("Invalid username or password. Please try again.", caption: "Login Failure");
- }
- else
- {
- App.Instance.ShowDefaultErrorMessage();
- }
- }
- }
-
- /// <summary>
- /// Logs in a user and verifies their password
- /// </summary>
- /// <param name="user">The user.</param>
- /// <param name="password">The password.</param>
- /// <returns>Task{AuthenticationResult}.</returns>
- protected async Task LoginUser(UserDto user, string password)
- {
- await App.Instance.ApiClient.AuthenticateUserAsync(user.Id, password);
-
- App.Instance.CurrentUser = user;
-
- App.Instance.NavigateToHomePage();
- }
-
- /// <summary>
- /// Logs in a user who does not have a password
- /// </summary>
- /// <param name="user">The user.</param>
- /// <returns>Task{AuthenticationResult}.</returns>
- protected Task LoginUser(UserDto user)
- {
- return LoginUser(user, null);
- }
- }
-}
diff --git a/MediaBrowser.UI/Pages/BasePage.cs b/MediaBrowser.UI/Pages/BasePage.cs
deleted file mode 100644
index 667a29ff3..000000000
--- a/MediaBrowser.UI/Pages/BasePage.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-using MediaBrowser.Model.Dto;
-using System;
-using System.ComponentModel;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Input;
-
-namespace MediaBrowser.UI.Pages
-{
- /// <summary>
- /// Provides a common base page for all pages
- /// </summary>
- public abstract class BasePage : Page, INotifyPropertyChanged
- {
- public event PropertyChangedEventHandler PropertyChanged;
-
- public virtual void OnPropertyChanged(string name)
- {
- if (PropertyChanged != null)
- {
- PropertyChanged(this, new PropertyChangedEventArgs(name));
- }
- }
-
- protected override void OnInitialized(EventArgs e)
- {
- Loaded += BasePageLoaded;
- Unloaded += BasePage_Unloaded;
-
- base.OnInitialized(e);
-
- DataContext = this;
- }
-
- void BasePage_Unloaded(object sender, RoutedEventArgs e)
- {
- OnUnloaded();
- }
-
- void BasePageLoaded(object sender, RoutedEventArgs e)
- {
- OnLoaded();
- }
-
- protected virtual void OnLoaded()
- {
- // Give focus to the first element
- MoveFocus(new TraversalRequest(FocusNavigationDirection.First));
- }
-
- protected virtual void OnUnloaded()
- {
- }
-
- /// <summary>
- /// Sets the backdrop based on a BaseItemDto
- /// </summary>
- public void SetBackdrops(BaseItemDto item)
- {
- App.Instance.ApplicationWindow.SetBackdrops(item);
- }
-
- /// <summary>
- /// Clears current backdrops
- /// </summary>
- public void ClearBackdrops()
- {
- App.Instance.ApplicationWindow.ClearBackdrops();
- }
- }
-}
diff --git a/MediaBrowser.UI/Pages/BaseWeatherPage.cs b/MediaBrowser.UI/Pages/BaseWeatherPage.cs
deleted file mode 100644
index 6497967de..000000000
--- a/MediaBrowser.UI/Pages/BaseWeatherPage.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-
-namespace MediaBrowser.UI.Pages
-{
- public class BaseWeatherPage : BasePage
- {
- }
-}
diff --git a/MediaBrowser.UI/Pages/SettingsPage.xaml b/MediaBrowser.UI/Pages/SettingsPage.xaml
deleted file mode 100644
index 27b438351..000000000
--- a/MediaBrowser.UI/Pages/SettingsPage.xaml
+++ /dev/null
@@ -1,16 +0,0 @@
-<Pages:BasePage x:Class="MediaBrowser.UI.Pages.SettingsPage"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:Pages="clr-namespace:MediaBrowser.UI.Pages"
- xmlns:controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
- mc:Ignorable="d"
- d:DesignHeight="300" d:DesignWidth="300"
- Title="SettingsPage">
-
- <Grid>
- <TextBlock Margin="0 0 0 300">Settings Page</TextBlock>
- <controls:ToggleSwitch>
- </controls:ToggleSwitch>
- </Grid>
-</Pages:BasePage>
diff --git a/MediaBrowser.UI/Pages/SettingsPage.xaml.cs b/MediaBrowser.UI/Pages/SettingsPage.xaml.cs
deleted file mode 100644
index db273bbe5..000000000
--- a/MediaBrowser.UI/Pages/SettingsPage.xaml.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-
-namespace MediaBrowser.UI.Pages
-{
- /// <summary>
- /// Interaction logic for SettingsPage.xaml
- /// </summary>
- public partial class SettingsPage : BasePage
- {
- public SettingsPage()
- {
- InitializeComponent();
- }
- }
-}
diff --git a/MediaBrowser.UI/Playback/BaseMediaPlayer.cs b/MediaBrowser.UI/Playback/BaseMediaPlayer.cs
deleted file mode 100644
index 6e3324b05..000000000
--- a/MediaBrowser.UI/Playback/BaseMediaPlayer.cs
+++ /dev/null
@@ -1,747 +0,0 @@
-using MediaBrowser.Common.Events;
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Logging;
-using MediaBrowser.Model.Net;
-using MediaBrowser.UI.Configuration;
-using MediaBrowser.UI.Controller;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace MediaBrowser.UI.Playback
-{
- /// <summary>
- /// Class BaseMediaPlayer
- /// </summary>
- public abstract class BaseMediaPlayer : IDisposable
- {
- /// <summary>
- /// Gets the logger.
- /// </summary>
- /// <value>The logger.</value>
- protected ILogger Logger { get; private set; }
-
- #region VolumeChanged
- /// <summary>
- /// Occurs when [volume changed].
- /// </summary>
- public event EventHandler VolumeChanged;
- protected void OnVolumeChanged()
- {
- EventHelper.FireEventIfNotNull(VolumeChanged, this, EventArgs.Empty, Logger);
- }
- #endregion
-
- #region PlayStateChanged
- /// <summary>
- /// Occurs when [play state changed].
- /// </summary>
- public event EventHandler PlayStateChanged;
- protected void OnPlayStateChanged()
- {
- EventHelper.FireEventIfNotNull(PlayStateChanged, this, EventArgs.Empty, Logger);
- }
- #endregion
-
- /// <summary>
- /// The null task result
- /// </summary>
- protected Task<bool> NullTaskResult = Task.FromResult(false);
-
- /// <summary>
- /// Gets a value indicating whether [supports multi file playback].
- /// </summary>
- /// <value><c>true</c> if [supports multi file playback]; otherwise, <c>false</c>.</value>
- public abstract bool SupportsMultiFilePlayback { get; }
-
- /// <summary>
- /// The currently playing items
- /// </summary>
- public List<BaseItemDto> Playlist = new List<BaseItemDto>();
-
- /// <summary>
- /// The _play state
- /// </summary>
- private PlayState _playState;
- /// <summary>
- /// Gets or sets the state of the play.
- /// </summary>
- /// <value>The state of the play.</value>
- public PlayState PlayState
- {
- get
- {
- return _playState;
- }
- set
- {
- _playState = value;
-
- OnPlayStateChanged();
- }
- }
-
- /// <summary>
- /// Gets or sets a value indicating whether this <see cref="BaseMediaPlayer" /> is mute.
- /// </summary>
- /// <value><c>true</c> if mute; otherwise, <c>false</c>.</value>
- public bool Mute
- {
- get { return IsMuted; }
- set
- {
- SetMute(value);
- OnVolumeChanged();
- }
- }
-
- /// <summary>
- /// Gets or sets the volume.
- /// </summary>
- /// <value>The volume.</value>
- public int Volume
- {
- get { return GetVolume(); }
- set
- {
- SetVolume(value);
- OnVolumeChanged();
- }
- }
-
- /// <summary>
- /// Gets the current player configuration.
- /// </summary>
- /// <value>The current player configuration.</value>
- public PlayerConfiguration CurrentPlayerConfiguration { get; private set; }
-
- /// <summary>
- /// Gets the current play options.
- /// </summary>
- /// <value>The current play options.</value>
- public PlayOptions CurrentPlayOptions { get; private set; }
-
- /// <summary>
- /// Gets the name.
- /// </summary>
- /// <value>The name.</value>
- public abstract string Name { get; }
-
- /// <summary>
- /// Determines whether this instance can play the specified item.
- /// </summary>
- /// <param name="item">The item.</param>
- /// <returns><c>true</c> if this instance can play the specified item; otherwise, <c>false</c>.</returns>
- public abstract bool CanPlay(BaseItemDto item);
-
- /// <summary>
- /// Gets a value indicating whether this instance can change volume.
- /// </summary>
- /// <value><c>true</c> if this instance can change volume; otherwise, <c>false</c>.</value>
- public abstract bool CanControlVolume { get; }
-
- /// <summary>
- /// Gets a value indicating whether this instance can mute.
- /// </summary>
- /// <value><c>true</c> if this instance can mute; otherwise, <c>false</c>.</value>
- public abstract bool CanMute { get; }
-
- /// <summary>
- /// Gets a value indicating whether this instance can queue.
- /// </summary>
- /// <value><c>true</c> if this instance can queue; otherwise, <c>false</c>.</value>
- public abstract bool CanQueue { get; }
-
- /// <summary>
- /// Gets a value indicating whether this instance can pause.
- /// </summary>
- /// <value><c>true</c> if this instance can pause; otherwise, <c>false</c>.</value>
- public abstract bool CanPause { get; }
-
- /// <summary>
- /// Gets a value indicating whether this instance can seek.
- /// </summary>
- /// <value><c>true</c> if this instance can seek; otherwise, <c>false</c>.</value>
- public abstract bool CanSeek { get; }
-
- /// <summary>
- /// Gets the index of the current playlist.
- /// </summary>
- /// <value>The index of the current playlist.</value>
- public virtual int CurrentPlaylistIndex
- {
- get { return 0; }
- }
-
- /// <summary>
- /// Gets the current media.
- /// </summary>
- /// <value>The current media.</value>
- public BaseItemDto CurrentMedia
- {
- get
- {
- return CurrentPlaylistIndex == -1 ? null : Playlist[CurrentPlaylistIndex];
- }
- }
-
- /// <summary>
- /// Gets the current position ticks.
- /// </summary>
- /// <value>The current position ticks.</value>
- public virtual long? CurrentPositionTicks
- {
- get
- {
- return null;
- }
- }
-
- /// <summary>
- /// Gets a value indicating whether this instance is muted.
- /// </summary>
- /// <value><c>true</c> if this instance is muted; otherwise, <c>false</c>.</value>
- protected virtual bool IsMuted
- {
- get { return false; }
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="BaseMediaPlayer" /> class.
- /// </summary>
- protected BaseMediaPlayer(ILogger logger)
- {
- Logger = logger;
- }
-
- /// <summary>
- /// Sets the mute.
- /// </summary>
- /// <param name="mute">if set to <c>true</c> [mute].</param>
- protected virtual void SetMute(bool mute)
- {
- }
-
- /// <summary>
- /// Sets the volume, on a scale from 0-100
- /// </summary>
- /// <param name="value">The value.</param>
- protected virtual void SetVolume(int value)
- {
- }
-
- /// <summary>
- /// Gets the volume.
- /// </summary>
- /// <returns>System.Int32.</returns>
- protected virtual int GetVolume()
- {
- return 0;
- }
-
- /// <summary>
- /// Plays the internal.
- /// </summary>
- /// <param name="items">The items.</param>
- /// <param name="options">The options.</param>
- /// <param name="playerConfiguration">The player configuration.</param>
- protected abstract void PlayInternal(List<BaseItemDto> items, PlayOptions options, PlayerConfiguration playerConfiguration);
-
- /// <summary>
- /// Queues the internal.
- /// </summary>
- /// <param name="items">The items.</param>
- protected virtual void QueueInternal(List<BaseItemDto> items)
- {
- }
-
- /// <summary>
- /// Stops the internal.
- /// </summary>
- /// <returns>Task.</returns>
- protected abstract Task StopInternal();
-
- /// <summary>
- /// The play semaphore
- /// </summary>
- private readonly SemaphoreSlim PlaySemaphore = new SemaphoreSlim(1, 1);
-
- /// <summary>
- /// Gets or sets the progress update timer.
- /// </summary>
- /// <value>The progress update timer.</value>
- private Timer ProgressUpdateTimer { get; set; }
-
- /// <summary>
- /// Gets a value indicating whether this instance can monitor progress.
- /// </summary>
- /// <value><c>true</c> if this instance can monitor progress; otherwise, <c>false</c>.</value>
- protected virtual bool CanMonitorProgress
- {
- get
- {
- return false;
- }
- }
-
- /// <summary>
- /// Stops this instance.
- /// </summary>
- /// <returns>Task.</returns>
- /// <exception cref="System.InvalidOperationException"></exception>
- public Task Stop()
- {
- var playstate = PlayState;
-
- if (playstate == PlayState.Playing || playstate == PlayState.Paused)
- {
- Logger.Info("Stopping");
-
- return StopInternal();
- }
-
- throw new InvalidOperationException(string.Format("{0} is already {1}", Name, playstate));
- }
-
- /// <summary>
- /// Plays the specified item.
- /// </summary>
- /// <param name="options">The options.</param>
- /// <param name="playerConfiguration">The player configuration.</param>
- /// <returns>Task.</returns>
- /// <exception cref="System.ArgumentNullException">items</exception>
- internal async Task Play(PlayOptions options, PlayerConfiguration playerConfiguration)
- {
- if (options == null)
- {
- throw new ArgumentNullException("options");
- }
-
- await PlaySemaphore.WaitAsync();
-
- PlayState = PlayState.Playing;
-
- lock (Playlist)
- {
- Playlist.Clear();
- Playlist.AddRange(options.Items);
- }
-
- CurrentPlayerConfiguration = playerConfiguration;
- CurrentPlayOptions = options;
-
- if (options.Items.Count > 1)
- {
- Logger.Info("Playing {0} items", options.Items.Count);
- }
- else
- {
- Logger.Info("Playing {0}", options.Items[0].Name);
- }
-
- try
- {
- PlayInternal(options.Items, options, playerConfiguration);
- }
- catch (Exception ex)
- {
- Logger.Info("Error beginning playback", ex);
-
- CurrentPlayerConfiguration = null;
- CurrentPlayOptions = null;
- Playlist.Clear();
-
- PlayState = PlayState.Idle;
- PlaySemaphore.Release();
-
- throw;
- }
-
- SendPlaybackStartCheckIn(options.Items[0]);
-
- ReloadProgressUpdateTimer();
- }
-
- /// <summary>
- /// Restarts the progress update timer.
- /// </summary>
- private void ReloadProgressUpdateTimer()
- {
- ProgressUpdateTimer = new Timer(OnProgressTimerStopped, null, TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(10));
- }
-
- /// <summary>
- /// Called when [progress timer stopped].
- /// </summary>
- /// <param name="state">The state.</param>
- private void OnProgressTimerStopped(object state)
- {
- var index = CurrentPlaylistIndex;
-
- if (index != -1)
- {
- SendPlaybackProgressCheckIn(Playlist[index], CurrentPositionTicks);
- }
- }
-
- /// <summary>
- /// Queues the specified items.
- /// </summary>
- /// <param name="items">The items.</param>
- /// <exception cref="System.ArgumentNullException">items</exception>
- /// <exception cref="System.InvalidOperationException"></exception>
- internal void Queue(List<BaseItemDto> items)
- {
- if (items == null)
- {
- throw new ArgumentNullException("items");
- }
-
- var playstate = PlayState;
-
- if (playstate != PlayState.Playing && playstate != PlayState.Paused)
- {
- throw new InvalidOperationException(string.Format("{0} cannot queue from playstate: {1}", Name, playstate));
- }
-
- lock (Playlist)
- {
- Playlist.AddRange(items);
- }
-
- QueueInternal(items);
- }
-
- /// <summary>
- /// Called when [player stopped].
- /// </summary>
- /// <param name="lastPlaylistIndex">Last index of the playlist.</param>
- /// <param name="positionTicks">The position ticks.</param>
- protected void OnPlayerStopped(int? lastPlaylistIndex, long? positionTicks)
- {
- Logger.Info("Stopped");
-
- if (positionTicks.HasValue && positionTicks.Value == 0)
- {
- positionTicks = null;
- }
-
- var items = Playlist.ToList();
-
- DisposeProgressUpdateTimer();
-
- var index = lastPlaylistIndex ?? CurrentPlaylistIndex;
-
- var lastItem = items[index];
- SendPlaybackStopCheckIn(items[index], positionTicks);
-
- if (!CanMonitorProgress)
- {
- if (items.Count > 1)
- {
- MarkWatched(items.Except(new[] { lastItem }));
- }
- }
-
- OnPlayerStoppedInternal();
-
- UIKernel.Instance.PlaybackManager.OnPlaybackCompleted(this, Playlist.ToList());
-
- CurrentPlayerConfiguration = null;
- CurrentPlayOptions = null;
- Logger.Info("Clearing Playlist");
- Playlist.Clear();
-
- PlayState = PlayState.Idle;
-
- PlaySemaphore.Release();
- }
-
- /// <summary>
- /// Called when [player stopped internal].
- /// </summary>
- protected virtual void OnPlayerStoppedInternal()
- {
-
- }
-
- /// <summary>
- /// Seeks the specified position ticks.
- /// </summary>
- /// <param name="positionTicks">The position ticks.</param>
- /// <returns>Task.</returns>
- /// <exception cref="System.InvalidOperationException"></exception>
- public async Task Seek(long positionTicks)
- {
- var playState = PlayState;
-
- if (playState == PlayState.Playing || playState == PlayState.Paused)
- {
- await SeekInternal(positionTicks);
- }
- else
- {
- throw new InvalidOperationException(string.Format("Cannot seek {0} with playstate {1}", Name, PlayState));
- }
- }
-
- /// <summary>
- /// Seeks the internal.
- /// </summary>
- /// <param name="positionTicks">The position ticks.</param>
- /// <returns>Task.</returns>
- protected virtual Task SeekInternal(long positionTicks)
- {
- return NullTaskResult;
- }
-
- /// <summary>
- /// The ten seconds
- /// </summary>
- private static readonly long TenSeconds = TimeSpan.FromSeconds(10).Ticks;
-
- /// <summary>
- /// Goes to next chapter.
- /// </summary>
- /// <returns>Task.</returns>
- public virtual Task GoToNextChapter()
- {
- var current = CurrentPositionTicks;
-
- var chapter = CurrentMedia.Chapters.FirstOrDefault(c => c.StartPositionTicks > current);
-
- return chapter != null ? Seek(chapter.StartPositionTicks) : NullTaskResult;
- }
-
- /// <summary>
- /// Goes to previous chapter.
- /// </summary>
- /// <returns>Task.</returns>
- public virtual Task GoToPreviousChapter()
- {
- var current = CurrentPositionTicks;
-
- var chapter = CurrentMedia.Chapters.LastOrDefault(c => c.StartPositionTicks < current - TenSeconds);
-
- return chapter != null ? Seek(chapter.StartPositionTicks) : NullTaskResult;
- }
-
- /// <summary>
- /// Pauses this instance.
- /// </summary>
- /// <returns>Task.</returns>
- /// <exception cref="System.InvalidOperationException"></exception>
- public async Task Pause()
- {
- if (PlayState == PlayState.Playing)
- {
- await PauseInternal();
-
- PlayState = PlayState.Paused;
- }
- else
- {
- throw new InvalidOperationException(string.Format("Cannot pause {0} with playstate {1}", Name, PlayState));
- }
- }
-
- /// <summary>
- /// Pauses the internal.
- /// </summary>
- /// <returns>Task.</returns>
- protected virtual Task PauseInternal()
- {
- return NullTaskResult;
- }
-
- /// <summary>
- /// Uns the pause.
- /// </summary>
- /// <returns>Task.</returns>
- /// <exception cref="System.InvalidOperationException"></exception>
- public async Task UnPause()
- {
- if (PlayState == PlayState.Paused)
- {
- await UnPauseInternal();
- PlayState = PlayState.Playing;
- }
- else
- {
- throw new InvalidOperationException(string.Format("Cannot unpause {0} with playstate {1}", Name, PlayState));
- }
- }
-
- /// <summary>
- /// Uns the pause internal.
- /// </summary>
- /// <returns>Task.</returns>
- protected virtual Task UnPauseInternal()
- {
- return NullTaskResult;
- }
-
- /// <summary>
- /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
- /// </summary>
- public void Dispose()
- {
- Dispose(true);
- }
-
- /// <summary>
- /// Releases unmanaged and - optionally - managed resources.
- /// </summary>
- /// <param name="dispose"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
- protected virtual void Dispose(bool dispose)
- {
- Logger.Info("Disposing");
-
- DisposeProgressUpdateTimer();
-
- if (PlayState == PlayState.Playing || PlayState == PlayState.Paused)
- {
- var index = CurrentPlaylistIndex;
-
- if (index != -1)
- {
- SendPlaybackStopCheckIn(Playlist[index], CurrentPositionTicks);
- }
- Task.Run(() => Stop());
- Thread.Sleep(1000);
- }
-
- PlaySemaphore.Dispose();
- }
-
- /// <summary>
- /// Disposes the progress update timer.
- /// </summary>
- private void DisposeProgressUpdateTimer()
- {
- if (ProgressUpdateTimer != null)
- {
- ProgressUpdateTimer.Dispose();
- }
- }
-
- /// <summary>
- /// Sends the playback start check in.
- /// </summary>
- /// <param name="item">The item.</param>
- protected async void SendPlaybackStartCheckIn(BaseItemDto item)
- {
- if (string.IsNullOrEmpty(item.Id))
- {
- return;
- }
-
- Logger.Info("Sending playback start checkin for {0}", item.Name);
-
- try
- {
- await UIKernel.Instance.ApiClient.ReportPlaybackStartAsync(item.Id, App.Instance.CurrentUser.Id);
- }
- catch (HttpException ex)
- {
- Logger.ErrorException("Error sending playback start checking for {0}", ex, item.Name);
- }
- }
-
- /// <summary>
- /// Sends the playback progress check in.
- /// </summary>
- /// <param name="item">The item.</param>
- /// <param name="positionTicks">The position ticks.</param>
- protected async void SendPlaybackProgressCheckIn(BaseItemDto item, long? positionTicks)
- {
- if (string.IsNullOrEmpty(item.Id))
- {
- return;
- }
- var position = positionTicks.HasValue ? TimeSpan.FromTicks(positionTicks.Value).ToString() : "unknown";
-
- Logger.Info("Sending playback progress checkin for {0} at position {1}", item.Name, position);
-
- try
- {
- await UIKernel.Instance.ApiClient.ReportPlaybackProgressAsync(item.Id, App.Instance.CurrentUser.Id, positionTicks);
- }
- catch (HttpException ex)
- {
- Logger.ErrorException("Error sending playback progress checking for {0}", ex, item.Name);
- }
- }
-
- /// <summary>
- /// Sends the playback stop check in.
- /// </summary>
- /// <param name="item">The item.</param>
- /// <param name="positionTicks">The position ticks.</param>
- protected async void SendPlaybackStopCheckIn(BaseItemDto item, long? positionTicks)
- {
- if (string.IsNullOrEmpty(item.Id))
- {
- return;
- }
- var position = positionTicks.HasValue ? TimeSpan.FromTicks(positionTicks.Value).ToString() : "unknown";
-
- Logger.Info("Sending playback stop checkin for {0} at position {1}", item.Name, position);
-
- try
- {
- await UIKernel.Instance.ApiClient.ReportPlaybackStoppedAsync(item.Id, App.Instance.CurrentUser.Id, positionTicks);
- }
- catch (HttpException ex)
- {
- Logger.ErrorException("Error sending playback stop checking for {0}", ex, item.Name);
- }
- }
-
- /// <summary>
- /// Marks the watched.
- /// </summary>
- /// <param name="items">The items.</param>
- protected async void MarkWatched(IEnumerable<BaseItemDto> items)
- {
- var idList = items.Where(i => !string.IsNullOrEmpty(i.Id)).Select(i => i.Id);
-
- try
- {
- await UIKernel.Instance.ApiClient.UpdatePlayedStatusAsync(idList.First(), App.Instance.CurrentUser.Id, true);
- }
- catch (HttpException ex)
- {
- Logger.ErrorException("Error marking items watched", ex);
- }
- }
-
- /// <summary>
- /// Called when [media changed].
- /// </summary>
- /// <param name="oldPlaylistIndex">Old index of the playlist.</param>
- /// <param name="endingPositionTicks">The ending position ticks.</param>
- /// <param name="newPlaylistIndex">New index of the playlist.</param>
- protected void OnMediaChanged(int oldPlaylistIndex, long? endingPositionTicks, int newPlaylistIndex)
- {
- DisposeProgressUpdateTimer();
-
- Task.Run(() =>
- {
- if (oldPlaylistIndex != -1)
- {
- SendPlaybackStopCheckIn(Playlist[oldPlaylistIndex], endingPositionTicks);
- }
-
- if (newPlaylistIndex != -1)
- {
- SendPlaybackStartCheckIn(Playlist[newPlaylistIndex]);
- }
- });
-
- ReloadProgressUpdateTimer();
- }
- }
-}
diff --git a/MediaBrowser.UI/Playback/ExternalPlayer/BaseExternalPlayer.cs b/MediaBrowser.UI/Playback/ExternalPlayer/BaseExternalPlayer.cs
deleted file mode 100644
index c50911d71..000000000
--- a/MediaBrowser.UI/Playback/ExternalPlayer/BaseExternalPlayer.cs
+++ /dev/null
@@ -1,243 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Logging;
-using MediaBrowser.UI.Configuration;
-using MediaBrowser.UI.UserInput;
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-namespace MediaBrowser.UI.Playback.ExternalPlayer
-{
- /// <summary>
- /// Class BaseExternalPlayer
- /// </summary>
- public abstract class BaseExternalPlayer : BaseMediaPlayer
- {
- protected BaseExternalPlayer(ILogger logger) : base(logger)
- {
- }
-
- /// <summary>
- /// Gets a value indicating whether this instance can mute.
- /// </summary>
- /// <value><c>true</c> if this instance can mute; otherwise, <c>false</c>.</value>
- public override bool CanMute
- {
- get { return false; }
- }
-
- /// <summary>
- /// Gets a value indicating whether this instance can change volume.
- /// </summary>
- /// <value><c>true</c> if this instance can change volume; otherwise, <c>false</c>.</value>
- public override bool CanControlVolume
- {
- get { return false; }
- }
-
- /// <summary>
- /// Gets a value indicating whether this instance can close automatically.
- /// </summary>
- /// <value><c>true</c> if this instance can close automatically; otherwise, <c>false</c>.</value>
- protected virtual bool CanCloseAutomatically
- {
- get
- {
- return false;
- }
- }
-
- /// <summary>
- /// Gets a value indicating whether [supports multi file playback].
- /// </summary>
- /// <value><c>true</c> if [supports multi file playback]; otherwise, <c>false</c>.</value>
- public override bool SupportsMultiFilePlayback
- {
- get
- {
- return false;
- }
- }
-
- /// <summary>
- /// Gets the current process.
- /// </summary>
- /// <value>The current process.</value>
- protected Process CurrentProcess { get; private set; }
-
- /// <summary>
- /// Gets the process start info.
- /// </summary>
- /// <param name="items">The items.</param>
- /// <param name="options">The options.</param>
- /// <param name="playerConfiguration">The player configuration.</param>
- /// <returns>ProcessStartInfo.</returns>
- protected virtual ProcessStartInfo GetProcessStartInfo(List<BaseItemDto> items, PlayOptions options, PlayerConfiguration playerConfiguration)
- {
- return new ProcessStartInfo
- {
- FileName = playerConfiguration.Command,
- Arguments = GetCommandArguments(items, options, playerConfiguration)
- };
- }
-
- /// <summary>
- /// Gets the command arguments.
- /// </summary>
- /// <param name="items">The items.</param>
- /// <param name="options">The options.</param>
- /// <param name="playerConfiguration">The player configuration.</param>
- /// <returns>System.String.</returns>
- protected virtual string GetCommandArguments(List<BaseItemDto> items, PlayOptions options, PlayerConfiguration playerConfiguration)
- {
- var args = playerConfiguration.Args;
-
- if (string.IsNullOrEmpty(args))
- {
- return string.Empty;
- }
-
- return GetCommandArguments(items, args);
- }
-
- /// <summary>
- /// Gets the command arguments.
- /// </summary>
- /// <param name="items">The items.</param>
- /// <param name="formatString">The format string.</param>
- /// <returns>System.String.</returns>
- protected string GetCommandArguments(List<BaseItemDto> items, string formatString)
- {
- var paths = items.Select(i => "\"" + GetPathForCommandLine(i) + "\"");
-
- return string.Format(formatString, string.Join(" ", paths.ToArray()));
- }
-
- /// <summary>
- /// Gets the path for command line.
- /// </summary>
- /// <param name="item">The item.</param>
- /// <returns>System.String.</returns>
- protected virtual string GetPathForCommandLine(BaseItemDto item)
- {
- return item.Path;
- }
-
- /// <summary>
- /// Gets a value indicating whether this instance can queue.
- /// </summary>
- /// <value><c>true</c> if this instance can queue; otherwise, <c>false</c>.</value>
- public override bool CanQueue
- {
- get { return false; }
- }
-
- /// <summary>
- /// Gets a value indicating whether this instance can pause.
- /// </summary>
- /// <value><c>true</c> if this instance can pause; otherwise, <c>false</c>.</value>
- public override bool CanPause
- {
- get { return false; }
- }
-
- /// <summary>
- /// Gets a value indicating whether this instance can seek.
- /// </summary>
- /// <value><c>true</c> if this instance can seek; otherwise, <c>false</c>.</value>
- public override bool CanSeek
- {
- get { return false; }
- }
-
- /// <summary>
- /// Plays the internal.
- /// </summary>
- /// <param name="items">The items.</param>
- /// <param name="options">The options.</param>
- /// <param name="playerConfiguration">The player configuration.</param>
- protected override void PlayInternal(List<BaseItemDto> items, PlayOptions options, PlayerConfiguration playerConfiguration)
- {
- CurrentProcess = new Process
- {
- EnableRaisingEvents = true,
- StartInfo = GetProcessStartInfo(items, options, playerConfiguration)
- };
-
- Logger.Info("{0} {1}", CurrentProcess.StartInfo.FileName, CurrentProcess.StartInfo.Arguments);
-
- CurrentProcess.Start();
-
- OnExternalPlayerLaunched();
-
- if (!CanCloseAutomatically)
- {
- KeyboardListener.KeyDown += KeyboardListener_KeyDown;
- }
-
- CurrentProcess.Exited += CurrentProcess_Exited;
- }
-
- /// <summary>
- /// Handles the KeyDown event of the KeyboardListener control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="KeyEventArgs" /> instance containing the event data.</param>
- void KeyboardListener_KeyDown(object sender, KeyEventArgs e)
- {
- if (e.KeyCode == Keys.MediaStop)
- {
- var playstate = PlayState;
-
- if (playstate == PlayState.Paused || playstate == PlayState.Playing)
- {
- Stop();
- }
- }
- }
-
- /// <summary>
- /// Handles the Exited event of the CurrentProcess control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
- void CurrentProcess_Exited(object sender, EventArgs e)
- {
- var process = (Process)sender;
-
- process.Dispose();
-
- OnPlayerStopped(CurrentPlaylistIndex, CurrentPositionTicks);
- }
-
- /// <summary>
- /// Stops the internal.
- /// </summary>
- /// <returns>Task.</returns>
- protected override Task StopInternal()
- {
- return Task.Run(() => CurrentProcess.Kill());
- }
-
- /// <summary>
- /// Called when [player stopped internal].
- /// </summary>
- protected override void OnPlayerStoppedInternal()
- {
- KeyboardListener.KeyDown -= KeyboardListener_KeyDown;
-
- base.OnPlayerStoppedInternal();
- }
-
- /// <summary>
- /// Called when [external player launched].
- /// </summary>
- protected virtual void OnExternalPlayerLaunched()
- {
-
- }
- }
-}
diff --git a/MediaBrowser.UI/Playback/ExternalPlayer/GenericExternalPlayer.cs b/MediaBrowser.UI/Playback/ExternalPlayer/GenericExternalPlayer.cs
deleted file mode 100644
index 915028050..000000000
--- a/MediaBrowser.UI/Playback/ExternalPlayer/GenericExternalPlayer.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Logging;
-
-namespace MediaBrowser.UI.Playback.ExternalPlayer
-{
- /// <summary>
- /// Class GenericExternalPlayer
- /// </summary>
- public class GenericExternalPlayer : BaseExternalPlayer
- {
- public GenericExternalPlayer(ILogger logger)
- : base(logger)
- {
- }
-
- /// <summary>
- /// Gets the name.
- /// </summary>
- /// <value>The name.</value>
- public override string Name
- {
- get { return "Generic Player"; }
- }
-
- /// <summary>
- /// Determines whether this instance can play the specified item.
- /// </summary>
- /// <param name="item">The item.</param>
- /// <returns><c>true</c> if this instance can play the specified item; otherwise, <c>false</c>.</returns>
- public override bool CanPlay(BaseItemDto item)
- {
- return false;
- }
- }
-}
diff --git a/MediaBrowser.UI/Playback/InternalPlayer/BaseInternalMediaPlayer.cs b/MediaBrowser.UI/Playback/InternalPlayer/BaseInternalMediaPlayer.cs
deleted file mode 100644
index e9178d3f5..000000000
--- a/MediaBrowser.UI/Playback/InternalPlayer/BaseInternalMediaPlayer.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Logging;
-using MediaBrowser.UI.Configuration;
-using System.Collections.Generic;
-using System.Windows;
-
-namespace MediaBrowser.UI.Playback.InternalPlayer
-{
- /// <summary>
- /// Class BaseInternalMediaPlayer
- /// </summary>
- public abstract class BaseInternalMediaPlayer : BaseMediaPlayer
- {
- protected BaseInternalMediaPlayer(ILogger logger) : base(logger)
- {
- }
-
- /// <summary>
- /// Ensures the media player created.
- /// </summary>
- protected abstract void EnsureMediaPlayerCreated();
-
- /// <summary>
- /// Plays the internal.
- /// </summary>
- /// <param name="items">The items.</param>
- /// <param name="options">The options.</param>
- /// <param name="playerConfiguration">The player configuration.</param>
- protected override void PlayInternal(List<BaseItemDto> items, PlayOptions options, PlayerConfiguration playerConfiguration)
- {
- App.Instance.ApplicationWindow.Dispatcher.Invoke(() =>
- {
- App.Instance.ApplicationWindow.BackdropContainer.Visibility = Visibility.Collapsed;
- App.Instance.ApplicationWindow.WindowBackgroundContent.SetResourceReference(FrameworkElement.StyleProperty, "WindowBackgroundContentDuringPlayback");
- });
-
- App.Instance.NavigateToInternalPlayerPage();
- }
-
- /// <summary>
- /// Called when [player stopped internal].
- /// </summary>
- protected override void OnPlayerStoppedInternal()
- {
- App.Instance.ApplicationWindow.Dispatcher.Invoke(() =>
- {
- App.Instance.ApplicationWindow.BackdropContainer.Visibility = Visibility.Visible;
- App.Instance.ApplicationWindow.WindowBackgroundContent.SetResourceReference(FrameworkElement.StyleProperty, "WindowBackgroundContent");
- });
-
- base.OnPlayerStoppedInternal();
- }
- }
-}
diff --git a/MediaBrowser.UI/Playback/NVlc/InternalMediaPlayerNVlc.cs b/MediaBrowser.UI/Playback/NVlc/InternalMediaPlayerNVlc.cs
deleted file mode 100644
index 2d596655b..000000000
--- a/MediaBrowser.UI/Playback/NVlc/InternalMediaPlayerNVlc.cs
+++ /dev/null
@@ -1,426 +0,0 @@
-using Declarations.Events;
-using Declarations.Media;
-using Declarations.Players;
-using Implementation;
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Entities;
-using MediaBrowser.Model.Logging;
-using MediaBrowser.UI.Configuration;
-using MediaBrowser.UI.Playback.InternalPlayer;
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.IO;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows.Forms;
-
-namespace MediaBrowser.UI.Playback.NVlc
-{
- /// <summary>
- /// Class InternalMediaPlayer
- /// </summary>
- public class InternalMediaPlayerNVlc : BaseInternalMediaPlayer
- {
- public InternalMediaPlayerNVlc(ILogger logger)
- : base(logger)
- {
- }
-
- /// <summary>
- /// Gets or sets the media player factory.
- /// </summary>
- /// <value>The media player factory.</value>
- private MediaPlayerFactory MediaPlayerFactory { get; set; }
-
- /// <summary>
- /// Gets or sets the video player.
- /// </summary>
- /// <value>The video player.</value>
- private IMediaListPlayer VideoPlayer { get; set; }
-
- /// <summary>
- /// Gets or sets the media list.
- /// </summary>
- /// <value>The media list.</value>
- private IMediaList MediaList { get; set; }
-
- /// <summary>
- /// Gets a value indicating whether [supports multi file playback].
- /// </summary>
- /// <value><c>true</c> if [supports multi file playback]; otherwise, <c>false</c>.</value>
- public override bool SupportsMultiFilePlayback
- {
- get { return true; }
- }
-
- /// <summary>
- /// Gets a value indicating whether this instance can mute.
- /// </summary>
- /// <value><c>true</c> if this instance can mute; otherwise, <c>false</c>.</value>
- public override bool CanMute
- {
- get { return true; }
- }
-
- /// <summary>
- /// Gets a value indicating whether this instance can change volume.
- /// </summary>
- /// <value><c>true</c> if this instance can change volume; otherwise, <c>false</c>.</value>
- public override bool CanControlVolume
- {
- get { return true; }
- }
-
- /// <summary>
- /// Gets a value indicating whether this instance is muted.
- /// </summary>
- /// <value><c>true</c> if this instance is muted; otherwise, <c>false</c>.</value>
- protected override bool IsMuted
- {
- get { return VideoPlayer != null && VideoPlayer.InnerPlayer.Mute; }
- }
-
- /// <summary>
- /// The _current playlist index
- /// </summary>
- private int _currentPlaylistIndex;
-
- /// <summary>
- /// Gets the index of the current playlist.
- /// </summary>
- /// <value>The index of the current playlist.</value>
- public override int CurrentPlaylistIndex
- {
- get
- {
- return _currentPlaylistIndex;
- }
- }
-
- /// <summary>
- /// Gets the current position ticks.
- /// </summary>
- /// <value>The current position ticks.</value>
- public override long? CurrentPositionTicks
- {
- get
- {
- if (VideoPlayer != null)
- {
- return TimeSpan.FromMilliseconds(VideoPlayer.Time).Ticks;
- }
-
- return base.CurrentPositionTicks;
- }
- }
-
- /// <summary>
- /// Gets a value indicating whether this instance can monitor progress.
- /// </summary>
- /// <value><c>true</c> if this instance can monitor progress; otherwise, <c>false</c>.</value>
- protected override bool CanMonitorProgress
- {
- get
- {
- return true;
- }
- }
-
- /// <summary>
- /// Gets or sets the windows forms panel.
- /// </summary>
- /// <value>The windows forms panel.</value>
- private Panel WindowsFormsPanel { get; set; }
-
- /// <summary>
- /// Ensures the player.
- /// </summary>
- protected override void EnsureMediaPlayerCreated()
- {
- if (MediaPlayerFactory != null)
- {
- return;
- }
-
- WindowsFormsPanel = new Panel();
- WindowsFormsPanel.BackColor = Color.Black;
-
- App.Instance.HiddenWindow.WindowsFormsHost.Child = WindowsFormsPanel;
-
- MediaPlayerFactory = new MediaPlayerFactory(new[]
- {
- "-I",
- "dummy",
- "--ignore-config",
- "--no-osd",
- "--disable-screensaver",
- //"--ffmpeg-hw",
- "--plugin-path=./plugins"
- });
- }
-
- /// <summary>
- /// Events_s the media changed.
- /// </summary>
- /// <param name="sender">The sender.</param>
- /// <param name="e">The e.</param>
- void Events_MediaChanged(object sender, MediaPlayerMediaChanged e)
- {
- //var current = MediaList.FirstOrDefault(i => i.Tag == e.NewMedia.Tag);
-
- //var newIndex = current != null ? MediaList.IndexOf(current) : -1;
-
- //var currentIndex = _currentPlaylistIndex;
-
- //if (newIndex != currentIndex)
- //{
- // OnMediaChanged(currentIndex, null, newIndex);
- //}
-
- //_currentPlaylistIndex = newIndex;
- }
-
- /// <summary>
- /// Determines whether this instance can play the specified item.
- /// </summary>
- /// <param name="item">The item.</param>
- /// <returns><c>true</c> if this instance can play the specified item; otherwise, <c>false</c>.</returns>
- public override bool CanPlay(BaseItemDto item)
- {
- return item.IsVideo || item.IsAudio;
- }
-
- /// <summary>
- /// Gets a value indicating whether this instance can queue.
- /// </summary>
- /// <value><c>true</c> if this instance can queue; otherwise, <c>false</c>.</value>
- public override bool CanQueue
- {
- get { return true; }
- }
-
- /// <summary>
- /// Plays the internal.
- /// </summary>
- /// <param name="items">The items.</param>
- /// <param name="options">The options.</param>
- /// <param name="playerConfiguration">The player configuration.</param>
- protected override void PlayInternal(List<BaseItemDto> items, PlayOptions options, PlayerConfiguration playerConfiguration)
- {
- EnsureMediaPlayerCreated();
-
- _currentPlaylistIndex = 0;
-
- MediaList = MediaPlayerFactory.CreateMediaList<IMediaList>(items.Select(GetPlayablePath));
- VideoPlayer = MediaPlayerFactory.CreateMediaListPlayer<IMediaListPlayer>(MediaList);
-
- VideoPlayer.InnerPlayer.WindowHandle = WindowsFormsPanel.Handle;
-
- VideoPlayer.InnerPlayer.Events.PlayerStopped += Events_PlayerStopped;
- VideoPlayer.Play();
-
- var position = options.StartPositionTicks;
-
- if (position > 0)
- {
- VideoPlayer.Time = Convert.ToInt64(TimeSpan.FromTicks(position).TotalMilliseconds);
- }
-
- VideoPlayer.MediaListPlayerEvents.MediaListPlayerNextItemSet += MediaListPlayerEvents_MediaListPlayerNextItemSet;
-
- base.PlayInternal(items, options, playerConfiguration);
- }
-
- /// <summary>
- /// Gets the playable path.
- /// </summary>
- /// <param name="item">The item.</param>
- /// <returns>System.String.</returns>
- private string GetPlayablePath(BaseItemDto item)
- {
- if (item.VideoType.HasValue && item.VideoType.Value == VideoType.BluRay)
- {
- var file = Directory.EnumerateFiles(item.Path, "*.m2ts", SearchOption.AllDirectories).OrderByDescending(f => new FileInfo(f).Length).FirstOrDefault();
-
- if (!string.IsNullOrEmpty(file))
- {
- return file;
- }
- }
-
- return item.Path;
- }
-
- /// <summary>
- /// Medias the list player events_ media list player next item set.
- /// </summary>
- /// <param name="sender">The sender.</param>
- /// <param name="e">The e.</param>
- void MediaListPlayerEvents_MediaListPlayerNextItemSet(object sender, MediaListPlayerNextItemSet e)
- {
- }
-
- /// <summary>
- /// Gets the name.
- /// </summary>
- /// <value>The name.</value>
- public override string Name
- {
- get { return "Internal Player"; }
- }
-
- /// <summary>
- /// Gets a value indicating whether this instance can pause.
- /// </summary>
- /// <value><c>true</c> if this instance can pause; otherwise, <c>false</c>.</value>
- public override bool CanPause
- {
- get { return true; }
- }
-
- /// <summary>
- /// Gets a value indicating whether this instance can seek.
- /// </summary>
- /// <value><c>true</c> if this instance can seek; otherwise, <c>false</c>.</value>
- public override bool CanSeek
- {
- get { return true; }
- }
-
- /// <summary>
- /// Queues the internal.
- /// </summary>
- /// <param name="items">The items.</param>
- protected override void QueueInternal(List<BaseItemDto> items)
- {
- }
-
- /// <summary>
- /// Seeks the internal.
- /// </summary>
- /// <param name="positionTicks">The position ticks.</param>
- /// <returns>Task.</returns>
- protected override Task SeekInternal(long positionTicks)
- {
- return Task.Run(() => VideoPlayer.Time = Convert.ToInt64(TimeSpan.FromTicks(positionTicks).TotalMilliseconds));
- }
-
- /// <summary>
- /// Pauses the internal.
- /// </summary>
- /// <returns>Task.</returns>
- protected override Task PauseInternal()
- {
- return Task.Run(() => VideoPlayer.Pause());
- }
-
- /// <summary>
- /// Uns the pause internal.
- /// </summary>
- /// <returns>Task.</returns>
- protected override Task UnPauseInternal()
- {
- return Task.Run(() => VideoPlayer.Pause());
- }
-
- /// <summary>
- /// Stops the internal.
- /// </summary>
- /// <returns>Task.</returns>
- protected override Task StopInternal()
- {
- return Task.Run(() => VideoPlayer.Stop());
- }
-
- /// <summary>
- /// Handles the PlayerStopped event of the Events control.
- /// </summary>
- /// <param name="sender">The source of the event.</param>
- /// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
- void Events_PlayerStopped(object sender, EventArgs e)
- {
- OnPlayerStopped(CurrentPlaylistIndex, CurrentPositionTicks);
- }
-
- /// <summary>
- /// Called when [player stopped].
- /// </summary>
- protected override void OnPlayerStoppedInternal()
- {
- VideoPlayer.MediaListPlayerEvents.MediaListPlayerNextItemSet -= MediaListPlayerEvents_MediaListPlayerNextItemSet;
-
- MediaList.Dispose();
-
- VideoPlayer.InnerPlayer.Events.PlayerStopped -= Events_PlayerStopped;
- VideoPlayer.InnerPlayer.Dispose();
-
- //VideoPlayer.Dispose();
- VideoPlayer = null;
-
- _currentPlaylistIndex = 0;
-
- base.OnPlayerStoppedInternal();
- }
-
- /// <summary>
- /// Gets the volume.
- /// </summary>
- /// <returns>System.Int32.</returns>
- protected override int GetVolume()
- {
- return VideoPlayer.InnerPlayer.Volume;
- }
-
- /// <summary>
- /// Sets the volume, on a scale from 0-100
- /// </summary>
- /// <param name="value">The value.</param>
- protected override void SetVolume(int value)
- {
- if (value > 0 && VideoPlayer.InnerPlayer.Mute)
- {
- VideoPlayer.InnerPlayer.Mute = false;
- }
-
- VideoPlayer.InnerPlayer.Volume = value;
- }
-
- /// <summary>
- /// Sets the mute.
- /// </summary>
- /// <param name="mute">if set to <c>true</c> [mute].</param>
- protected override void SetMute(bool mute)
- {
- VideoPlayer.InnerPlayer.Mute = mute;
- }
-
- /// <summary>
- /// Releases unmanaged and - optionally - managed resources.
- /// </summary>
- /// <param name="dispose"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
- protected override void Dispose(bool dispose)
- {
- base.Dispose(dispose);
-
- if (dispose)
- {
- if (MediaList != null)
- {
- MediaList.Dispose();
- }
- if (VideoPlayer != null)
- {
- if (VideoPlayer.InnerPlayer != null)
- {
- VideoPlayer.InnerPlayer.Dispose();
- }
- }
- if (MediaPlayerFactory != null)
- {
- MediaPlayerFactory.Dispose();
- }
- }
- }
- }
-}
diff --git a/MediaBrowser.UI/Playback/PlayOptions.cs b/MediaBrowser.UI/Playback/PlayOptions.cs
deleted file mode 100644
index 276e611b9..000000000
--- a/MediaBrowser.UI/Playback/PlayOptions.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-using MediaBrowser.Model.Dto;
-using System;
-using System.Collections.Generic;
-
-namespace MediaBrowser.UI.Playback
-{
- /// <summary>
- /// Class PlayOptions
- /// </summary>
- public class PlayOptions
- {
- /// <summary>
- /// Gets or sets the items.
- /// </summary>
- /// <value>The items.</value>
- public List<BaseItemDto> Items { get; set; }
-
- /// <summary>
- /// If true, the PlayableItems will be shuffled before playback
- /// </summary>
- /// <value><c>true</c> if shuffle; otherwise, <c>false</c>.</value>
- public bool Shuffle { get; set; }
-
- /// <summary>
- /// If true, Playback will be resumed from the last known position
- /// </summary>
- /// <value><c>true</c> if resume; otherwise, <c>false</c>.</value>
- public bool Resume { get; set; }
-
- private long? _startPositionTicks;
- /// <summary>
- /// Gets or sets the start position ticks.
- /// </summary>
- /// <value>The start position ticks.</value>
- public long StartPositionTicks
- {
- get
- {
- if (_startPositionTicks.HasValue)
- {
- return _startPositionTicks.Value;
- }
-
- if (Resume && Items.Count > 0)
- {
- var item = Items[0];
-
- if (item.UserData != null)
- {
- return item.UserData.PlaybackPositionTicks;
- }
- }
-
- return 0;
- }
- set
- {
- _startPositionTicks = value;
- }
- }
-
- /// <summary>
- /// Holds the time that playback was started
- /// </summary>
- /// <value>The playback start time.</value>
- public DateTime PlaybackStartTime { get; private set; }
-
- /// <summary>
- /// The _show now playing view
- /// </summary>
- private bool _showNowPlayingView = true;
- /// <summary>
- /// Determines whether or not the PlaybackController should show the now playing view during playback
- /// Note that this depends on PlaybackController implementation and support
- /// </summary>
- /// <value><c>true</c> if [show now playing view]; otherwise, <c>false</c>.</value>
- public bool ShowNowPlayingView { get { return _showNowPlayingView; } set { _showNowPlayingView = value; } }
-
- /// <summary>
- /// The _go full screen
- /// </summary>
- private bool _goFullScreen = true;
- /// <summary>
- /// Determines whether or not the PlaybackController should go full screen upon beginning playback
- /// </summary>
- /// <value><c>true</c> if [go full screen]; otherwise, <c>false</c>.</value>
- public bool GoFullScreen { get { return _goFullScreen; } set { _goFullScreen = value; } }
- }
-}
diff --git a/MediaBrowser.UI/Playback/PlayState.cs b/MediaBrowser.UI/Playback/PlayState.cs
deleted file mode 100644
index d166c4a77..000000000
--- a/MediaBrowser.UI/Playback/PlayState.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-
-namespace MediaBrowser.UI.Playback
-{
- /// <summary>
- /// Enum PlayState
- /// </summary>
- public enum PlayState
- {
- /// <summary>
- /// The idle
- /// </summary>
- Idle,
-
- /// <summary>
- /// The playing
- /// </summary>
- Playing,
-
- /// <summary>
- /// The paused
- /// </summary>
- Paused
- }
-}
diff --git a/MediaBrowser.UI/Playback/PlaybackEventArgs.cs b/MediaBrowser.UI/Playback/PlaybackEventArgs.cs
deleted file mode 100644
index a2eef782a..000000000
--- a/MediaBrowser.UI/Playback/PlaybackEventArgs.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-using System.Collections.Generic;
-using MediaBrowser.Model.Dto;
-using MediaBrowser.UI.Configuration;
-using System;
-
-namespace MediaBrowser.UI.Playback
-{
- /// <summary>
- /// Class PlaybackEventArgs
- /// </summary>
- public class PlaybackEventArgs : EventArgs
- {
- /// <summary>
- /// Gets or sets the player.
- /// </summary>
- /// <value>The player.</value>
- public BaseMediaPlayer Player { get; set; }
-
- /// <summary>
- /// Gets or sets the options.
- /// </summary>
- /// <value>The options.</value>
- public PlayOptions Options { get; set; }
-
- /// <summary>
- /// Gets or sets the player configuration.
- /// </summary>
- /// <value>The player configuration.</value>
- public PlayerConfiguration PlayerConfiguration { get; set; }
- }
-
- /// <summary>
- /// Class PlaybackStopEventArgs
- /// </summary>
- public class PlaybackStopEventArgs : EventArgs
- {
- /// <summary>
- /// Gets or sets the player.
- /// </summary>
- /// <value>The player.</value>
- public BaseMediaPlayer Player { get; set; }
-
- /// <summary>
- /// Gets or sets the items.
- /// </summary>
- /// <value>The items.</value>
- public List<BaseItemDto> Items { get; set; }
- }
-}
diff --git a/MediaBrowser.UI/Playback/PlaybackManager.cs b/MediaBrowser.UI/Playback/PlaybackManager.cs
deleted file mode 100644
index eedcad9b3..000000000
--- a/MediaBrowser.UI/Playback/PlaybackManager.cs
+++ /dev/null
@@ -1,301 +0,0 @@
-using MediaBrowser.Common.Events;
-using MediaBrowser.Common.Extensions;
-using MediaBrowser.Common.Kernel;
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Entities;
-using MediaBrowser.Model.Logging;
-using MediaBrowser.Model.Net;
-using MediaBrowser.UI.Configuration;
-using MediaBrowser.UI.Controller;
-using MediaBrowser.UI.Playback.InternalPlayer;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace MediaBrowser.UI.Playback
-{
- /// <summary>
- /// Class PlaybackManager
- /// </summary>
- public class PlaybackManager : BaseManager<UIKernel>
- {
- private readonly ILogger _logger;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="PlaybackManager" /> class.
- /// </summary>
- /// <param name="kernel">The kernel.</param>
- public PlaybackManager(UIKernel kernel, ILogger logger)
- : base(kernel)
- {
- _logger = logger;
- }
-
- #region PlaybackStarted Event
- /// <summary>
- /// Occurs when [playback started].
- /// </summary>
- public event EventHandler<PlaybackEventArgs> PlaybackStarted;
-
- /// <summary>
- /// Called when [playback started].
- /// </summary>
- /// <param name="player">The player.</param>
- /// <param name="options">The options.</param>
- /// <param name="playerConfiguration">The player configuration.</param>
- private void OnPlaybackStarted(BaseMediaPlayer player, PlayOptions options, PlayerConfiguration playerConfiguration)
- {
- EventHelper.QueueEventIfNotNull(PlaybackStarted, this, new PlaybackEventArgs
- {
- Options = options,
- Player = player,
- PlayerConfiguration = playerConfiguration
- }, _logger);
- }
- #endregion
-
- #region PlaybackCompleted Event
- /// <summary>
- /// Occurs when [playback completed].
- /// </summary>
- public event EventHandler<PlaybackStopEventArgs> PlaybackCompleted;
-
- /// <summary>
- /// Called when [playback completed].
- /// </summary>
- /// <param name="player">The player.</param>
- /// <param name="items">The items.</param>
- internal void OnPlaybackCompleted(BaseMediaPlayer player, List<BaseItemDto> items)
- {
- EventHelper.QueueEventIfNotNull(PlaybackCompleted, this, new PlaybackStopEventArgs
- {
- Items = items,
- Player = player
- }, _logger);
- }
- #endregion
-
- /// <summary>
- /// Gets the active players.
- /// </summary>
- /// <value>The active players.</value>
- public IEnumerable<BaseMediaPlayer> ActivePlayers
- {
- get
- {
- return Kernel.MediaPlayers.Where(m => m.PlayState != PlayState.Idle);
- }
- }
-
- /// <summary>
- /// Gets the active internal players.
- /// </summary>
- /// <value>The active internal players.</value>
- public IEnumerable<BaseMediaPlayer> ActiveInternalPlayers
- {
- get { return ActivePlayers.Where(p => p is BaseInternalMediaPlayer); }
- }
-
- /// <summary>
- /// Plays the specified items.
- /// </summary>
- /// <param name="options">The options.</param>
- /// <returns>Task.</returns>
- /// <exception cref="System.ArgumentException"></exception>
- /// <exception cref="System.InvalidOperationException"></exception>
- public async Task Play(PlayOptions options)
- {
- if (options == null)
- {
- throw new ArgumentNullException("options");
- }
-
- if (options.Items == null || options.Items.Count == 0)
- {
- throw new ArgumentNullException("options");
- }
-
- var player = GetPlayer(options.Items);
-
- if (player != null)
- {
- await StopAllPlayback();
-
- await Play(player.Item1, options, player.Item2);
- }
- else
- {
- throw new InvalidOperationException();
- }
- }
-
- /// <summary>
- /// Plays the specified player.
- /// </summary>
- /// <param name="player">The player.</param>
- /// <param name="options">The options.</param>
- /// <param name="playerConfiguration">The player configuration.</param>
- /// <returns>Task.</returns>
- private async Task Play(BaseMediaPlayer player, PlayOptions options, PlayerConfiguration playerConfiguration)
- {
- if (options.Shuffle)
- {
- options.Items = options.Items.Shuffle().ToList();
- }
-
- var firstItem = options.Items[0];
-
- if (options.StartPositionTicks == 0 && player.SupportsMultiFilePlayback && firstItem.IsVideo && firstItem.LocationType == LocationType.FileSystem)
- {
- try
- {
- var intros = await UIKernel.Instance.ApiClient.GetIntrosAsync(firstItem.Id, App.Instance.CurrentUser.Id);
-
- options.Items.InsertRange(0, intros.Select(GetPlayableItem));
- }
- catch (HttpException ex)
- {
- _logger.ErrorException("Error retrieving intros", ex);
- }
- }
-
- await player.Play(options, playerConfiguration);
-
- OnPlaybackStarted(player, options, playerConfiguration);
- }
-
- /// <summary>
- /// Gets the playable item.
- /// </summary>
- /// <param name="path">The path.</param>
- /// <returns>BaseItemDto.</returns>
- public BaseItemDto GetPlayableItem(string path)
- {
- return new BaseItemDto
- {
- Path = path,
- Name = Path.GetFileName(path),
- Type = "Video",
- VideoType = VideoType.VideoFile,
- IsFolder = false
- };
- }
-
- /// <summary>
- /// Gets the playable item.
- /// </summary>
- /// <param name="uri">The URI.</param>
- /// <param name="name">The name.</param>
- /// <returns>BaseItemDto.</returns>
- public BaseItemDto GetPlayableItem(Uri uri, string name)
- {
- return new BaseItemDto
- {
- Path = uri.ToString(),
- Name = name,
- Type = "Video",
- VideoType = VideoType.VideoFile,
- IsFolder = false,
- LocationType = LocationType.Remote
- };
- }
-
- /// <summary>
- /// Stops all playback.
- /// </summary>
- /// <returns>Task.</returns>
- public async Task StopAllPlayback()
- {
- var tasks = Kernel.MediaPlayers.Where(p => p.PlayState == PlayState.Playing || p.PlayState == PlayState.Paused).Select(p => p.Stop());
-
- await Task.WhenAll(tasks);
- }
-
- /// <summary>
- /// Gets the player.
- /// </summary>
- /// <param name="items">The items.</param>
- /// <returns>BaseMediaPlayer.</returns>
- private Tuple<BaseMediaPlayer, PlayerConfiguration> GetPlayer(List<BaseItemDto> items)
- {
- var player = GetConfiguredPlayer(items);
-
- if (player != null)
- {
- return player;
- }
-
- // If there's no explicit configuration just find the first matching player
- var mediaPlayer = Kernel.MediaPlayers.OfType<BaseInternalMediaPlayer>().FirstOrDefault(p => items.All(p.CanPlay));
-
- if (mediaPlayer != null)
- {
- return new Tuple<BaseMediaPlayer, PlayerConfiguration>(mediaPlayer, null);
- }
-
- return null;
- }
-
- /// <summary>
- /// Gets the configured player.
- /// </summary>
- /// <param name="items">The items.</param>
- /// <returns>BaseMediaPlayer.</returns>
- private Tuple<BaseMediaPlayer, PlayerConfiguration> GetConfiguredPlayer(List<BaseItemDto> items)
- {
- if (UIKernel.Instance.Configuration.MediaPlayers == null)
- {
- return null;
- }
-
- return UIKernel.Instance.Configuration.MediaPlayers.Where(p => IsConfiguredToPlay(p, items))
- .Select(p => new Tuple<BaseMediaPlayer, PlayerConfiguration>(UIKernel.Instance.MediaPlayers.FirstOrDefault(m => m.Name.Equals(p.PlayerName, StringComparison.OrdinalIgnoreCase)), p))
- .FirstOrDefault(p => p.Item1 != null);
- }
-
- /// <summary>
- /// Determines whether [is configured to play] [the specified configuration].
- /// </summary>
- /// <param name="configuration">The configuration.</param>
- /// <param name="items">The items.</param>
- /// <returns><c>true</c> if [is configured to play] [the specified configuration]; otherwise, <c>false</c>.</returns>
- private bool IsConfiguredToPlay(PlayerConfiguration configuration, List<BaseItemDto> items)
- {
- if (configuration.ItemTypes != null && configuration.ItemTypes.Length > 0)
- {
- if (items.Any(i => !configuration.ItemTypes.Contains(i.Type, StringComparer.OrdinalIgnoreCase)))
- {
- return false;
- }
- }
-
- if (configuration.FileExtensions != null && configuration.FileExtensions.Length > 0)
- {
- if (items.Any(i => !configuration.FileExtensions.Select(ext => ext.TrimStart('.')).Contains((Path.GetExtension(i.Path) ?? string.Empty).TrimStart('.'), StringComparer.OrdinalIgnoreCase)))
- {
- return false;
- }
- }
-
- if (configuration.VideoTypes != null && configuration.VideoTypes.Length > 0)
- {
- if (items.Any(i => i.VideoType.HasValue && !configuration.VideoTypes.Contains(i.VideoType.Value)))
- {
- return false;
- }
- }
-
- if (configuration.VideoFormats != null && configuration.VideoFormats.Length > 0)
- {
- if (items.Any(i => i.VideoFormat.HasValue && !configuration.VideoFormats.Contains(i.VideoFormat.Value)))
- {
- return false;
- }
- }
-
- return true;
- }
- }
-}
diff --git a/MediaBrowser.UI/Properties/AssemblyInfo.cs b/MediaBrowser.UI/Properties/AssemblyInfo.cs
deleted file mode 100644
index 4203ef319..000000000
--- a/MediaBrowser.UI/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
-using System.Windows;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("MediaBrowser.UI")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Media Browser Team")]
-[assembly: AssemblyProduct("MediaBrowser.UI")]
-[assembly: AssemblyCopyright("Copyright © 2012")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-//In order to begin building localizable applications, set
-//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
-//inside a <PropertyGroup>. For example, if you are using US english
-//in your source files, set the <UICulture> to en-US. Then uncomment
-//the NeutralResourceLanguage attribute below. Update the "en-US" in
-//the line below to match the UICulture setting in the project file.
-
-//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
-
-
-[assembly: ThemeInfo(
- ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
- //(used if a resource is not found in the page,
- // or application resource dictionaries)
- ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
- //(used if a resource is not found in the page,
- // app, or any theme specific resource dictionaries)
-)]
-
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.9.*")]
diff --git a/MediaBrowser.UI/Properties/Resources.Designer.cs b/MediaBrowser.UI/Properties/Resources.Designer.cs
deleted file mode 100644
index b9d742620..000000000
--- a/MediaBrowser.UI/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.17626
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace MediaBrowser.UI.Properties
-{
-
-
- /// <summary>
- /// A strongly-typed resource class, for looking up localized strings, etc.
- /// </summary>
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
- }
-
- /// <summary>
- /// Returns the cached ResourceManager instance used by this class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MediaBrowser.UI.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- /// <summary>
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/MediaBrowser.UI/Properties/Resources.resx b/MediaBrowser.UI/Properties/Resources.resx
deleted file mode 100644
index ffecec851..000000000
--- a/MediaBrowser.UI/Properties/Resources.resx
+++ /dev/null
@@ -1,117 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root> \ No newline at end of file
diff --git a/MediaBrowser.UI/Properties/Settings.Designer.cs b/MediaBrowser.UI/Properties/Settings.Designer.cs
deleted file mode 100644
index 4d9ddf50d..000000000
--- a/MediaBrowser.UI/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.17626
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace MediaBrowser.UI.Properties
-{
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/MediaBrowser.UI/Properties/Settings.settings b/MediaBrowser.UI/Properties/Settings.settings
deleted file mode 100644
index 8f2fd95d6..000000000
--- a/MediaBrowser.UI/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
- <Profiles>
- <Profile Name="(Default)" />
- </Profiles>
- <Settings />
-</SettingsFile> \ No newline at end of file
diff --git a/MediaBrowser.UI/Resources/AppResources.xaml b/MediaBrowser.UI/Resources/AppResources.xaml
deleted file mode 100644
index 9d59c2d96..000000000
--- a/MediaBrowser.UI/Resources/AppResources.xaml
+++ /dev/null
@@ -1,383 +0,0 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:System="clr-namespace:System;assembly=mscorlib"
- xmlns:converters="clr-namespace:MediaBrowser.UI.Converters"
- xmlns:Controls="clr-namespace:MediaBrowser.UI.Controls"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls">
-
- <!--Default font for text. Themes should override these as needed-->
- <FontFamily x:Key="DefaultFontFamily">Segoe UI, Lucida Sans Unicode, Verdana</FontFamily>
- <FontWeight x:Key="DefaultFontWeight">Normal</FontWeight>
- <Brush x:Key="DefaultForeground">#333</Brush>
- <System:Double x:Key="DefaultFontSize">30</System:Double>
-
- <!--Default font for small text. Themes should override these as needed-->
- <FontFamily x:Key="SmallFontFamily">Segoe UI, Lucida Sans Unicode, Verdana</FontFamily>
- <FontWeight x:Key="SmallFontWeight">Normal</FontWeight>
- <Brush x:Key="SmallForeground">#333</Brush>
- <System:Double x:Key="SmallFontSize">20</System:Double>
-
- <!--Default font for h1 headers. Themes should override these as needed-->
- <System:Double x:Key="Heading1FontSize">68</System:Double>
- <FontFamily x:Key="Heading1FontFamily">Segoe UI, Lucida Sans Unicode, Verdana</FontFamily>
- <FontWeight x:Key="Heading1FontWeight">Thin</FontWeight>
- <Brush x:Key="Heading1Foreground">#333</Brush>
-
- <!--Default font for h2 headers. Themes should override these as needed-->
- <System:Double x:Key="Heading2FontSize">42</System:Double>
- <FontFamily x:Key="Heading2FontFamily">Segoe UI, Lucida Sans Unicode, Verdana</FontFamily>
- <FontWeight x:Key="Heading2FontWeight">Normal</FontWeight>
- <Brush x:Key="Heading2Foreground">#333</Brush>
-
- <Brush x:Key="SelectedItemHighlightColor">SkyBlue</Brush>
-
- <!--Define all the standard converters here in one place-->
- <converters:DateTimeToStringConverter x:Key="DateTimeToStringConverter"></converters:DateTimeToStringConverter>
- <converters:UserImageConverter x:Key="UserImageConverter"></converters:UserImageConverter>
- <converters:WeatherTemperatureConverter x:Key="WeatherTemperatureConverter"></converters:WeatherTemperatureConverter>
- <converters:LastSeenTextConverter x:Key="LastSeenTextConverter"></converters:LastSeenTextConverter>
- <converters:WeatherVisibilityConverter x:Key="WeatherVisibilityConverter"></converters:WeatherVisibilityConverter>
- <converters:CurrentUserVisibilityConverter x:Key="CurrentUserVisibilityConverter"></converters:CurrentUserVisibilityConverter>
- <converters:BaseItemImageVisibilityConverter x:Key="BaseItemImageVisibilityConverter"></converters:BaseItemImageVisibilityConverter>
- <converters:WatchedVisibilityConverter x:Key="WatchedVisibilityConverter"></converters:WatchedVisibilityConverter>
- <converters:MetroTileBackgroundConverter x:Key="MetroTileBackgroundConverter"></converters:MetroTileBackgroundConverter>
- <converters:FavoriteVisibilityConverter x:Key="FavoriteVisibilityConverter"></converters:FavoriteVisibilityConverter>
- <converters:LikeVisibilityConverter x:Key="LikeVisibilityConverter"></converters:LikeVisibilityConverter>
- <converters:DislikeVisibilityConverter x:Key="DislikeVisibilityConverter"></converters:DislikeVisibilityConverter>
-
- <!--Default Frame style. -->
- <Style TargetType="Frame">
- <Setter Property="NavigationUIVisibility" Value="Hidden"/>
- <Setter Property="KeyboardNavigation.IsTabStop" Value="false"/>
- </Style>
-
- <!--Default Frame style. -->
- <Style TargetType="controls:TransitionFrame">
- <Setter Property="NavigationUIVisibility" Value="Hidden"/>
- <Setter Property="KeyboardNavigation.IsTabStop" Value="false"/>
- </Style>
-
- <!--Default Frame style. -->
- <Style TargetType="ContentControl">
- <Setter Property="KeyboardNavigation.IsTabStop" Value="false"/>
- </Style>
-
- <!--Default TextBlock style. -->
- <Style TargetType="TextBlock">
- <Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}"/>
- <Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}"/>
- <Setter Property="FontWeight" Value="{DynamicResource DefaultFontWeight}"/>
- <Setter Property="TextWrapping" Value="Wrap" />
- </Style>
-
- <!--Default TextBlock style. -->
- <Style TargetType="TextBlock" x:Key="TextBlockStyle">
- <Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}"/>
- <Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}"/>
- <Setter Property="FontWeight" Value="{DynamicResource DefaultFontWeight}"/>
- <Setter Property="Foreground" Value="{DynamicResource DefaultForeground}"/>
- <Setter Property="TextWrapping" Value="Wrap" />
- </Style>
-
- <!--Default TextBlock style. -->
- <Style TargetType="TextBlock" x:Key="SmallTextBlockStyle">
- <Setter Property="FontSize" Value="{DynamicResource SmallFontSize}"/>
- <Setter Property="FontFamily" Value="{DynamicResource SmallFontFamily}"/>
- <Setter Property="FontWeight" Value="{DynamicResource SmallFontWeight}"/>
- <Setter Property="Foreground" Value="{DynamicResource SmallForeground}"/>
- <Setter Property="TextWrapping" Value="Wrap" />
- </Style>
-
- <!--Default TextBlock style. -->
- <Style TargetType="TextBlock" x:Key="Heading1TextBlockStyle">
- <Setter Property="FontSize" Value="{DynamicResource Heading1FontSize}"/>
- <Setter Property="FontFamily" Value="{DynamicResource Heading1FontFamily}"/>
- <Setter Property="FontWeight" Value="{DynamicResource Heading1FontWeight}"/>
- <Setter Property="Foreground" Value="{DynamicResource Heading1Foreground}"/>
- <Setter Property="TextWrapping" Value="Wrap" />
- </Style>
-
- <!--Default TextBlock style. -->
- <Style TargetType="TextBlock" x:Key="Heading2TextBlockStyle">
- <Setter Property="FontSize" Value="{DynamicResource Heading2FontSize}"/>
- <Setter Property="FontFamily" Value="{DynamicResource Heading2FontFamily}"/>
- <Setter Property="FontWeight" Value="{DynamicResource Heading2FontWeight}"/>
- <Setter Property="Foreground" Value="{DynamicResource Heading2Foreground}"/>
- <Setter Property="TextWrapping" Value="Wrap" />
- </Style>
-
- <!--Default Button style. -->
- <Style TargetType="Button">
- <Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}"/>
- <Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}"/>
- <Setter Property="FontWeight" Value="{DynamicResource DefaultFontWeight}"/>
- <Setter Property="Foreground" Value="{DynamicResource DefaultForeground}"/>
- </Style>
-
- <!--Default style for buttons that have images. -->
- <Style TargetType="Button" x:Key="ImageButton" BasedOn="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
- <Setter Property="SnapsToDevicePixels" Value="true"/>
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="Margin" Value="0"/>
- <Setter Property="Padding" Value="0"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="OverridesDefaultStyle" Value="true"/>
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border x:Name="Border" Background="{TemplateBinding Background}">
- <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsKeyboardFocused" Value="true">
- <Setter TargetName="Border" Property="Background" Value="Gray" />
- </Trigger>
- <Trigger Property="IsFocused" Value="true">
- <Setter TargetName="Border" Property="Background" Value="Gray" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="Border" Property="Background" Value="Gray" />
- </Trigger>
- <Trigger Property="IsPressed" Value="true">
- <Setter TargetName="Border" Property="Background" Value="Gray" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="Border" Property="Opacity" Value=".2" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <!--Default ListBox style. -->
- <Style TargetType="controls:ExtendedListBox" x:Key="ListBoxStyle">
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="KeyboardNavigation.IsTabStop" Value="False"/>
- <Setter Property="KeyboardNavigation.AcceptsReturn" Value="True"/>
- <Setter Property="KeyboardNavigation.DirectionalNavigation" Value="Continue"/>
- <Setter Property="VirtualizingPanel.CacheLength" Value="2,2"/>
- <Setter Property="VirtualizingPanel.CacheLengthUnit" Value="Page"/>
- <Setter Property="VirtualizingPanel.IsVirtualizing" Value="True"/>
- <Setter Property="VirtualizingPanel.VirtualizationMode" Value="Recycling"/>
- <Setter Property="VirtualizingPanel.ScrollUnit" Value="Pixel"/>
- <Setter Property="IsSynchronizedWithCurrentItem" Value="True"/>
- <Setter Property="VirtualizingPanel.ScrollUnit" Value="Pixel"/>
- <Setter Property="SelectionMode" Value="Single"/>
- <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/>
- <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
- </Style>
-
- <!--MB Logo, black text. -->
- <Style TargetType="Image" x:Key="MBLogoImageBlack">
- <Setter Property="Source" Value="Images/mblogoblackfull.png"/>
- <Setter Property="Stretch" Value="Uniform"/>
- <Setter Property="RenderOptions.BitmapScalingMode" Value="HighQuality"/>
- <Setter Property="Height" Value="100"/>
- </Style>
-
- <!--MB Logo, white text. -->
- <Style TargetType="Image" x:Key="MBLogoImageWhite">
- <Setter Property="Source" Value="Images/mblogowhitefull.png"/>
- <Setter Property="Stretch" Value="Uniform"/>
- <Setter Property="RenderOptions.BitmapScalingMode" Value="HighQuality"/>
- <Setter Property="Height" Value="100"/>
- </Style>
-
- <!--Defines the styles for ListBoxItems. Themes should override this if they choose. -->
- <!--Or, they may find it easier to just override SelectedItemHighlightColor to change the glow color. -->
- <Style x:Key="ListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
- <Setter Property="Padding" Value="0" />
- <Setter Property="Margin" Value="0" />
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
- <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListBoxItem}">
- <Border x:Name="Bd" SnapsToDevicePixels="true" RenderTransformOrigin="0.5,0.5" Padding="3">
- <Border.RenderTransform>
- <TransformGroup>
- <ScaleTransform/>
- <SkewTransform/>
- <RotateTransform/>
- <TranslateTransform/>
- </TransformGroup>
- </Border.RenderTransform>
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup x:Name="SelectionStates">
- <VisualState x:Name="Unselected"/>
- <VisualState x:Name="Selected">
- </VisualState>
- <VisualState x:Name="SelectedUnfocused"/>
- </VisualStateGroup>
- <VisualStateGroup x:Name="CommonStates">
- <VisualStateGroup.Transitions>
- <VisualTransition GeneratedDuration="0:0:0.3"/>
- </VisualStateGroup.Transitions>
- <VisualState x:Name="Normal"/>
- <VisualState x:Name="MouseOver">
- </VisualState>
- <VisualState x:Name="Disabled"/>
- <VisualState x:Name="Focused">
- <Storyboard>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="Bd">
- <EasingDoubleKeyFrame KeyTime="0" Value="1.07">
- <EasingDoubleKeyFrame.EasingFunction>
- <ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
- </EasingDoubleKeyFrame.EasingFunction>
- </EasingDoubleKeyFrame>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="Bd">
- <EasingDoubleKeyFrame KeyTime="0" Value="1.07">
- <EasingDoubleKeyFrame.EasingFunction>
- <ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
- </EasingDoubleKeyFrame.EasingFunction>
- </EasingDoubleKeyFrame>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="Bd">
- <EasingDoubleKeyFrame KeyTime="0" Value="0">
- <EasingDoubleKeyFrame.EasingFunction>
- <ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
- </EasingDoubleKeyFrame.EasingFunction>
- </EasingDoubleKeyFrame>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="Bd">
- <EasingDoubleKeyFrame KeyTime="0" Value="0">
- <EasingDoubleKeyFrame.EasingFunction>
- <ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
- </EasingDoubleKeyFrame.EasingFunction>
- </EasingDoubleKeyFrame>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.Opacity)" Storyboard.TargetName="BdDropShadow">
- <EasingDoubleKeyFrame KeyTime="0" Value="1">
- <EasingDoubleKeyFrame.EasingFunction>
- <ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
- </EasingDoubleKeyFrame.EasingFunction>
- </EasingDoubleKeyFrame>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </VisualState>
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- <Grid x:Name="ContentGrid">
- <Border x:Name="BdDropShadow" Margin="-15" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{DynamicResource SelectedItemHighlightColor}" SnapsToDevicePixels="true" CornerRadius="10" Visibility="Hidden">
- <Border.Effect>
- <BlurEffect Radius="10" KernelType="Gaussian"></BlurEffect>
- </Border.Effect>
- </Border>
- <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsFocused" Value="true">
- <Setter Property="Visibility" TargetName="BdDropShadow" Value="Visible"/>
- <Setter Property="Panel.ZIndex" Value="5"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <Trigger Property="IsKeyboardFocusWithin" Value="True">
- <Setter Property="IsSelected" Value="True" />
- </Trigger>
- </Style.Triggers>
- </Style>
-
- <!--Provides styling for a button that matches list box items. Themes should override this if they choose. -->
- <!--Or, they may find it easier to just override SelectedItemHighlightColor to change the glow color. -->
- <Style x:Key="BaseItemButtonStyle" TargetType="{x:Type Button}">
- <Setter Property="SnapsToDevicePixels" Value="true"/>
- <Setter Property="OverridesDefaultStyle" Value="true"/>
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="Margin" Value="0"/>
- <Setter Property="Padding" Value="0"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border x:Name="Bd" SnapsToDevicePixels="true" RenderTransformOrigin="0.5,0.5" Padding="3">
- <Border.RenderTransform>
- <TransformGroup>
- <ScaleTransform/>
- <SkewTransform/>
- <RotateTransform/>
- <TranslateTransform/>
- </TransformGroup>
- </Border.RenderTransform>
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup x:Name="CommonStates">
- <VisualStateGroup.Transitions>
- <VisualTransition GeneratedDuration="0:0:0.25"/>
- </VisualStateGroup.Transitions>
- <VisualState x:Name="Normal"/>
- <VisualState x:Name="MouseOver">
- </VisualState>
- <VisualState x:Name="Disabled"/>
- <VisualState x:Name="Focused">
- <Storyboard>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="Bd">
- <EasingDoubleKeyFrame KeyTime="0" Value="1.07">
- <EasingDoubleKeyFrame.EasingFunction>
- <ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
- </EasingDoubleKeyFrame.EasingFunction>
- </EasingDoubleKeyFrame>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" Storyboard.TargetName="Bd">
- <EasingDoubleKeyFrame KeyTime="0" Value="1.07">
- <EasingDoubleKeyFrame.EasingFunction>
- <ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
- </EasingDoubleKeyFrame.EasingFunction>
- </EasingDoubleKeyFrame>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="Bd">
- <EasingDoubleKeyFrame KeyTime="0" Value="0">
- <EasingDoubleKeyFrame.EasingFunction>
- <ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
- </EasingDoubleKeyFrame.EasingFunction>
- </EasingDoubleKeyFrame>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="Bd">
- <EasingDoubleKeyFrame KeyTime="0" Value="0">
- <EasingDoubleKeyFrame.EasingFunction>
- <ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
- </EasingDoubleKeyFrame.EasingFunction>
- </EasingDoubleKeyFrame>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Effect).(DropShadowEffect.Opacity)" Storyboard.TargetName="BdDropShadow">
- <EasingDoubleKeyFrame KeyTime="0" Value="1">
- <EasingDoubleKeyFrame.EasingFunction>
- <ExponentialEase EasingMode="EaseInOut"></ExponentialEase>
- </EasingDoubleKeyFrame.EasingFunction>
- </EasingDoubleKeyFrame>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </VisualState>
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- <Grid x:Name="ContentGrid">
- <Border x:Name="BdDropShadow" Margin="-15" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{DynamicResource SelectedItemHighlightColor}" SnapsToDevicePixels="true" CornerRadius="10" Visibility="Hidden">
- <Border.Effect>
- <BlurEffect Radius="10" KernelType="Gaussian"></BlurEffect>
- </Border.Effect>
- </Border>
- <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsFocused" Value="true">
- <Setter Property="Visibility" TargetName="BdDropShadow" Value="Visible"/>
- <Setter Property="Panel.ZIndex" Value="5"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
-</ResourceDictionary> \ No newline at end of file
diff --git a/MediaBrowser.UI/Resources/Images/Icon.ico b/MediaBrowser.UI/Resources/Images/Icon.ico
deleted file mode 100644
index 0f7d8c955..000000000
--- a/MediaBrowser.UI/Resources/Images/Icon.ico
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/Images/MessageBox/Asterisk.png b/MediaBrowser.UI/Resources/Images/MessageBox/Asterisk.png
deleted file mode 100644
index 0bc86ef4f..000000000
--- a/MediaBrowser.UI/Resources/Images/MessageBox/Asterisk.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/Images/MessageBox/Error.png b/MediaBrowser.UI/Resources/Images/MessageBox/Error.png
deleted file mode 100644
index 039a864ea..000000000
--- a/MediaBrowser.UI/Resources/Images/MessageBox/Error.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/Images/MessageBox/Exclamation.png b/MediaBrowser.UI/Resources/Images/MessageBox/Exclamation.png
deleted file mode 100644
index 039a864ea..000000000
--- a/MediaBrowser.UI/Resources/Images/MessageBox/Exclamation.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/Images/MessageBox/Hand.png b/MediaBrowser.UI/Resources/Images/MessageBox/Hand.png
deleted file mode 100644
index 4adf793a2..000000000
--- a/MediaBrowser.UI/Resources/Images/MessageBox/Hand.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/Images/MessageBox/Information.png b/MediaBrowser.UI/Resources/Images/MessageBox/Information.png
deleted file mode 100644
index 3fd09c1bc..000000000
--- a/MediaBrowser.UI/Resources/Images/MessageBox/Information.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/Images/MessageBox/Question.png b/MediaBrowser.UI/Resources/Images/MessageBox/Question.png
deleted file mode 100644
index 6aabd219b..000000000
--- a/MediaBrowser.UI/Resources/Images/MessageBox/Question.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/Images/MessageBox/Stop.png b/MediaBrowser.UI/Resources/Images/MessageBox/Stop.png
deleted file mode 100644
index cdbcbaced..000000000
--- a/MediaBrowser.UI/Resources/Images/MessageBox/Stop.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/Images/MessageBox/Warning.png b/MediaBrowser.UI/Resources/Images/MessageBox/Warning.png
deleted file mode 100644
index 6467ed54b..000000000
--- a/MediaBrowser.UI/Resources/Images/MessageBox/Warning.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/Images/NavBar/BackButton.png b/MediaBrowser.UI/Resources/Images/NavBar/BackButton.png
deleted file mode 100644
index f72f44563..000000000
--- a/MediaBrowser.UI/Resources/Images/NavBar/BackButton.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/Images/NavBar/MediaBack.png b/MediaBrowser.UI/Resources/Images/NavBar/MediaBack.png
deleted file mode 100644
index 601bdbcb5..000000000
--- a/MediaBrowser.UI/Resources/Images/NavBar/MediaBack.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/Images/NavBar/MediaFastForward.png b/MediaBrowser.UI/Resources/Images/NavBar/MediaFastForward.png
deleted file mode 100644
index 666557dd2..000000000
--- a/MediaBrowser.UI/Resources/Images/NavBar/MediaFastForward.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/Images/NavBar/MediaForward.png b/MediaBrowser.UI/Resources/Images/NavBar/MediaForward.png
deleted file mode 100644
index e63767fc0..000000000
--- a/MediaBrowser.UI/Resources/Images/NavBar/MediaForward.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/Images/NavBar/MediaRewind.png b/MediaBrowser.UI/Resources/Images/NavBar/MediaRewind.png
deleted file mode 100644
index fd7afa031..000000000
--- a/MediaBrowser.UI/Resources/Images/NavBar/MediaRewind.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/Images/NavBar/MuteButton.png b/MediaBrowser.UI/Resources/Images/NavBar/MuteButton.png
deleted file mode 100644
index c642a36c5..000000000
--- a/MediaBrowser.UI/Resources/Images/NavBar/MuteButton.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/Images/NavBar/PauseButton.png b/MediaBrowser.UI/Resources/Images/NavBar/PauseButton.png
deleted file mode 100644
index edac58049..000000000
--- a/MediaBrowser.UI/Resources/Images/NavBar/PauseButton.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/Images/NavBar/PlayButton.png b/MediaBrowser.UI/Resources/Images/NavBar/PlayButton.png
deleted file mode 100644
index 52ca33ed0..000000000
--- a/MediaBrowser.UI/Resources/Images/NavBar/PlayButton.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/Images/NavBar/StopButton.png b/MediaBrowser.UI/Resources/Images/NavBar/StopButton.png
deleted file mode 100644
index b394ddf60..000000000
--- a/MediaBrowser.UI/Resources/Images/NavBar/StopButton.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/Images/NavBar/VolumeDownButton.png b/MediaBrowser.UI/Resources/Images/NavBar/VolumeDownButton.png
deleted file mode 100644
index 0c8617a43..000000000
--- a/MediaBrowser.UI/Resources/Images/NavBar/VolumeDownButton.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/Images/NavBar/VolumeUpButton.png b/MediaBrowser.UI/Resources/Images/NavBar/VolumeUpButton.png
deleted file mode 100644
index 80d80e647..000000000
--- a/MediaBrowser.UI/Resources/Images/NavBar/VolumeUpButton.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/Images/mblogoblack.png b/MediaBrowser.UI/Resources/Images/mblogoblack.png
deleted file mode 100644
index e16748978..000000000
--- a/MediaBrowser.UI/Resources/Images/mblogoblack.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/Images/mblogoblackfull.png b/MediaBrowser.UI/Resources/Images/mblogoblackfull.png
deleted file mode 100644
index 340f12d9d..000000000
--- a/MediaBrowser.UI/Resources/Images/mblogoblackfull.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/Images/mblogowhite.png b/MediaBrowser.UI/Resources/Images/mblogowhite.png
deleted file mode 100644
index b6b0f158b..000000000
--- a/MediaBrowser.UI/Resources/Images/mblogowhite.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/Images/mblogowhitefull.png b/MediaBrowser.UI/Resources/Images/mblogowhitefull.png
deleted file mode 100644
index 48c8f72d3..000000000
--- a/MediaBrowser.UI/Resources/Images/mblogowhitefull.png
+++ /dev/null
Binary files differ
diff --git a/MediaBrowser.UI/Resources/MainWindowResources.xaml b/MediaBrowser.UI/Resources/MainWindowResources.xaml
deleted file mode 100644
index fde1e168d..000000000
--- a/MediaBrowser.UI/Resources/MainWindowResources.xaml
+++ /dev/null
@@ -1,58 +0,0 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:Controls="clr-namespace:MediaBrowser.UI.Controls"
- xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI.Controls">
-
- <!--Default Window style. -->
- <Style TargetType="Window" x:Key="MainWindow">
- <Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}"/>
- <Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}"/>
- <Setter Property="FontWeight" Value="{DynamicResource DefaultFontWeight}"/>
- <Setter Property="Foreground" Value="{DynamicResource DefaultForeground}"/>
- <Setter Property="BorderBrush" Value="#000000"/>
- <Setter Property="BorderThickness" Value="1"/>
- <Style.Triggers>
- <Trigger Property="WindowState" Value="Maximized">
- <Setter Property="BorderThickness" Value="7"/>
- <Setter Property="BorderBrush" Value="#000000"/>
- </Trigger>
- </Style.Triggers>
- </Style>
-
- <!--Themes may want to override this to adjust the backdrop image style-->
- <Style TargetType="Image" x:Key="BackdropImage">
- <Setter Property="Stretch" Value="UniformToFill"/>
- <Setter Property="Opacity" Value=".3"/>
- </Style>
-
- <Style TargetType="Grid" x:Key="WindowBackgroundContent">
- </Style>
- <Style TargetType="Grid" x:Key="WindowBackgroundContentDuringPlayback">
- <Setter Property="Opacity" Value=".4"/>
- </Style>
- <Style TargetType="Grid" x:Key="DragBar">
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="Height" Value="20"/>
- <Setter Property="VerticalAlignment" Value="Top"/>
- <Setter Property="Panel.ZIndex" Value="1"/>
- </Style>
- <Style TargetType="UserControl" x:Key="WindowCommands">
- <Setter Property="Margin" Value="0 10 0 0"/>
- <Setter Property="HorizontalAlignment" Value="Right"/>
- <Setter Property="VerticalAlignment" Value="Top"/>
- <Setter Property="Panel.ZIndex" Value="2"/>
- <Setter Property="Visibility" Value="Collapsed" />
- <Style.Triggers>
- <DataTrigger Binding="{Binding Path=ApplicationWindow.IsMouseIdle}" Value="false">
- <Setter Property="Visibility" Value="Visible" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
-
- <!--Themes should override this to layout window content-->
- <ControlTemplate x:Key="PageContentTemplate">
- <controls:TransitionFrame x:Name="PageFrame">
- </controls:TransitionFrame>
- </ControlTemplate>
-
-</ResourceDictionary> \ No newline at end of file
diff --git a/MediaBrowser.UI/Resources/ModalMessage.xaml b/MediaBrowser.UI/Resources/ModalMessage.xaml
deleted file mode 100644
index 9ae288c1d..000000000
--- a/MediaBrowser.UI/Resources/ModalMessage.xaml
+++ /dev/null
@@ -1,136 +0,0 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-
- <!--Modal background style. -->
- <Style TargetType="Grid" x:Key="ModalOverlayStyle">
- <Setter Property="Background" Value="Gray"/>
- <Setter Property="Opacity" Value=".4"/>
- </Style>
-
- <!--Modal Window style. -->
- <Style TargetType="Window" x:Key="ModalWindow">
- <Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}"/>
- <Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}"/>
- <Setter Property="FontWeight" Value="{DynamicResource DefaultFontWeight}"/>
- <Setter Property="Foreground" Value="{DynamicResource DefaultForeground}"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="KeyboardNavigation.DirectionalNavigation" Value="Contained"/>
- </Style>
-
- <!--Modal content style. -->
- <Style TargetType="Grid" x:Key="ModalContentStyle">
- <Setter Property="HorizontalAlignment" Value="Stretch"/>
- <Setter Property="VerticalAlignment" Value="Center"/>
- <Setter Property="Background" Value="#022255"/>
- <Setter Property="Opacity" Value=".96"/>
- </Style>
-
- <!--Modal content style. -->
- <Style TargetType="Grid" x:Key="ModalContentInnerStyle">
- <Setter Property="HorizontalAlignment" Value="Center"/>
- <Setter Property="MaxWidth" Value="800"/>
- <Setter Property="Margin" Value="0 20 0 20" />
- </Style>
-
- <!--Modal message caption style. -->
- <Style TargetType="TextBlock" x:Key="ModalTextStyle">
- <Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}"/>
- <Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}"/>
- <Setter Property="FontWeight" Value="{DynamicResource DefaultFontWeight}"/>
- <Setter Property="Foreground" Value="{DynamicResource DefaultForeground}"/>
- <Setter Property="TextWrapping" Value="Wrap" />
- <Setter Property="Margin" Value="0 20 0 20" />
- </Style>
-
- <!--Modal button image -->
- <Style TargetType="Image" x:Key="ModalButtonImage">
- <Setter Property="VerticalAlignment" Value="Top"/>
- <Setter Property="HorizontalAlignment" Value="Left"/>
- <Setter Property="Stretch" Value="None"/>
- <Setter Property="Margin" Value="0 30 20 10" />
- <Style.Triggers>
- <DataTrigger Binding="{Binding MessageBoxImage}" Value="Asterisk">
- <Setter Property="Source" Value="../Resources/Images/MessageBox/Asterisk.png">
- </Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding MessageBoxImage}" Value="Information">
- <Setter Property="Source" Value="../Resources/Images/MessageBox/Information.png">
- </Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding MessageBoxImage}" Value="Warning">
- <Setter Property="Source" Value="../Resources/Images/MessageBox/Warning.png">
- </Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding MessageBoxImage}" Value="Exclamation">
- <Setter Property="Source" Value="../Resources/Images/MessageBox/Exclamation.png">
- </Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding MessageBoxImage}" Value="Question">
- <Setter Property="Source" Value="../Resources/Images/MessageBox/Question.png">
- </Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding MessageBoxImage}" Value="Stop">
- <Setter Property="Source" Value="../Resources/Images/MessageBox/Stop.png">
- </Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding MessageBoxImage}" Value="Hand">
- <Setter Property="Source" Value="../Resources/Images/MessageBox/Hand.png">
- </Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding MessageBoxImage}" Value="Error">
- <Setter Property="Source" Value="../Resources/Images/MessageBox/Error.png">
- </Setter>
- </DataTrigger>
- <DataTrigger Binding="{Binding MessageBoxImage}" Value="None">
- <Setter Property="Source" Value="{x:Null}"></Setter>
- <Setter Property="Visibility" Value="Collapsed"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
-
- <!--Modal content style. -->
- <Style TargetType="StackPanel" x:Key="ModalButtonPanel">
- <Setter Property="HorizontalAlignment" Value="Right"/>
- <Setter Property="Orientation" Value="Horizontal"/>
- <Setter Property="Margin" Value="0 20 0 30" />
- </Style>
-
- <!--Modal content style. -->
- <Style TargetType="Button" x:Key="ModalButton">
- <Setter Property="Padding" Value="0"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="Margin" Value="20 0 0 0" />
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="Foreground" Value="White"/>
- <Setter Property="SnapsToDevicePixels" Value="true"/>
- <Setter Property="OverridesDefaultStyle" Value="true"/>
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="White" BorderThickness="2" Padding="20 5 20 5">
- <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsKeyboardFocused" Value="true">
- <Setter TargetName="Border" Property="Background" Value="#0069C5" />
- </Trigger>
- <Trigger Property="IsFocused" Value="true">
- <Setter TargetName="Border" Property="Background" Value="#0069C5" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="Border" Property="Background" Value="#0069C5" />
- </Trigger>
- <Trigger Property="IsPressed" Value="true">
- <Setter TargetName="Border" Property="Background" Value="#0069C5" />
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter TargetName="Border" Property="Background" Value="Gray" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
-</ResourceDictionary> \ No newline at end of file
diff --git a/MediaBrowser.UI/Resources/NavBarResources.xaml b/MediaBrowser.UI/Resources/NavBarResources.xaml
deleted file mode 100644
index 771c037a7..000000000
--- a/MediaBrowser.UI/Resources/NavBarResources.xaml
+++ /dev/null
@@ -1,149 +0,0 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
- <Style TargetType="Button" x:Key="NavBarButton">
- <Setter Property="Margin" Value="10 0 10 0"/>
- <Setter Property="KeyboardNavigation.IsTabStop" Value="false"/>
- <Setter Property="Padding" Value="0"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="Cursor" Value="Hand"/>
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Opacity" Value=".5" />
- </Trigger>
- </Style.Triggers>
- </Style>
-
- <Style TargetType="Button" x:Key="BackButton" BasedOn="{StaticResource NavBarButton}">
- <Setter Property="ToolTip" Value="Back"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate>
- <Image x:Name="img" Source="..\Resources\Images\NavBar\BackButton.png" Stretch="None" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style TargetType="Button" x:Key="VolumeUpButton" BasedOn="{StaticResource NavBarButton}">
- <Setter Property="ToolTip" Value="Increase Volume"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate>
- <Image x:Name="img" Source="..\Resources\Images\NavBar\VolumeUpButton.png" Stretch="None" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style TargetType="Button" x:Key="VolumeDownButton" BasedOn="{StaticResource NavBarButton}">
- <Setter Property="ToolTip" Value="Decrease Volume"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate>
- <Image x:Name="img" Source="..\Resources\Images\NavBar\VolumeDownButton.png" Stretch="None" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style TargetType="Button" x:Key="MuteButton" BasedOn="{StaticResource NavBarButton}">
- <Setter Property="ToolTip" Value="Mute"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate>
- <Image x:Name="img" Source="..\Resources\Images\NavBar\MuteButton.png" Stretch="None" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style TargetType="Button" x:Key="PlayButton" BasedOn="{StaticResource NavBarButton}">
- <Setter Property="ToolTip" Value="Play"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate>
- <Image x:Name="img" Source="..\Resources\Images\NavBar\PlayButton.png" Stretch="None" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style TargetType="Button" x:Key="PauseButton" BasedOn="{StaticResource NavBarButton}">
- <Setter Property="ToolTip" Value="Pause"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate>
- <Image x:Name="img" Source="..\Resources\Images\NavBar\PauseButton.png" Stretch="None" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style TargetType="Button" x:Key="StopButton" BasedOn="{StaticResource NavBarButton}">
- <Setter Property="ToolTip" Value="Stop"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate>
- <Image x:Name="img" Source="..\Resources\Images\NavBar\StopButton.png" Stretch="None" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style TargetType="Button" x:Key="NextChapterButton" BasedOn="{StaticResource NavBarButton}">
- <Setter Property="ToolTip" Value="Next Chapter"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate>
- <Image x:Name="img" Source="..\Resources\Images\NavBar\MediaForward.png" Stretch="None" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style TargetType="Button" x:Key="PreviousChapterButton" BasedOn="{StaticResource NavBarButton}">
- <Setter Property="ToolTip" Value="Previous Chapter"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate>
- <Image x:Name="img" Source="..\Resources\Images\NavBar\MediaBack.png" Stretch="None" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style TargetType="Grid" x:Key="NavBarGrid">
- <Setter Property="VerticalAlignment" Value="Bottom"/>
- <Setter Property="Visibility" Value="Collapsed" />
- <Style.Triggers>
- <DataTrigger Binding="{Binding Path=ApplicationWindow.IsMouseIdle}" Value="false">
- <Setter Property="Visibility" Value="Visible" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- <Style TargetType="Grid" x:Key="NavBarBackgroundGrid">
- <Setter Property="Background">
- <Setter.Value>
- <SolidColorBrush Color="#A6000000"></SolidColorBrush>
- </Setter.Value>
- </Setter>
- </Style>
- <Style TargetType="StackPanel" x:Key="NavBarGridLeftPanel">
- <Setter Property="Grid.Column" Value="0"/>
- <Setter Property="HorizontalAlignment" Value="Left"/>
- <Setter Property="Orientation" Value="Horizontal"/>
- <Setter Property="Margin" Value="15 12 15 12"/>
- </Style>
- <Style TargetType="StackPanel" x:Key="NavBarGridCenterPanel">
- <Setter Property="Grid.Column" Value="1"/>
- <Setter Property="HorizontalAlignment" Value="Center"/>
- <Setter Property="Orientation" Value="Horizontal"/>
- <Setter Property="Margin" Value="15 12 15 12"/>
- </Style>
- <Style TargetType="StackPanel" x:Key="NavBarGridRightPanel">
- <Setter Property="Grid.Column" Value="2"/>
- <Setter Property="HorizontalAlignment" Value="Right"/>
- <Setter Property="Orientation" Value="Horizontal"/>
- <Setter Property="Margin" Value="15 12 15 12"/>
- </Style>
-</ResourceDictionary> \ No newline at end of file
diff --git a/MediaBrowser.UI/Resources/NotificationMessage.xaml b/MediaBrowser.UI/Resources/NotificationMessage.xaml
deleted file mode 100644
index 5591e9e0d..000000000
--- a/MediaBrowser.UI/Resources/NotificationMessage.xaml
+++ /dev/null
@@ -1,43 +0,0 @@
-<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-
- <!--Content style. -->
- <Style TargetType="Grid" x:Key="NotificationContentStyle">
- <Setter Property="HorizontalAlignment" Value="Right"/>
- <Setter Property="VerticalAlignment" Value="Bottom"/>
- <Setter Property="Background" Value="#FF870F"/>
- <Setter Property="Margin" Value="0 0 0 20"/>
- </Style>
-
- <!--Content style. -->
- <Style TargetType="Grid" x:Key="NotificationContentInnerStyle">
- <Setter Property="HorizontalAlignment" Value="Center"/>
- <Setter Property="MaxWidth" Value="500"/>
- <Setter Property="Margin" Value="0 0 20 0"/>
- </Style>
-
- <!--Message caption style. -->
- <Style TargetType="TextBlock" x:Key="NotificationCaptionStyle">
- <Setter Property="FontSize" Value="{DynamicResource Heading2FontSize}"/>
- <Setter Property="FontFamily" Value="{DynamicResource Heading2FontFamily}"/>
- <Setter Property="FontWeight" Value="{DynamicResource Heading2FontWeight}"/>
- <Setter Property="Foreground" Value="{DynamicResource Heading2Foreground}"/>
- <Setter Property="TextWrapping" Value="Wrap" />
- <Setter Property="Margin" Value="20 20 20 0" />
- </Style>
-
- <!--Message caption style. -->
- <Style TargetType="TextBlock" x:Key="NotificationTextStyle">
- <Setter Property="FontSize" Value="{DynamicResource DefaultFontSize}"/>
- <Setter Property="FontFamily" Value="{DynamicResource DefaultFontFamily}"/>
- <Setter Property="FontWeight" Value="{DynamicResource DefaultFontWeight}"/>
- <Setter Property="Foreground" Value="{DynamicResource DefaultForeground}"/>
- <Setter Property="TextWrapping" Value="Wrap" />
- <Setter Property="Margin" Value="20 20 20 0" />
- </Style>
-
- <!--Modal button image -->
- <Style TargetType="Image" x:Key="NotificationButtonImage" BasedOn="{StaticResource ModalButtonImage}">
- <Setter Property="Margin" Value="20 20 0 20" />
- </Style>
-</ResourceDictionary> \ No newline at end of file
diff --git a/MediaBrowser.UI/UserInput/KeyboardListener.cs b/MediaBrowser.UI/UserInput/KeyboardListener.cs
deleted file mode 100644
index 76ce8e15a..000000000
--- a/MediaBrowser.UI/UserInput/KeyboardListener.cs
+++ /dev/null
@@ -1,210 +0,0 @@
-using System;
-using System.Diagnostics;
-using System.Runtime.InteropServices;
-using System.Windows.Forms;
-
-namespace MediaBrowser.UI.UserInput
-{
- /// <summary>
- /// Provides a basic low-level keyboard listener
- /// Inspired by http://blogs.msdn.com/b/toub/archive/2006/05/03/589423.aspx
- /// Use the KeyDown event to listen for keys.
- /// Make sure to detach from the event when not needed.
- /// </summary>
- public static class KeyboardListener
- {
- #region KeyDown EventHandler
- /// <summary>
- /// The _ key down
- /// </summary>
- static volatile EventHandler<KeyEventArgs> _KeyDown;
- /// <summary>
- /// Fires whenever CurrentItem changes
- /// </summary>
- public static event EventHandler<KeyEventArgs> KeyDown
- {
- add
- {
- if (_KeyDown == null)
- {
- StartListening();
- }
-
- _KeyDown += value;
- }
- remove
- {
- _KeyDown -= value;
-
- if (_KeyDown == null && _hookID != IntPtr.Zero)
- {
- StopListening();
- }
- }
- }
-
- /// <summary>
- /// Raises the <see cref="E:KeyDown" /> event.
- /// </summary>
- /// <param name="e">The <see cref="KeyEventArgs" /> instance containing the event data.</param>
- private static void OnKeyDown(KeyEventArgs e)
- {
- e.SuppressKeyPress = false;
-
- if (_KeyDown != null)
- {
- // For now, don't async this
- // This will give listeners a chance to modify SuppressKeyPress if they want
- try
- {
- _KeyDown(null, e);
- }
- catch (Exception ex)
- {
- }
- }
- }
- #endregion
-
- /// <summary>
- /// The W h_ KEYBOAR d_ LL
- /// </summary>
- private const int WH_KEYBOARD_LL = 13;
- /// <summary>
- /// The W m_ KEYDOWN
- /// </summary>
- private const int WM_KEYDOWN = 0x0100;
- /// <summary>
- /// The W m_ SYSKEYDOWN
- /// </summary>
- private const int WM_SYSKEYDOWN = 0x0104;
-
- /// <summary>
- /// The _hook ID
- /// </summary>
- private static IntPtr _hookID = IntPtr.Zero;
- /// <summary>
- /// The _proc
- /// </summary>
- private static LowLevelKeyboardProc _proc = HookCallback;
-
- /// <summary>
- /// Starts the listening.
- /// </summary>
- private static void StartListening()
- {
- _hookID = SetHook(_proc);
- }
-
- /// <summary>
- /// Stops the listening.
- /// </summary>
- private static void StopListening()
- {
- UnhookWindowsHookEx(_hookID);
- _hookID = IntPtr.Zero;
- }
-
- /// <summary>
- /// Sets the hook.
- /// </summary>
- /// <param name="proc">The proc.</param>
- /// <returns>IntPtr.</returns>
- private static IntPtr SetHook(LowLevelKeyboardProc proc)
- {
- using (var curProcess = Process.GetCurrentProcess())
- using (var curModule = curProcess.MainModule)
- {
- return SetWindowsHookEx(WH_KEYBOARD_LL, proc,
- GetModuleHandle(curModule.ModuleName), 0);
- }
- }
-
- /// <summary>
- /// Hooks the callback.
- /// </summary>
- /// <param name="nCode">The n code.</param>
- /// <param name="wParam">The w param.</param>
- /// <param name="lParam">The l param.</param>
- /// <returns>IntPtr.</returns>
- private static IntPtr HookCallback(int nCode, IntPtr wParam, IntPtr lParam)
- {
- var suppressKeyPress = false;
-
- if (nCode >= 0)
- {
- if (wParam == (IntPtr)WM_KEYDOWN || wParam == (IntPtr)WM_SYSKEYDOWN)
- {
- var vkCode = Marshal.ReadInt32(lParam);
-
- var keyData = (Keys)vkCode;
-
- var e = new KeyEventArgs(keyData);
-
- OnKeyDown(e);
-
- suppressKeyPress = e.SuppressKeyPress;
- }
- }
-
- if (suppressKeyPress)
- {
- return IntPtr.Zero;
- }
-
- return CallNextHookEx(_hookID, nCode, wParam, lParam);
- }
-
- /// <summary>
- /// Delegate LowLevelKeyboardProc
- /// </summary>
- /// <param name="nCode">The n code.</param>
- /// <param name="wParam">The w param.</param>
- /// <param name="lParam">The l param.</param>
- /// <returns>IntPtr.</returns>
- private delegate IntPtr LowLevelKeyboardProc(int nCode, IntPtr wParam, IntPtr lParam);
-
- #region Imports
- /// <summary>
- /// Sets the windows hook ex.
- /// </summary>
- /// <param name="idHook">The id hook.</param>
- /// <param name="lpfn">The LPFN.</param>
- /// <param name="hMod">The h mod.</param>
- /// <param name="dwThreadId">The dw thread id.</param>
- /// <returns>IntPtr.</returns>
- [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
- private static extern IntPtr SetWindowsHookEx(int idHook,
- LowLevelKeyboardProc lpfn, IntPtr hMod, uint dwThreadId);
-
- /// <summary>
- /// Unhooks the windows hook ex.
- /// </summary>
- /// <param name="hhk">The HHK.</param>
- /// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns>
- [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
- [return: MarshalAs(UnmanagedType.Bool)]
- private static extern bool UnhookWindowsHookEx(IntPtr hhk);
-
- /// <summary>
- /// Calls the next hook ex.
- /// </summary>
- /// <param name="hhk">The HHK.</param>
- /// <param name="nCode">The n code.</param>
- /// <param name="wParam">The w param.</param>
- /// <param name="lParam">The l param.</param>
- /// <returns>IntPtr.</returns>
- [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
- private static extern IntPtr CallNextHookEx(IntPtr hhk, int nCode,
- IntPtr wParam, IntPtr lParam);
-
- /// <summary>
- /// Gets the module handle.
- /// </summary>
- /// <param name="lpModuleName">Name of the lp module.</param>
- /// <returns>IntPtr.</returns>
- [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
- private static extern IntPtr GetModuleHandle(string lpModuleName);
- #endregion
- }
-}
diff --git a/MediaBrowser.UI/ViewModels/BaseItemPersonViewModel.cs b/MediaBrowser.UI/ViewModels/BaseItemPersonViewModel.cs
deleted file mode 100644
index 3de9d72cf..000000000
--- a/MediaBrowser.UI/ViewModels/BaseItemPersonViewModel.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using MediaBrowser.Model.Dto;
-
-namespace MediaBrowser.UI.ViewModels
-{
- public class BaseItemPersonViewModel : BaseViewModel
- {
- /// <summary>
- /// The _item
- /// </summary>
- private BaseItemPerson _item;
- /// <summary>
- /// Gets or sets the item.
- /// </summary>
- /// <value>The item.</value>
- public BaseItemPerson Item
- {
- get { return _item; }
-
- set
- {
- _item = value;
- OnPropertyChanged("Item");
- OnPropertyChanged("Image");
- }
- }
- }
-}
diff --git a/MediaBrowser.UI/ViewModels/BaseViewModel.cs b/MediaBrowser.UI/ViewModels/BaseViewModel.cs
deleted file mode 100644
index 03ac9d18a..000000000
--- a/MediaBrowser.UI/ViewModels/BaseViewModel.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System.ComponentModel;
-
-namespace MediaBrowser.UI.ViewModels
-{
- /// <summary>
- /// Represents a base ViewModel
- /// </summary>
- public abstract class BaseViewModel : INotifyPropertyChanged
- {
- /// <summary>
- /// Occurs when [property changed].
- /// </summary>
- public event PropertyChangedEventHandler PropertyChanged;
-
- /// <summary>
- /// Called when [property changed].
- /// </summary>
- /// <param name="name">The name.</param>
- public virtual void OnPropertyChanged(string name)
- {
- if (PropertyChanged != null)
- {
- PropertyChanged(this, new PropertyChangedEventArgs(name));
- }
- }
- }
-}
diff --git a/MediaBrowser.UI/ViewModels/ChapterInfoDtoViewModel.cs b/MediaBrowser.UI/ViewModels/ChapterInfoDtoViewModel.cs
deleted file mode 100644
index 131294ff2..000000000
--- a/MediaBrowser.UI/ViewModels/ChapterInfoDtoViewModel.cs
+++ /dev/null
@@ -1,182 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Entities;
-using MediaBrowser.Model.Net;
-using System;
-using System.Linq;
-using System.Windows.Media.Imaging;
-
-namespace MediaBrowser.UI.ViewModels
-{
- /// <summary>
- /// Class ChapterInfoDtoViewModel
- /// </summary>
- public class ChapterInfoDtoViewModel : BaseViewModel
- {
- /// <summary>
- /// Gets or sets the image download options.
- /// </summary>
- /// <value>The image download options.</value>
- public ImageOptions ImageDownloadOptions { get; set; }
-
- /// <summary>
- /// The _image width
- /// </summary>
- private double _imageWidth;
- /// <summary>
- /// Gets or sets the width of the image.
- /// </summary>
- /// <value>The width of the image.</value>
- public double ImageWidth
- {
- get { return _imageWidth; }
-
- set
- {
- _imageWidth = value;
- OnPropertyChanged("ImageWidth");
- }
- }
-
- /// <summary>
- /// The _image height
- /// </summary>
- private double _imageHeight;
- /// <summary>
- /// Gets or sets the height of the image.
- /// </summary>
- /// <value>The height of the image.</value>
- public double ImageHeight
- {
- get { return _imageHeight; }
-
- set
- {
- _imageHeight = value;
- OnPropertyChanged("ImageHeight");
- }
- }
-
- /// <summary>
- /// The _item
- /// </summary>
- private ChapterInfoDto _chapter;
- /// <summary>
- /// Gets or sets the item.
- /// </summary>
- /// <value>The item.</value>
- public ChapterInfoDto Chapter
- {
- get { return _chapter; }
-
- set
- {
- _chapter = value;
- OnPropertyChanged("Chapter");
- OnPropertyChanged("TimeString");
- OnChapterChanged();
- }
- }
-
- /// <summary>
- /// The _item
- /// </summary>
- private BaseItemDto _item;
- /// <summary>
- /// Gets or sets the item.
- /// </summary>
- /// <value>The item.</value>
- public BaseItemDto Item
- {
- get { return _item; }
-
- set
- {
- _item = value;
- OnPropertyChanged("Item");
- }
- }
-
- /// <summary>
- /// Gets the time string.
- /// </summary>
- /// <value>The time string.</value>
- public string TimeString
- {
- get
- {
- var time = TimeSpan.FromTicks(Chapter.StartPositionTicks);
-
- return time.ToString(time.TotalHours < 1 ? "m':'ss" : "h':'mm':'ss");
- }
- }
-
- /// <summary>
- /// The _image
- /// </summary>
- private BitmapImage _image;
- /// <summary>
- /// Gets the image.
- /// </summary>
- /// <value>The image.</value>
- public BitmapImage Image
- {
- get { return _image; }
- set
- {
- _image = value;
- OnPropertyChanged("Image");
- }
- }
-
- /// <summary>
- /// Called when [item changed].
- /// </summary>
- private async void OnChapterChanged()
- {
- var options = ImageDownloadOptions ?? new ImageOptions { };
-
- options.ImageType = ImageType.ChapterImage;
- options.ImageIndex = Item.Chapters.IndexOf(Chapter);
-
- try
- {
- Image = await App.Instance.GetRemoteBitmapAsync(App.Instance.ApiClient.GetImageUrl(Item, options));
- }
- catch (HttpException)
- {
- }
- }
-
- /// <summary>
- /// Gets the height of the chapter image.
- /// </summary>
- /// <param name="item">The item.</param>
- /// <param name="height">The height.</param>
- /// <param name="defaultWidth">The default width.</param>
- /// <returns>System.Double.</returns>
- public static double GetChapterImageWidth(BaseItemDto item, double height, double defaultWidth)
- {
- var width = defaultWidth;
-
- if (item.MediaStreams != null)
- {
- var videoStream = item.MediaStreams.FirstOrDefault(s => s.Type == MediaStreamType.Video);
-
- if (videoStream != null)
- {
- double streamHeight = videoStream.Height ?? 0;
- double streamWidth = videoStream.Width ?? 0;
-
- if (streamHeight > 0 && streamWidth > 0)
- {
- var aspectRatio = streamWidth / streamHeight;
-
- width = height * aspectRatio;
- }
- }
- }
-
- return width;
- }
- }
-}
diff --git a/MediaBrowser.UI/ViewModels/DtoBaseItemViewModel.cs b/MediaBrowser.UI/ViewModels/DtoBaseItemViewModel.cs
deleted file mode 100644
index f8194e04b..000000000
--- a/MediaBrowser.UI/ViewModels/DtoBaseItemViewModel.cs
+++ /dev/null
@@ -1,183 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Entities;
-using MediaBrowser.UI.Pages;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-
-namespace MediaBrowser.UI.ViewModels
-{
- /// <summary>
- /// Class DtoBaseItemViewModel
- /// </summary>
- public class DtoBaseItemViewModel : BaseViewModel
- {
- /// <summary>
- /// The _average primary image aspect ratio
- /// </summary>
- private double _averagePrimaryImageAspectRatio;
- /// <summary>
- /// Gets the aspect ratio that should be used if displaying the primary image
- /// </summary>
- /// <value>The average primary image aspect ratio.</value>
- public double AveragePrimaryImageAspectRatio
- {
- get { return _averagePrimaryImageAspectRatio; }
-
- set
- {
- _averagePrimaryImageAspectRatio = value;
- OnPropertyChanged("AveragePrimaryImageAspectRatio");
- }
- }
-
- /// <summary>
- /// The _parent display preferences
- /// </summary>
- private DisplayPreferences _parentDisplayPreferences;
- /// <summary>
- /// Gets of sets the current DisplayPreferences
- /// </summary>
- /// <value>The parent display preferences.</value>
- public DisplayPreferences ParentDisplayPreferences
- {
- get { return _parentDisplayPreferences; }
-
- set
- {
- _parentDisplayPreferences = value;
- NotifyDisplayPreferencesChanged();
- }
- }
-
- /// <summary>
- /// The _item
- /// </summary>
- private BaseItemDto _item;
- /// <summary>
- /// Gets or sets the item.
- /// </summary>
- /// <value>The item.</value>
- public BaseItemDto Item
- {
- get { return _item; }
-
- set
- {
- _item = value;
- OnPropertyChanged("Item");
- }
- }
-
- /// <summary>
- /// Notifies the display preferences changed.
- /// </summary>
- public void NotifyDisplayPreferencesChanged()
- {
- OnPropertyChanged("DisplayPreferences");
- }
-
- /// <summary>
- /// Gets an image url that can be used to download an image from the api
- /// </summary>
- /// <param name="imageType">The type of image requested</param>
- /// <param name="imageIndex">The image index, if there are multiple. Currently only applies to backdrops. Supply null or 0 for first backdrop.</param>
- /// <returns>System.String.</returns>
- public string GetImageUrl(ImageType imageType, int? imageIndex = null)
- {
- var height = ParentDisplayPreferences.PrimaryImageHeight;
-
- var averageAspectRatio = BaseFolderPage.GetAspectRatio(imageType, AveragePrimaryImageAspectRatio);
-
- var width = height * averageAspectRatio;
-
- var imageOptions = new ImageOptions
- {
- ImageType = imageType,
- ImageIndex = imageIndex,
- Height = height
- };
-
- if (imageType == ImageType.Primary)
- {
- var currentAspectRatio = imageType == ImageType.Primary ? Item.PrimaryImageAspectRatio ?? width / height : width / height;
-
- // Preserve the exact AR if it deviates from the average significantly
- var preserveExactAspectRatio = Math.Abs(currentAspectRatio - averageAspectRatio) > .10;
-
- if (!preserveExactAspectRatio)
- {
- imageOptions.Width = Convert.ToInt32(width);
- }
- }
-
- return App.Instance.ApiClient.GetImageUrl(Item, imageOptions);
- }
-
- /// <summary>
- /// Gets the average primary image aspect ratio.
- /// </summary>
- /// <param name="items">The items.</param>
- /// <returns>System.Double.</returns>
- /// <exception cref="System.ArgumentNullException">items</exception>
- public static double GetAveragePrimaryImageAspectRatio(IEnumerable<BaseItemDto> items)
- {
- if (items == null)
- {
- throw new ArgumentNullException("items");
- }
-
- double total = 0;
- var count = 0;
-
- foreach (var child in items)
- {
- var ratio = child.PrimaryImageAspectRatio ?? 0;
-
- if (ratio.Equals(0))
- {
- continue;
- }
-
- total += ratio;
- count++;
- }
-
- return count == 0 ? 1 : total / count;
- }
-
- /// <summary>
- /// Gets the observable items.
- /// </summary>
- /// <param name="items">The items.</param>
- /// <returns>ObservableCollection{DtoBaseItemViewModel}.</returns>
- public static ObservableCollection<DtoBaseItemViewModel> GetObservableItems(BaseItemDto[] items)
- {
- return GetObservableItems(items, GetAveragePrimaryImageAspectRatio(items));
- }
-
- /// <summary>
- /// Gets the observable items.
- /// </summary>
- /// <param name="items">The items.</param>
- /// <param name="averagePrimaryImageAspectRatio">The average primary image aspect ratio.</param>
- /// <param name="parentDisplayPreferences">The parent display preferences.</param>
- /// <returns>ObservableCollection{DtoBaseItemViewModel}.</returns>
- /// <exception cref="System.ArgumentNullException">items</exception>
- public static ObservableCollection<DtoBaseItemViewModel> GetObservableItems(IEnumerable<BaseItemDto> items, double averagePrimaryImageAspectRatio, DisplayPreferences parentDisplayPreferences = null)
- {
- if (items == null)
- {
- throw new ArgumentNullException("items");
- }
-
- return new ObservableCollection<DtoBaseItemViewModel>(items.Select(i => new DtoBaseItemViewModel
- {
- Item = i,
- ParentDisplayPreferences = parentDisplayPreferences,
- AveragePrimaryImageAspectRatio = averagePrimaryImageAspectRatio
- }));
- }
- }
-}
diff --git a/MediaBrowser.UI/ViewModels/ItemCollectionViewModel.cs b/MediaBrowser.UI/ViewModels/ItemCollectionViewModel.cs
deleted file mode 100644
index 3e7f6b841..000000000
--- a/MediaBrowser.UI/ViewModels/ItemCollectionViewModel.cs
+++ /dev/null
@@ -1,158 +0,0 @@
-using MediaBrowser.Model.Dto;
-using System;
-using System.Threading;
-using System.Windows;
-
-namespace MediaBrowser.UI.ViewModels
-{
- /// <summary>
- /// Represents a view model that contains multiple items.
- /// This should be used if you want to display a button or list item that holds more than one item,
- /// and cycle through them periodically.
- /// </summary>
- public class ItemCollectionViewModel : BaseViewModel, IDisposable
- {
- private int RotationPeriodMs { get; set; }
-
- public ItemCollectionViewModel(int rotationPeriodMs = 10000, int rotationDevaiationMs = 2000)
- : base()
- {
- if (rotationDevaiationMs > 0)
- {
- rotationPeriodMs += new Random(Guid.NewGuid().GetHashCode()).Next(0 - rotationDevaiationMs, rotationDevaiationMs);
- }
-
- RotationPeriodMs = rotationPeriodMs;
- }
-
- /// <summary>
- /// Gets the timer that updates the current item
- /// </summary>
- private Timer CurrentItemTimer { get; set; }
-
- private string _name;
- /// <summary>
- /// Gets or sets the name of the collection
- /// </summary>
- public string Name
- {
- get { return _name; }
- set
- {
- _name = value;
- OnPropertyChanged("Name");
- }
- }
-
- private BaseItemDto[] _items;
- /// <summary>
- /// Gets or sets the list of items
- /// </summary>
- public BaseItemDto[] Items
- {
- get { return _items; }
- set
- {
- _items = value ?? new BaseItemDto[] { };
- OnPropertyChanged("Items");
- CurrentItemIndex = Items.Length == 0 ? -1 : 0;
-
- ReloadTimer();
- }
- }
-
- private int _currentItemIndex;
- /// <summary>
- /// Gets or sets the index of the current item
- /// </summary>
- public int CurrentItemIndex
- {
- get { return _currentItemIndex; }
- set
- {
- _currentItemIndex = value;
- OnPropertyChanged("CurrentItemIndex");
- OnPropertyChanged("CurrentItem");
- OnPropertyChanged("NextItem");
- }
- }
-
- /// <summary>
- /// Gets the current item
- /// </summary>
- public BaseItemDto CurrentItem
- {
- get { return CurrentItemIndex == -1 ? null : Items[CurrentItemIndex]; }
- }
-
- /// <summary>
- /// Gets the next item
- /// </summary>
- public BaseItemDto NextItem
- {
- get
- {
- if (CurrentItem == null || CurrentItemIndex == -1)
- {
- return null;
- }
- var index = CurrentItemIndex + 1;
-
- if (index >= Items.Length)
- {
- index = 0;
- }
-
- return Items[index];
- }
- }
-
- /// <summary>
- /// Disposes the timer
- /// </summary>
- private void DisposeTimer()
- {
- if (CurrentItemTimer != null)
- {
- CurrentItemTimer.Dispose();
- }
- }
-
- /// <summary>
- /// Reloads the timer
- /// </summary>
- private void ReloadTimer()
- {
- DisposeTimer();
-
- // Don't bother unless there's at least two items
- if (Items.Length > 1)
- {
- CurrentItemTimer = new Timer(state => Application.Current.Dispatcher.InvokeAsync(IncrementCurrentItemIndex), null, RotationPeriodMs, RotationPeriodMs);
- }
- }
-
- /// <summary>
- /// Increments current item index, or resets it back to zero if we're at the end of the list
- /// </summary>
- private void IncrementCurrentItemIndex()
- {
- var newIndex = CurrentItemIndex + 1;
-
- if (newIndex >= Items.Length)
- {
- newIndex = 0;
- }
-
- CurrentItemIndex = newIndex;
- }
-
- /// <summary>
- /// Disposes the collection
- /// </summary>
- public void Dispose()
- {
- DisposeTimer();
- }
- }
-}
diff --git a/MediaBrowser.UI/ViewModels/SpecialFeatureViewModel.cs b/MediaBrowser.UI/ViewModels/SpecialFeatureViewModel.cs
deleted file mode 100644
index f6d51d6db..000000000
--- a/MediaBrowser.UI/ViewModels/SpecialFeatureViewModel.cs
+++ /dev/null
@@ -1,135 +0,0 @@
-using MediaBrowser.Model.Dto;
-using MediaBrowser.Model.Entities;
-using MediaBrowser.Model.Net;
-using System;
-using System.Windows.Media.Imaging;
-
-namespace MediaBrowser.UI.ViewModels
-{
- /// <summary>
- /// Class SpecialFeatureViewModel
- /// </summary>
- public class SpecialFeatureViewModel : BaseViewModel
- {
- /// <summary>
- /// Gets or sets the image download options.
- /// </summary>
- /// <value>The image download options.</value>
- public ImageOptions ImageDownloadOptions { get; set; }
-
- /// <summary>
- /// The _image width
- /// </summary>
- private double _imageWidth;
- /// <summary>
- /// Gets or sets the width of the image.
- /// </summary>
- /// <value>The width of the image.</value>
- public double ImageWidth
- {
- get { return _imageWidth; }
-
- set
- {
- _imageWidth = value;
- OnPropertyChanged("ImageWidth");
- }
- }
-
- /// <summary>
- /// The _image height
- /// </summary>
- private double _imageHeight;
- /// <summary>
- /// Gets or sets the height of the image.
- /// </summary>
- /// <value>The height of the image.</value>
- public double ImageHeight
- {
- get { return _imageHeight; }
-
- set
- {
- _imageHeight = value;
- OnPropertyChanged("ImageHeight");
- }
- }
-
- /// <summary>
- /// The _item
- /// </summary>
- private BaseItemDto _item;
- /// <summary>
- /// Gets or sets the item.
- /// </summary>
- /// <value>The item.</value>
- public BaseItemDto Item
- {
- get { return _item; }
-
- set
- {
- _item = value;
- OnPropertyChanged("Item");
- OnItemChanged();
- }
- }
-
- /// <summary>
- /// Gets the time string.
- /// </summary>
- /// <value>The time string.</value>
- public string MinutesString
- {
- get
- {
- var time = TimeSpan.FromTicks(Item.RunTimeTicks ?? 0);
-
- var minutes = Math.Round(time.TotalMinutes);
-
- if (minutes <= 1)
- {
- return "1 minute";
- }
-
- return string.Format("{0} minutes", minutes);
- }
- }
-
- /// <summary>
- /// The _image
- /// </summary>
- private BitmapImage _image;
- /// <summary>
- /// Gets the image.
- /// </summary>
- /// <value>The image.</value>
- public BitmapImage Image
- {
- get { return _image; }
- set
- {
- _image = value;
- OnPropertyChanged("Image");
- }
- }
-
- /// <summary>
- /// Called when [item changed].
- /// </summary>
- private async void OnItemChanged()
- {
- var options = ImageDownloadOptions ?? new ImageOptions { };
-
- options.ImageType = ImageType.Primary;
-
- try
- {
- Image = await App.Instance.GetRemoteBitmapAsync(App.Instance.ApiClient.GetImageUrl(Item, options));
- }
- catch (HttpException)
- {
- }
- }
- }
-}
diff --git a/MediaBrowser.UI/packages.config b/MediaBrowser.UI/packages.config
deleted file mode 100644
index 3de1bc355..000000000
--- a/MediaBrowser.UI/packages.config
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="MahApps.Metro" version="0.10.1.21-ALPHA" targetFramework="net45" />
- <package id="NLog" version="2.0.0.2000" targetFramework="net45" />
- <package id="protobuf-net" version="2.0.0.621" targetFramework="net45" />
- <package id="SimpleInjector" version="2.0.0-beta5" targetFramework="net45" />
-</packages> \ No newline at end of file
diff --git a/MediaBrowser.UI/plugins/codec/libavcodec_plugin.dll.REMOVED.git-id b/MediaBrowser.UI/plugins/codec/libavcodec_plugin.dll.REMOVED.git-id
deleted file mode 100644
index 8aaa73206..000000000
--- a/MediaBrowser.UI/plugins/codec/libavcodec_plugin.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-b4c5b79372014383488c16e359974e2fbbae5a89 \ No newline at end of file
diff --git a/MediaBrowser.UI/plugins/gui/libqt4_plugin.dll.REMOVED.git-id b/MediaBrowser.UI/plugins/gui/libqt4_plugin.dll.REMOVED.git-id
deleted file mode 100644
index c1c323a92..000000000
--- a/MediaBrowser.UI/plugins/gui/libqt4_plugin.dll.REMOVED.git-id
+++ /dev/null
@@ -1 +0,0 @@
-a70729e8d25a1f2260a18d4cb0e202895d6df263 \ No newline at end of file