mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-24 01:28:27 +01:00
Updated splashscreen to report progress
Added default image (need to change later)
This commit is contained in:
parent
64887fa743
commit
a129c93c42
@@ -1,9 +1,11 @@
|
||||
<Window x:Class="MediaBrowser.Common.UI.Splash"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="SplashScreen" Height="300" Width="600" ShowInTaskbar="False" ResizeMode="NoResize" WindowStartupLocation="CenterScreen"
|
||||
WindowState="Normal" WindowStyle="None" Background="White" AllowsTransparency="True">
|
||||
<Grid>
|
||||
|
||||
Title="SplashScreen" Height="346" Width="600" ShowInTaskbar="False" ResizeMode="NoResize" WindowStartupLocation="CenterScreen"
|
||||
WindowState="Normal" WindowStyle="SingleBorderWindow" Background="Black">
|
||||
<Grid Name="splashGrid">
|
||||
<Image HorizontalAlignment="Left" Height="213" Margin="10,10,0,0" VerticalAlignment="Top" Width="574" Source="/MediaBrowser.Common;component/Resources/mblogo1000.png" Stretch="Fill"/>
|
||||
<ProgressBar Name="pbProgress" Minimum="0" Maximum="100" HorizontalAlignment="Left" Height="24" Margin="10,242,0,0" VerticalAlignment="Top" Width="574"/>
|
||||
<Label Name="lblProgress" Content="Label" HorizontalAlignment="Left" Margin="10,282,0,0" VerticalAlignment="Top" Width="574" Foreground="White"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
@@ -21,9 +21,18 @@ namespace MediaBrowser.Common.UI
|
||||
/// </summary>
|
||||
public partial class Splash : Window
|
||||
{
|
||||
public Splash(IProgress<TaskProgress> progress)
|
||||
|
||||
public Splash(Progress<TaskProgress> progress)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
progress.ProgressChanged += progress_ProgressChanged;
|
||||
}
|
||||
|
||||
void progress_ProgressChanged(object sender, TaskProgress e)
|
||||
{
|
||||
this.lblProgress.Content = e.Description;
|
||||
this.pbProgress.Value = (double)e.PercentComplete;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user