diff options
Diffstat (limited to 'MediaBrowser.Plugins.DefaultTheme')
20 files changed, 683 insertions, 0 deletions
diff --git a/MediaBrowser.Plugins.DefaultTheme/Converters/TileBackgroundConverter.cs b/MediaBrowser.Plugins.DefaultTheme/Converters/TileBackgroundConverter.cs new file mode 100644 index 000000000..a7a964693 --- /dev/null +++ b/MediaBrowser.Plugins.DefaultTheme/Converters/TileBackgroundConverter.cs @@ -0,0 +1,43 @@ +using System;
+using System.Globalization;
+using System.Windows.Data;
+using System.Windows.Media;
+
+namespace MediaBrowser.Plugins.DefaultTheme.Converters
+{
+ public class TileBackgroundConverter : 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)
+ {
+ 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.Plugins.DefaultTheme/Converters/WeatherImageConverter.cs b/MediaBrowser.Plugins.DefaultTheme/Converters/WeatherImageConverter.cs new file mode 100644 index 000000000..0d73a1a6f --- /dev/null +++ b/MediaBrowser.Plugins.DefaultTheme/Converters/WeatherImageConverter.cs @@ -0,0 +1,43 @@ +using MediaBrowser.Model.Weather;
+using System;
+using System.ComponentModel.Composition;
+using System.Globalization;
+using System.Windows.Data;
+
+namespace MediaBrowser.Plugins.DefaultTheme.Converters
+{
+ [PartNotDiscoverable]
+ public class WeatherImageConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ var weather = value as WeatherInfo;
+
+ if (weather != null)
+ {
+ switch (weather.CurrentWeather.Condition)
+ {
+ case WeatherConditions.Thunderstorm:
+ return "../Images/Weather/Thunder.png";
+ case WeatherConditions.Overcast:
+ return "../Images/Weather/Overcast.png";
+ case WeatherConditions.Mist:
+ case WeatherConditions.Sleet:
+ case WeatherConditions.Rain:
+ return "../Images/Weather/Rain.png";
+ case WeatherConditions.Blizzard:
+ case WeatherConditions.Snow:
+ return "../Images/Weather/Snow.png";
+ default:
+ return "../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/MediaBrowser.Plugins.DefaultTheme.csproj b/MediaBrowser.Plugins.DefaultTheme/MediaBrowser.Plugins.DefaultTheme.csproj new file mode 100644 index 000000000..2fe9914ab --- /dev/null +++ b/MediaBrowser.Plugins.DefaultTheme/MediaBrowser.Plugins.DefaultTheme.csproj @@ -0,0 +1,132 @@ +<?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>
+ </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="System" />
+ <Reference Include="System.ComponentModel.Composition" />
+ <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="Pages\LoginPage.xaml.cs">
+ <DependentUpon>LoginPage.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Resources\AppResources.cs" />
+ <Compile Include="Converters\TileBackgroundConverter.cs" />
+ <Compile Include="Converters\WeatherImageConverter.cs" />
+ <Compile Include="Plugin.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>
+ <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>
+ <ProjectReference Include="..\..\MediaBrowserServer\MediaBrowser.Common\MediaBrowser.Common.csproj">
+ <Project>{9142eefa-7570-41e1-bfcc-468bb571af2f}</Project>
+ <Name>MediaBrowser.Common</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\MediaBrowserServer\MediaBrowser.Controller\MediaBrowser.Controller.csproj">
+ <Project>{17e1f4e6-8abd-4fe5-9ecf-43d4b6087ba2}</Project>
+ <Name>MediaBrowser.Controller</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\MediaBrowserServer\MediaBrowser.Model\MediaBrowser.Model.csproj">
+ <Project>{7eeeb4bb-f3e8-48fc-b4c5-70f0fff8329b}</Project>
+ <Name>MediaBrowser.Model</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\MediaBrowserUI\MediaBrowser.UI\MediaBrowser.UI.csproj">
+ <Project>{b5ece1fb-618e-420b-9a99-8e972d76920a}</Project>
+ <Name>MediaBrowser.UI</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Page Include="Pages\LoginPage.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </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>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <PropertyGroup>
+ <PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\ProgramData-Server\Plugins\" /y</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.Plugins.DefaultTheme/Pages/LoginPage.xaml b/MediaBrowser.Plugins.DefaultTheme/Pages/LoginPage.xaml new file mode 100644 index 000000000..4b1552bd8 --- /dev/null +++ b/MediaBrowser.Plugins.DefaultTheme/Pages/LoginPage.xaml @@ -0,0 +1,64 @@ +<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:DTO="clr-namespace:MediaBrowser.Model.DTO;assembly=MediaBrowser.Model"
+ xmlns:controls="clr-namespace:MediaBrowser.UI.Controls;assembly=MediaBrowser.UI" mc:Ignorable="d"
+ d:DesignHeight="300"
+ d:DesignWidth="300"
+ Title="LoginPage">
+
+ <Page.Resources>
+ <ResourceDictionary>
+ <DataTemplate DataType="{x:Type DTO:DtoUser}">
+ <Grid HorizontalAlignment="Left" Margin="3">
+
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="auto"></ColumnDefinition>
+ <ColumnDefinition Width="475"></ColumnDefinition>
+ </Grid.ColumnDefinitions>
+
+ <controls:ExtendedImage HasImage="{Binding HasImage}"
+ PlaceHolderSource="../Resources/Images/UserLoginDefault.png"
+ Source="{Binding Converter={StaticResource UserImageConverter}, ConverterParameter='225,225,0,0'}"
+ Stretch="Uniform"
+ Width="225"
+ Height="225"
+ Background="{Binding Converter={StaticResource TileBackgroundConverter}}"/>
+ <TextBlock Text="{Binding Name}" VerticalAlignment="Top" HorizontalAlignment="Left" Grid.Column="1" Grid.Row="0" Margin="25 30 0 0" FontSize="{StaticResource Heading2FontSize}"></TextBlock>
+ <TextBlock Text="{Binding Converter={StaticResource LastSeenTextConverter}}" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="1" Grid.Row="0" Margin="25 80 0 0"></TextBlock>
+ </Grid>
+ </DataTemplate>
+
+ </ResourceDictionary>
+ </Page.Resources>
+ <Grid>
+
+ <Grid.RowDefinitions>
+ <RowDefinition Height="auto"></RowDefinition>
+ <RowDefinition Height="*"></RowDefinition>
+ </Grid.RowDefinitions>
+
+ <Image Style="{StaticResource MBLogoImageBlack}" Margin="0 0 0 10" Height="125" Stretch="Uniform" HorizontalAlignment="Left"></Image>
+
+ <Grid VerticalAlignment="Stretch" HorizontalAlignment="Center" Grid.Row="1">
+
+ <Grid.RowDefinitions>
+ <RowDefinition Height="auto"></RowDefinition>
+ <RowDefinition Height="*"></RowDefinition>
+ </Grid.RowDefinitions>
+
+ <TextBlock FontSize="{StaticResource Heading2FontSize}" Grid.Row="0" Margin="0 0 0 30">Select Profile</TextBlock>
+
+ <ListView HorizontalAlignment="Center" Grid.Row="1" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ItemsSource="{Binding Path=Users}" Style="{StaticResource ListViewStyle}" ItemContainerStyle="{StaticResource ListViewItemStyle}">
+ <ListView.ItemsPanel>
+ <ItemsPanelTemplate>
+ <WrapPanel Orientation="Vertical" />
+ </ItemsPanelTemplate>
+ </ListView.ItemsPanel>
+ </ListView>
+ </Grid>
+ </Grid>
+</base:BaseLoginPage>
diff --git a/MediaBrowser.Plugins.DefaultTheme/Pages/LoginPage.xaml.cs b/MediaBrowser.Plugins.DefaultTheme/Pages/LoginPage.xaml.cs new file mode 100644 index 000000000..547443086 --- /dev/null +++ b/MediaBrowser.Plugins.DefaultTheme/Pages/LoginPage.xaml.cs @@ -0,0 +1,15 @@ +using MediaBrowser.UI.Pages;
+
+namespace MediaBrowser.Plugins.DefaultTheme.Pages
+{
+ /// <summary>
+ /// Interaction logic for LoginPage.xaml
+ /// </summary>
+ public partial class LoginPage : BaseLoginPage
+ {
+ public LoginPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Plugin.cs b/MediaBrowser.Plugins.DefaultTheme/Plugin.cs new file mode 100644 index 000000000..f12d53af1 --- /dev/null +++ b/MediaBrowser.Plugins.DefaultTheme/Plugin.cs @@ -0,0 +1,20 @@ +using MediaBrowser.Common.Plugins;
+using System;
+using System.ComponentModel.Composition;
+
+namespace MediaBrowser.Plugins.DefaultTheme
+{
+ [Export(typeof(BasePlugin))]
+ public class Plugin : BaseTheme
+ {
+ public override string Name
+ {
+ get { return "Default Theme"; }
+ }
+
+ public override Uri LoginPageUri
+ {
+ get { return GeneratePackUri("Pages/LoginPage.xaml"); }
+ }
+ }
+}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Properties/AssemblyInfo.cs b/MediaBrowser.Plugins.DefaultTheme/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..3d92517da --- /dev/null +++ b/MediaBrowser.Plugins.DefaultTheme/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +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.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)
+)]
+
+
+// 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.*")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/MediaBrowser.Plugins.DefaultTheme/Properties/Resources.Designer.cs b/MediaBrowser.Plugins.DefaultTheme/Properties/Resources.Designer.cs new file mode 100644 index 000000000..da735391a --- /dev/null +++ b/MediaBrowser.Plugins.DefaultTheme/Properties/Resources.Designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------
+// <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 new file mode 100644 index 000000000..ffecec851 --- /dev/null +++ b/MediaBrowser.Plugins.DefaultTheme/Properties/Resources.resx @@ -0,0 +1,117 @@ +<?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 new file mode 100644 index 000000000..b99760e3f --- /dev/null +++ b/MediaBrowser.Plugins.DefaultTheme/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------
+// <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 new file mode 100644 index 000000000..8f2fd95d6 --- /dev/null +++ b/MediaBrowser.Plugins.DefaultTheme/Properties/Settings.settings @@ -0,0 +1,7 @@ +<?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 new file mode 100644 index 000000000..28128c75b --- /dev/null +++ b/MediaBrowser.Plugins.DefaultTheme/Resources/AppResources.cs @@ -0,0 +1,14 @@ +using System.ComponentModel.Composition;
+using System.Windows;
+
+namespace MediaBrowser.Plugins.DefaultTheme.Resources
+{
+ [Export(typeof(ResourceDictionary))]
+ public partial class AppResources : ResourceDictionary
+ {
+ public AppResources()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/AppResources.xaml b/MediaBrowser.Plugins.DefaultTheme/Resources/AppResources.xaml new file mode 100644 index 000000000..c1e5adeb5 --- /dev/null +++ b/MediaBrowser.Plugins.DefaultTheme/Resources/AppResources.xaml @@ -0,0 +1,81 @@ +<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"
+ x:Class="MediaBrowser.Plugins.DefaultTheme.Resources.AppResources">
+
+ <themeconverters:WeatherImageConverter x:Key="WeatherImageConverter"></themeconverters:WeatherImageConverter>
+ <themeconverters:TileBackgroundConverter x:Key="TileBackgroundConverter"></themeconverters:TileBackgroundConverter>
+
+ <Style x:Key="ListViewItemStyle" TargetType="{x:Type ListViewItem}" BasedOn="{StaticResource BaseListViewItemStyle}">
+
+ <Style.Resources>
+ <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="LightBlue"/>
+ </Style.Resources>
+
+ <Style.Triggers>
+ <Trigger Property="IsMouseOver" Value="True">
+ <Setter Property="Opacity" Value=".85" />
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+
+ <!--Override MainWindow style-->
+ <Style TargetType="Window" x:Key="MainWindow" BasedOn="{StaticResource BaseWindow}">
+ <Setter Property="Background">
+ <Setter.Value>
+ <RadialGradientBrush RadiusX=".75" RadiusY=".75">
+ <GradientStop Color="White" Offset="0.0"/>
+ <GradientStop Color="WhiteSmoke" Offset="0.5"/>
+ <GradientStop Color="#cfcfcf" Offset="1.0"/>
+ </RadialGradientBrush>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <!--Override PageContentTemplate-->
+ <ControlTemplate x:Key="PageContentTemplate">
+
+ <Grid Margin="20 15 20 20">
+
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Right">
+
+ <!--Display CurrentUser-->
+ <StackPanel Orientation="Horizontal" Margin="0 0 30 0" Visibility="{Binding Path=CurrentUser,Converter={StaticResource CurrentUserVisibilityConverter}}">
+ <TextBlock FontSize="{StaticResource Heading2FontSize}" Text="{Binding Path=CurrentUser.Name}" Margin="0 0 5 0">
+ </TextBlock>
+ <Image>
+ <Image.Style>
+ <Style TargetType="{x:Type Image}">
+ <Setter Property="Image.Source" Value="Images\CurrentUserDefault.png" />
+ <Setter Property="Stretch" Value="None" />
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding Path=CurrentUser.HasImage}" Value="true">
+ <Setter Property="Image.Source" Value="{Binding Path=CurrentUser,Converter={StaticResource UserImageConverter}, ConverterParameter='0,64,0,0'}" />
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Image.Style>
+ </Image>
+ </StackPanel>
+
+ <!--Display Weather-->
+ <StackPanel Orientation="Horizontal" Margin="0 0 30 0" Visibility="{Binding Path=CurrentWeather,Converter={StaticResource WeatherVisibilityConverter}}">
+
+ <TextBlock FontSize="{StaticResource Heading2FontSize}" Text="{Binding Path=CurrentWeather,Converter={StaticResource WeatherTemperatureConverter}}" Margin="0 0 5 0">
+ </TextBlock>
+ <Image Stretch="None" Source="{Binding Path=CurrentWeather,Converter={StaticResource WeatherImageConverter}}"></Image>
+ </StackPanel>
+
+ <!--Display Clock-->
+ <TextBlock FontSize="{StaticResource Heading2FontSize}">
+ <TextBlock.Text>
+ <Binding Path="CurrentTime" Converter="{StaticResource DateTimeToStringConverter}" ConverterParameter="h:mm" />
+ </TextBlock.Text>
+ </TextBlock>
+ </StackPanel>
+
+ <Frame x:Name="PageFrame"></Frame>
+ </Grid>
+ </ControlTemplate>
+
+</ResourceDictionary>
\ No newline at end of file diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/CurrentUserDefault.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/CurrentUserDefault.png Binary files differnew file mode 100644 index 000000000..f272ed92a --- /dev/null +++ b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/CurrentUserDefault.png diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/UserLoginDefault.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/UserLoginDefault.png Binary files differnew file mode 100644 index 000000000..93a06e308 --- /dev/null +++ b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/UserLoginDefault.png diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Overcast.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Overcast.png Binary files differnew file mode 100644 index 000000000..b9b6765c7 --- /dev/null +++ b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Overcast.png diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Rain.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Rain.png Binary files differnew file mode 100644 index 000000000..2e526f895 --- /dev/null +++ b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Rain.png diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Snow.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Snow.png Binary files differnew file mode 100644 index 000000000..94131ed2d --- /dev/null +++ b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Snow.png diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Sunny.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Sunny.png Binary files differnew file mode 100644 index 000000000..2a51cd544 --- /dev/null +++ b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Sunny.png diff --git a/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Thunder.png b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Thunder.png Binary files differnew file mode 100644 index 000000000..f413a2ed7 --- /dev/null +++ b/MediaBrowser.Plugins.DefaultTheme/Resources/Images/Weather/Thunder.png |
