The Free Software Media System - Server Backend & API
Added a touch of metro to the Library Explorer
ScottIsAFool68bc39fe4e33
diff --git a/MediaBrowser.ServerApplication/LibraryExplorer.xaml b/MediaBrowser.ServerApplication/LibraryExplorer.xamlindex 2971293c18..51568c0c3d 100644--- a/MediaBrowser.ServerApplication/LibraryExplorer.xaml+++ b/MediaBrowser.ServerApplication/LibraryExplorer.xaml@@ -1,23 +1,46 @@-<Window x:Class="MediaBrowser.ServerApplication.LibraryExplorer"- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"- xmlns:local="clr-namespace:MediaBrowser.ServerApplication"- Title="Library Explorer" Height="733.75" Width="893">+<controls:MetroWindow x:Class="MediaBrowser.ServerApplication.LibraryExplorer"+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"+ xmlns:local="clr-namespace:MediaBrowser.ServerApplication"+ xmlns:controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"+ Title="Library Explorer"+ Height="733.75"+ Width="893">+ <controls:MetroWindow.Resources>+ <ResourceDictionary>+ <ResourceDictionary.MergedDictionaries>+ <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml" />+ <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />+ <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />+ <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Green.xaml" />+ <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />+ </ResourceDictionary.MergedDictionaries>+ </ResourceDictionary>+ </controls:MetroWindow.Resources><Grid Margin="0,0,0,10">- <TreeView x:Name="tvwLibrary" HorizontalAlignment="Left" Margin="10,54,0,0" Width="399" SelectedItemChanged="tvwLibrary_SelectedItemChanged" Height="417" VerticalAlignment="Top">+ <TreeView x:Name="tvwLibrary"+ HorizontalAlignment="Left"+ Margin="10,54,0,0"+ Width="399"+ SelectedItemChanged="tvwLibrary_SelectedItemChanged"+ Height="417"+ VerticalAlignment="Top"><TreeView.Resources><Style TargetType="{x:Type TreeViewItem}"><Setter Property="HeaderTemplate"><Setter.Value><DataTemplate><StackPanel Orientation="Horizontal">- <Image Name="img" Width="20" Height="20" Stretch="Fill"- Source="{Binding RelativeSource={RelativeSource Mode=FindAncestor,+ <Image Name="img"+ Width="20"+ Height="20"+ Stretch="Fill"+ Source="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type TreeViewItem}},Path=Tag,- Converter={x:Static local:ItemToImageConverter.Instance}}"- />- <TextBlock Text="{Binding}" Margin="5,0" />+ Converter={x:Static local:ItemToImageConverter.Instance}}" />+ <TextBlock Text="{Binding}"+ Margin="5,0" /></StackPanel></DataTemplate></Setter.Value>@@ -25,41 +48,143 @@</Style></TreeView.Resources></TreeView>-- <Button x:Name="btnLoad" Content="Load" HorizontalAlignment="Left" Margin="218,25,0,0" VerticalAlignment="Top" Width="75" RenderTransformOrigin="0.373,0.045" Click="btnLoad_Click" Visibility="Hidden"/>- <TextBox x:Name="txtData" Margin="427,54,0,0" HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Top" Height="417" Width="444" VerticalScrollBarVisibility="Auto" />-- <Label Content="Contents
" HorizontalAlignment="Left" Margin="440,23,0,0" VerticalAlignment="Top" Height="26" Width="74" FontWeight="Bold"/>- <ListView x:Name="lstPreviews" HorizontalAlignment="Left" Margin="10,476,0,10" Width="861">++ <Button x:Name="btnLoad"+ Content="Load"+ HorizontalAlignment="Left"+ Margin="218,25,0,0"+ VerticalAlignment="Top"+ Width="75"+ RenderTransformOrigin="0.373,0.045"+ Click="btnLoad_Click"+ Visibility="Hidden" />+ <TextBox x:Name="txtData"+ Margin="427,54,0,0"+ HorizontalAlignment="Left"+ TextWrapping="Wrap"+ VerticalAlignment="Top"+ Height="417"+ Width="444"+ VerticalScrollBarVisibility="Auto" />++ <Label Content="Contents
"+ HorizontalAlignment="Left"+ Margin="440,23,0,0"+ VerticalAlignment="Top"+ Height="26"+ Width="74"+ FontWeight="Bold" />+ <ListView x:Name="lstPreviews"+ HorizontalAlignment="Left"+ Margin="10,476,0,10"+ Width="861"><ListView.ItemsPanel><ItemsPanelTemplate>- <WrapPanel Orientation="Horizontal" MinWidth="100" />+ <WrapPanel Orientation="Horizontal"+ MinWidth="100" /></ItemsPanelTemplate></ListView.ItemsPanel><ListView.ItemTemplate>- <DataTemplate >- <Grid >+ <DataTemplate>+ <Grid><Grid.RowDefinitions><RowDefinition Height="150" /><RowDefinition Height="25" /></Grid.RowDefinitions>- <Image Source="{Binding Preview}" Height="140" MaxWidth="300" Grid.Row="0"/>- <TextBlock Text="{Binding Name}" Grid.Row="1" FontFamily="Segoe Media Center" FontSize="14" FontWeight="Bold" HorizontalAlignment="Center"/>+ <Image Source="{Binding Preview}"+ Height="140"+ MaxWidth="300"+ Grid.Row="0" />+ <TextBlock Text="{Binding Name}"+ Grid.Row="1"+ FontFamily="Segoe Media Center"+ FontSize="14"+ FontWeight="Bold"+ HorizontalAlignment="Center" /></Grid></DataTemplate></ListView.ItemTemplate></ListView>- <ComboBox x:Name="ddlProfile" HorizontalAlignment="Left" Margin="10,25,0,0" VerticalAlignment="Top" Width="191" SelectionChanged="ddlProfile_SelectionChanged"/>- <Label Content="View;" HorizontalAlignment="Left" Margin="10,1,0,0" VerticalAlignment="Top" Height="24" Width="119" FontWeight="Bold" />- <Label x:Name="lblLoading" Content="Loading..." HorizontalAlignment="Left" Margin="140,150,0,0" VerticalAlignment="Top" FontSize="18" Foreground="LightGray" Visibility="Hidden" FontStyle="Italic" FontWeight="Bold" RenderTransformOrigin="0.258,0.5"/>- <Label x:Name="lblObjType" Content="Type:
" HorizontalAlignment="Left" Margin="534,23,0,0" VerticalAlignment="Top" Height="26" Width="158" FontWeight="Bold"/>- <Button x:Name="btnRefresh" Content="Refresh" HorizontalAlignment="Left" Margin="712,25,0,0" VerticalAlignment="Top" Width="82" Click="btnRefresh_Click"/>- <CheckBox x:Name="cbxForce" Content="Force" HorizontalAlignment="Left" Margin="816,28,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.14,-0.562" Width="51"/>- <ComboBox x:Name="ddlIndexBy" HorizontalAlignment="Left" Margin="218,25,0,0" VerticalAlignment="Top" Width="92" SelectionChanged="ddlIndexBy_SelectionChanged"/>- <Label x:Name="lblIndexBy" Content="Index By" HorizontalAlignment="Left" Margin="218,0,0,0" VerticalAlignment="Top" Height="34" Width="75" FontWeight="Bold" />- <ComboBox x:Name="ddlSortBy" HorizontalAlignment="Left" Margin="315,25,0,0" VerticalAlignment="Top" Width="94" SelectionChanged="ddlSortBy_SelectionChanged"/>- <Label x:Name="lblSortBy" Content="Sort By" HorizontalAlignment="Left" Margin="314,0,0,0" VerticalAlignment="Top" Height="34" Width="75" FontWeight="Bold" />- <Label x:Name="lblVersion" Content="Version: " HorizontalAlignment="Left" Margin="729,-6,0,0" VerticalAlignment="Top" Width="138"/>+ <ComboBox x:Name="ddlProfile"+ HorizontalAlignment="Left"+ Margin="10,25,0,0"+ VerticalAlignment="Top"+ Width="191"+ SelectionChanged="ddlProfile_SelectionChanged" />+ <Label Content="View;"+ HorizontalAlignment="Left"+ Margin="10,1,0,0"+ VerticalAlignment="Top"+ Height="24"+ Width="119"+ FontWeight="Bold" />+ <Label x:Name="lblLoading"+ Content="Loading..."+ HorizontalAlignment="Left"+ Margin="140,150,0,0"+ VerticalAlignment="Top"+ FontSize="18"+ Foreground="LightGray"+ Visibility="Hidden"+ FontStyle="Italic"+ FontWeight="Bold"+ RenderTransformOrigin="0.258,0.5" />+ <Label x:Name="lblObjType"+ Content="Type:
"+ HorizontalAlignment="Left"+ Margin="534,23,0,0"+ VerticalAlignment="Top"+ Height="26"+ Width="158"+ FontWeight="Bold" />+ <Button x:Name="btnRefresh"+ Content="Refresh"+ HorizontalAlignment="Left"+ Margin="712,25,0,0"+ VerticalAlignment="Top"+ Width="82"+ Click="btnRefresh_Click" />+ <CheckBox x:Name="cbxForce"+ Content="Force"+ HorizontalAlignment="Left"+ Margin="816,28,0,0"+ VerticalAlignment="Top"+ RenderTransformOrigin="-0.14,-0.562"+ Width="51" />+ <ComboBox x:Name="ddlIndexBy"+ HorizontalAlignment="Left"+ Margin="218,25,0,0"+ VerticalAlignment="Top"+ Width="92"+ SelectionChanged="ddlIndexBy_SelectionChanged" />+ <Label x:Name="lblIndexBy"+ Content="Index By"+ HorizontalAlignment="Left"+ Margin="218,0,0,0"+ VerticalAlignment="Top"+ Height="34"+ Width="75"+ FontWeight="Bold" />+ <ComboBox x:Name="ddlSortBy"+ HorizontalAlignment="Left"+ Margin="315,25,0,0"+ VerticalAlignment="Top"+ Width="94"+ SelectionChanged="ddlSortBy_SelectionChanged" />+ <Label x:Name="lblSortBy"+ Content="Sort By"+ HorizontalAlignment="Left"+ Margin="314,0,0,0"+ VerticalAlignment="Top"+ Height="34"+ Width="75"+ FontWeight="Bold" />+ <Label x:Name="lblVersion"+ Content="Version: "+ HorizontalAlignment="Left"+ Margin="729,-6,0,0"+ VerticalAlignment="Top"+ Width="138" /></Grid>-</Window>+</controls:MetroWindow>diff --git a/MediaBrowser.ServerApplication/LibraryExplorer.xaml.cs b/MediaBrowser.ServerApplication/LibraryExplorer.xaml.csindex 84b3d0c5f0..a50d451deb 100644--- a/MediaBrowser.ServerApplication/LibraryExplorer.xaml.cs+++ b/MediaBrowser.ServerApplication/LibraryExplorer.xaml.cs@@ -1,4 +1,5 @@-using MediaBrowser.Common;+using MahApps.Metro.Controls;+using MediaBrowser.Common;using MediaBrowser.Controller.Entities;using MediaBrowser.Controller.Entities.Movies;using MediaBrowser.Controller.Entities.TV;@@ -27,7 +28,7 @@ namespace MediaBrowser.ServerApplication/// <summary>/// Interaction logic for LibraryExplorer.xaml/// </summary>- public partial class LibraryExplorer : Window+ public partial class LibraryExplorer : MetroWindow{private readonly ILogger _logger;diff --git a/MediaBrowser.ServerApplication/MainWindow.xaml.cs b/MediaBrowser.ServerApplication/MainWindow.xaml.csindex 645c838abd..0c93073941 100644--- a/MediaBrowser.ServerApplication/MainWindow.xaml.cs+++ b/MediaBrowser.ServerApplication/MainWindow.xaml.cs@@ -1,4 +1,5 @@-using MediaBrowser.Common;+using MahApps.Metro.Controls;+using MediaBrowser.Common;using MediaBrowser.Controller;using MediaBrowser.Controller.Configuration;using MediaBrowser.Controller.Entities;diff --git a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csprojindex 7199b5dd24..ad33323c33 100644--- a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj+++ b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj@@ -123,6 +123,9 @@<SpecificVersion>False</SpecificVersion><HintPath>..\packages\DotNetZip.1.9.1.8\lib\net20\Ionic.Zip.dll</HintPath></Reference>+ <Reference Include="MahApps.Metro">+ <HintPath>..\packages\MahApps.Metro.0.11.0.17-ALPHA\lib\net45\MahApps.Metro.dll</HintPath>+ </Reference><Reference Include="MediaBrowser.IsoMounter, Version=1.0.4827.21973, Culture=neutral, processorArchitecture=MSIL"><SpecificVersion>False</SpecificVersion><HintPath>..\packages\MediaBrowser.IsoMounting.3.0.51\lib\net45\MediaBrowser.IsoMounter.dll</HintPath>@@ -157,6 +160,9 @@<Reference Include="System.Net" /><Reference Include="System.Runtime.Remoting" /><Reference Include="System.Windows.Forms" />+ <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">+ <HintPath>..\packages\MahApps.Metro.0.11.0.17-ALPHA\lib\net45\System.Windows.Interactivity.dll</HintPath>+ </Reference><Reference Include="System.Xml" /><Reference Include="Microsoft.CSharp" /><Reference Include="System.Core" />diff --git a/MediaBrowser.ServerApplication/packages.config b/MediaBrowser.ServerApplication/packages.configindex 5e11aaa13b..41907d90eb 100644--- a/MediaBrowser.ServerApplication/packages.config+++ b/MediaBrowser.ServerApplication/packages.config@@ -2,6 +2,7 @@<packages><package id="DotNetZip" version="1.9.1.8" targetFramework="net45" /><package id="Hardcodet.Wpf.TaskbarNotification" version="1.0.4.0" targetFramework="net45" />+ <package id="MahApps.Metro" version="0.11.0.17-ALPHA" targetFramework="net45" /><package id="MediaBrowser.IsoMounting" version="3.0.51" targetFramework="net45" /><package id="NLog" version="2.0.1.2" targetFramework="net45" /><package id="ServiceStack.Common" version="3.9.43" targetFramework="net45" />diff --git a/MediaBrowser.sln b/MediaBrowser.slnindex eb3251f741..f9f5e94365 100644--- a/MediaBrowser.sln+++ b/MediaBrowser.sln@@ -173,7 +173,4 @@ GlobalGlobalSection(SolutionProperties) = preSolutionHideSolutionNode = FALSEEndGlobalSection- GlobalSection(Performance) = preSolution- HasPerformanceSessions = true- EndGlobalSectionEndGlobal