diff options
| author | LukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com> | 2012-09-17 14:47:51 -0400 |
|---|---|---|
| committer | LukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com> | 2012-09-17 14:47:51 -0400 |
| commit | fe427bc7f4f1a709c43c8ecb035b07325ed710b9 (patch) | |
| tree | e0bc49677487c60504968e1b5e2e0df88a4b29f9 | |
| parent | fb88e4d5fcd02ada0999a09b68a49617f4a35309 (diff) | |
Removed progress value from startup
| -rw-r--r-- | MediaBrowser.Common/Kernel/BaseKernel.cs | 8 | ||||
| -rw-r--r-- | MediaBrowser.Common/MediaBrowser.Common.csproj | 3 | ||||
| -rw-r--r-- | MediaBrowser.Common/Resources/Images/Icon.ico | bin | 32038 -> 146168 bytes | |||
| -rw-r--r-- | MediaBrowser.Common/Resources/Images/spinner.gif | bin | 0 -> 673 bytes | |||
| -rw-r--r-- | MediaBrowser.Common/UI/Splash.xaml | 7 | ||||
| -rw-r--r-- | MediaBrowser.Common/UI/Splash.xaml.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Kernel.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Model/Progress/TaskProgress.cs | 8 |
8 files changed, 18 insertions, 15 deletions
diff --git a/MediaBrowser.Common/Kernel/BaseKernel.cs b/MediaBrowser.Common/Kernel/BaseKernel.cs index 0ac01962b..1fdc597ea 100644 --- a/MediaBrowser.Common/Kernel/BaseKernel.cs +++ b/MediaBrowser.Common/Kernel/BaseKernel.cs @@ -78,7 +78,7 @@ namespace MediaBrowser.Common.Kernel // Performs initializations that can be reloaded at anytime
await Reload(progress).ConfigureAwait(false);
- progress.Report(new TaskProgress { Description = "Loading Complete", PercentComplete = 100 });
+ progress.Report(new TaskProgress { Description = "Loading Complete" });
}
/// <summary>
@@ -90,10 +90,10 @@ namespace MediaBrowser.Common.Kernel ReloadLogger();
- progress.Report(new TaskProgress { Description = "Loading configuration", PercentComplete = 0 });
+ progress.Report(new TaskProgress { Description = "Loading configuration" });
ReloadConfiguration();
- progress.Report(new TaskProgress { Description = "Starting Http server", PercentComplete = 5 });
+ progress.Report(new TaskProgress { Description = "Starting Http server" });
ReloadHttpServer();
}
@@ -104,7 +104,7 @@ namespace MediaBrowser.Common.Kernel {
await Task.Run(() =>
{
- progress.Report(new TaskProgress { Description = "Loading Plugins", PercentComplete = 10 });
+ progress.Report(new TaskProgress { Description = "Loading Plugins" });
ReloadComposableParts();
}).ConfigureAwait(false);
diff --git a/MediaBrowser.Common/MediaBrowser.Common.csproj b/MediaBrowser.Common/MediaBrowser.Common.csproj index 6c80c2225..fb192ec1a 100644 --- a/MediaBrowser.Common/MediaBrowser.Common.csproj +++ b/MediaBrowser.Common/MediaBrowser.Common.csproj @@ -148,6 +148,9 @@ <ItemGroup>
<Resource Include="Resources\Images\mblogowhite.png" />
</ItemGroup>
+ <ItemGroup>
+ <Resource Include="Resources\Images\spinner.gif" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
diff --git a/MediaBrowser.Common/Resources/Images/Icon.ico b/MediaBrowser.Common/Resources/Images/Icon.ico Binary files differindex f8accfab2..1541dabdc 100644 --- a/MediaBrowser.Common/Resources/Images/Icon.ico +++ b/MediaBrowser.Common/Resources/Images/Icon.ico diff --git a/MediaBrowser.Common/Resources/Images/spinner.gif b/MediaBrowser.Common/Resources/Images/spinner.gif Binary files differnew file mode 100644 index 000000000..d0bce1542 --- /dev/null +++ b/MediaBrowser.Common/Resources/Images/spinner.gif diff --git a/MediaBrowser.Common/UI/Splash.xaml b/MediaBrowser.Common/UI/Splash.xaml index f52d9ddf1..7781841b2 100644 --- a/MediaBrowser.Common/UI/Splash.xaml +++ b/MediaBrowser.Common/UI/Splash.xaml @@ -3,7 +3,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
Title="MediaBrowser"
- Height="280"
+ Height="230"
Width="520"
ShowInTaskbar="True"
ResizeMode="NoResize"
@@ -26,7 +26,8 @@ </Window.Background>
<Grid Name="splashGrid">
<Image x:Name="imgLogo" HorizontalAlignment="Left" VerticalAlignment="Top" Stretch="Uniform" Grid.Row="0" Margin="10 10 10 10" Source="../Resources/Images/mblogoblack.png"/>
- <ProgressBar Name="pbProgress" Minimum="0" Maximum="100" HorizontalAlignment="Left" Height="24" Margin="30,110,30,0" Width="460" Grid.Row="1"/>
- <TextBlock Name="lblProgress" Margin="0,190,10,0" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="2" FontSize="18" Foreground="Black" Text="Label"></TextBlock>
+ <StackPanel Margin="0,130,10,0" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="2" Orientation="Horizontal">
+ <TextBlock Name="lblProgress" FontSize="18" Foreground="Black" Text="Label"></TextBlock>
+ </StackPanel>
</Grid>
</Controls:MetroWindow>
diff --git a/MediaBrowser.Common/UI/Splash.xaml.cs b/MediaBrowser.Common/UI/Splash.xaml.cs index fdd36396f..b9764c05f 100644 --- a/MediaBrowser.Common/UI/Splash.xaml.cs +++ b/MediaBrowser.Common/UI/Splash.xaml.cs @@ -20,8 +20,7 @@ namespace MediaBrowser.Common.UI void ProgressChanged(object sender, TaskProgress e)
{
- lblProgress.Text = e.Description;
- pbProgress.Value = (double)e.PercentComplete;
+ lblProgress.Text = e.Description + "...";
}
private void SplashLoaded(object sender, RoutedEventArgs e)
diff --git a/MediaBrowser.Controller/Kernel.cs b/MediaBrowser.Controller/Kernel.cs index 2756260e3..2a2916a74 100644 --- a/MediaBrowser.Controller/Kernel.cs +++ b/MediaBrowser.Controller/Kernel.cs @@ -105,10 +105,10 @@ namespace MediaBrowser.Controller ExtractFFMpeg();
- progress.Report(new TaskProgress { Description = "Loading Users", PercentComplete = 15 });
+ progress.Report(new TaskProgress { Description = "Loading Users" });
ReloadUsers();
- progress.Report(new TaskProgress { Description = "Loading Media Library", PercentComplete = 25 });
+ progress.Report(new TaskProgress { Description = "Loading Media Library" });
await ReloadRoot(allowInternetProviders: false).ConfigureAwait(false);
}
diff --git a/MediaBrowser.Model/Progress/TaskProgress.cs b/MediaBrowser.Model/Progress/TaskProgress.cs index 1bf135029..211875fff 100644 --- a/MediaBrowser.Model/Progress/TaskProgress.cs +++ b/MediaBrowser.Model/Progress/TaskProgress.cs @@ -7,13 +7,13 @@ namespace MediaBrowser.Model.Progress public class TaskProgress
{
/// <summary>
- /// Gets or sets the current completion percentage
+ /// Gets or sets a description of the actions currently executing
/// </summary>
- public decimal PercentComplete { get; set; }
+ public string Description { get; set; }
/// <summary>
- /// Gets or sets a description of the actions currently executing
+ /// Gets or sets the current completion percentage
/// </summary>
- public string Description { get; set; }
+ public decimal? PercentComplete { get; set; }
}
}
|
