Updated splashscreen to report progress

Added default image (need to change later)
This commit is contained in:
RedShirtMB Mark Linton redshirt linton
2012-08-19 11:01:43 -07:00
parent 64887fa743
commit a129c93c42
7 changed files with 227 additions and 9 deletions

View File

@@ -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>

View File

@@ -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;
}
}
}