Added a method in BaseApplication to get the logo image
This commit is contained in:
parent
c124672636
commit
ee91096eb0
|
@ -132,7 +132,7 @@
|
|||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\mblogo.png" />
|
||||
<EmbeddedResource Include="Resources\mblogo.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- 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.IO;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media.Imaging;
|
||||
using MediaBrowser.Common.Kernel;
|
||||
using MediaBrowser.Common.Logging;
|
||||
using MediaBrowser.Model.Progress;
|
||||
using System.Reflection;
|
||||
|
||||
namespace MediaBrowser.Common.UI
|
||||
{
|
||||
|
@ -67,5 +71,18 @@ namespace MediaBrowser.Common.UI
|
|||
|
||||
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>
|
||||
</Window.Background>
|
||||
<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"/>
|
||||
<Label Name="lblProgress" Content="Label" Margin="0,190,10,0" VerticalContentAlignment="Center" HorizontalAlignment="Center" Grid.Row="2"/>
|
||||
</Grid>
|
||||
|
|
|
@ -35,6 +35,8 @@ namespace MediaBrowser.Common.UI
|
|||
{
|
||||
// Setting this in markup throws an exception at runtime
|
||||
ShowTitleBar = false;
|
||||
|
||||
imgLogo.Source = (Application.Current as BaseApplication).GetLogoImage();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user