jellyfin-server/MediaBrowser.Common/UI/Splash.xaml.cs
LukePulverenti Luke Pulverenti luke pulverenti f1770605ea Added new icons and fixed some splash screen issues
2012-09-16 20:09:12 -04:00

34 lines
903 B
C#

using MahApps.Metro.Controls;
using MediaBrowser.Model.Progress;
using System;
using System.Windows;
namespace MediaBrowser.Common.UI
{
/// <summary>
/// Interaction logic for Splash.xaml
/// </summary>
public partial class Splash : MetroWindow
{
public Splash(Progress<TaskProgress> progress)
{
InitializeComponent();
progress.ProgressChanged += ProgressChanged;
Loaded+=SplashLoaded;
}
void ProgressChanged(object sender, TaskProgress e)
{
lblProgress.Text = e.Description;
pbProgress.Value = (double)e.PercentComplete;
}
private void SplashLoaded(object sender, RoutedEventArgs e)
{
// Setting this in markup throws an exception at runtime
ShowTitleBar = false;
}
}
}