mirror of https://github.com/jellyfin/jellyfin.git
Added a method in BaseApplication to get the logo image
This commit is contained in:
parent
c124672636
commit
ee91096eb0
|
@ -132,7 +132,7 @@
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\mblogo.png" />
|
<EmbeddedResource Include="Resources\mblogo.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
using System;
|
using System;
|
||||||
|
using System.IO;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
using MediaBrowser.Common.Kernel;
|
using MediaBrowser.Common.Kernel;
|
||||||
using MediaBrowser.Common.Logging;
|
using MediaBrowser.Common.Logging;
|
||||||
using MediaBrowser.Model.Progress;
|
using MediaBrowser.Model.Progress;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
namespace MediaBrowser.Common.UI
|
namespace MediaBrowser.Common.UI
|
||||||
{
|
{
|
||||||
|
@ -67,5 +71,18 @@ namespace MediaBrowser.Common.UI
|
||||||
|
|
||||||
Kernel.Dispose();
|
Kernel.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BitmapImage GetLogoImage()
|
||||||
|
{
|
||||||
|
BitmapImage bitmap = new BitmapImage();
|
||||||
|
|
||||||
|
bitmap.CacheOption = BitmapCacheOption.Default;
|
||||||
|
|
||||||
|
bitmap.BeginInit();
|
||||||
|
bitmap.StreamSource = Assembly.GetExecutingAssembly().GetManifestResourceStream("MediaBrowser.Common.Resources.mblogo.png");
|
||||||
|
bitmap.EndInit();
|
||||||
|
|
||||||
|
return bitmap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
</RadialGradientBrush>
|
</RadialGradientBrush>
|
||||||
</Window.Background>
|
</Window.Background>
|
||||||
<Grid Name="splashGrid">
|
<Grid Name="splashGrid">
|
||||||
<Image HorizontalAlignment="Left" VerticalAlignment="Top" Source="/MediaBrowser.Common;component/Resources/mblogo.png" Stretch="Uniform" Grid.Row="0" Margin="10 10 10 10"/>
|
<Image x:Name="imgLogo" HorizontalAlignment="Left" VerticalAlignment="Top" Stretch="Uniform" Grid.Row="0" Margin="10 10 10 10"/>
|
||||||
<ProgressBar Name="pbProgress" Minimum="0" Maximum="100" HorizontalAlignment="Left" Height="24" Margin="30,110,30,0" Width="460" Grid.Row="1"/>
|
<ProgressBar Name="pbProgress" Minimum="0" Maximum="100" HorizontalAlignment="Left" Height="24" Margin="30,110,30,0" Width="460" Grid.Row="1"/>
|
||||||
<Label Name="lblProgress" Content="Label" Margin="0,190,10,0" VerticalContentAlignment="Center" HorizontalAlignment="Center" Grid.Row="2"/>
|
<Label Name="lblProgress" Content="Label" Margin="0,190,10,0" VerticalContentAlignment="Center" HorizontalAlignment="Center" Grid.Row="2"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
@ -35,6 +35,8 @@ namespace MediaBrowser.Common.UI
|
||||||
{
|
{
|
||||||
// Setting this in markup throws an exception at runtime
|
// Setting this in markup throws an exception at runtime
|
||||||
ShowTitleBar = false;
|
ShowTitleBar = false;
|
||||||
|
|
||||||
|
imgLogo.Source = (Application.Current as BaseApplication).GetLogoImage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue