diff --git a/MediaBrowser.Common/MediaBrowser.Common.csproj b/MediaBrowser.Common/MediaBrowser.Common.csproj index d1f318ab4..51d24e2a1 100644 --- a/MediaBrowser.Common/MediaBrowser.Common.csproj +++ b/MediaBrowser.Common/MediaBrowser.Common.csproj @@ -31,6 +31,9 @@ 4 + + ..\packages\MahApps.Metro.0.9.0.0\lib\net40\MahApps.Metro.dll + @@ -58,6 +61,9 @@ ..\packages\Rx-Linq.2.0.20823\lib\Net45\System.Reactive.Linq.dll + + ..\packages\MahApps.Metro.0.9.0.0\lib\net40\System.Windows.Interactivity.dll + diff --git a/MediaBrowser.Common/UI/Splash.xaml b/MediaBrowser.Common/UI/Splash.xaml index b02863f41..8bb6d0aca 100644 --- a/MediaBrowser.Common/UI/Splash.xaml +++ b/MediaBrowser.Common/UI/Splash.xaml @@ -1,11 +1,19 @@ - + xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro" + Title="MediaBrowser" + Height="346" + Width="600" + ShowInTaskbar="True" + ResizeMode="NoResize" + WindowStartupLocation="CenterScreen" + WindowState="Normal" + Background="Black"> + - + diff --git a/MediaBrowser.Common/UI/Splash.xaml.cs b/MediaBrowser.Common/UI/Splash.xaml.cs index 504179291..1fd66bda4 100644 --- a/MediaBrowser.Common/UI/Splash.xaml.cs +++ b/MediaBrowser.Common/UI/Splash.xaml.cs @@ -2,6 +2,7 @@ using System.Runtime.InteropServices; using System.Windows; using System.Windows.Interop; +using MahApps.Metro.Controls; using MediaBrowser.Common.Logging; using MediaBrowser.Model.Progress; @@ -10,7 +11,7 @@ namespace MediaBrowser.Common.UI /// /// Interaction logic for Splash.xaml /// - public partial class Splash : Window + public partial class Splash : MetroWindow { private const int GWL_STYLE = -16; private const int WS_SYSMENU = 0x80000; @@ -19,12 +20,12 @@ namespace MediaBrowser.Common.UI [DllImport("user32.dll")] private static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); - public Splash(Progress progress) { InitializeComponent(); progress.ProgressChanged += progress_ProgressChanged; + Loaded+=Splash_Loaded; } void progress_ProgressChanged(object sender, TaskProgress e) @@ -43,6 +44,9 @@ namespace MediaBrowser.Common.UI { var hwnd = new WindowInteropHelper(this).Handle; SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) & ~WS_SYSMENU); + + // Setting this in markup throws an exception at runtime + ShowTitleBar = false; } } } diff --git a/MediaBrowser.Common/packages.config b/MediaBrowser.Common/packages.config index 96da7ddad..3b8aa6748 100644 --- a/MediaBrowser.Common/packages.config +++ b/MediaBrowser.Common/packages.config @@ -1,5 +1,6 @@  + diff --git a/MediaBrowser.Controller/Providers/VideoInfoProvider.cs b/MediaBrowser.Controller/Providers/VideoInfoProvider.cs index 4da83a8cc..516486bd5 100644 --- a/MediaBrowser.Controller/Providers/VideoInfoProvider.cs +++ b/MediaBrowser.Controller/Providers/VideoInfoProvider.cs @@ -2,10 +2,7 @@ using System.Collections.Generic; using System.ComponentModel.Composition; using System.Linq; -using System.Threading.Tasks; -using MediaBrowser.Common.Logging; using MediaBrowser.Controller.FFMpeg; -using MediaBrowser.Controller.Library; using MediaBrowser.Model.Entities; namespace MediaBrowser.Controller.Providers