mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 22:07:13 -04:00
Added MahApps.Metro
This commit is contained in:
parent
37dd0c8bdd
commit
fc6b2a7f54
@ -31,6 +31,9 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="MahApps.Metro">
|
||||||
|
<HintPath>..\packages\MahApps.Metro.0.9.0.0\lib\net40\MahApps.Metro.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="PresentationCore" />
|
<Reference Include="PresentationCore" />
|
||||||
<Reference Include="PresentationFramework" />
|
<Reference Include="PresentationFramework" />
|
||||||
<Reference Include="protobuf-net">
|
<Reference Include="protobuf-net">
|
||||||
@ -58,6 +61,9 @@
|
|||||||
<HintPath>..\packages\Rx-Linq.2.0.20823\lib\Net45\System.Reactive.Linq.dll</HintPath>
|
<HintPath>..\packages\Rx-Linq.2.0.20823\lib\Net45\System.Reactive.Linq.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Runtime.Remoting" />
|
<Reference Include="System.Runtime.Remoting" />
|
||||||
|
<Reference Include="System.Windows.Interactivity">
|
||||||
|
<HintPath>..\packages\MahApps.Metro.0.9.0.0\lib\net40\System.Windows.Interactivity.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System.Xaml" />
|
<Reference Include="System.Xaml" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
@ -1,11 +1,19 @@
|
|||||||
<Window x:Class="MediaBrowser.Common.UI.Splash"
|
<Controls:MetroWindow x:Class="MediaBrowser.Common.UI.Splash"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
Title="MediaBrowser" Height="346" Width="600" ShowInTaskbar="True" ResizeMode="NoResize" WindowStartupLocation="CenterScreen"
|
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
|
||||||
WindowState="Normal" WindowStyle="SingleBorderWindow" Background="Black" Loaded="Splash_Loaded">
|
Title="MediaBrowser"
|
||||||
|
Height="346"
|
||||||
|
Width="600"
|
||||||
|
ShowInTaskbar="True"
|
||||||
|
ResizeMode="NoResize"
|
||||||
|
WindowStartupLocation="CenterScreen"
|
||||||
|
WindowState="Normal"
|
||||||
|
Background="Black">
|
||||||
|
|
||||||
<Grid Name="splashGrid">
|
<Grid Name="splashGrid">
|
||||||
<Image HorizontalAlignment="Left" VerticalAlignment="Top" Height="225" Source="/MediaBrowser.Common;component/Resources/mblogo1000.png" Stretch="Fill" Grid.Row="0"/>
|
<Image HorizontalAlignment="Left" VerticalAlignment="Top" Height="225" Source="/MediaBrowser.Common;component/Resources/mblogo1000.png" Stretch="Fill" Grid.Row="0"/>
|
||||||
<ProgressBar Name="pbProgress" Minimum="0" Maximum="100" HorizontalAlignment="Left" Height="24" Margin="30,150,30,0" Width="540" Grid.Row="1"/>
|
<ProgressBar Name="pbProgress" Minimum="0" Maximum="100" HorizontalAlignment="Left" Height="24" Margin="30,150,30,0" Width="540" Grid.Row="1"/>
|
||||||
<Label Name="lblProgress" Content="Label" Margin="0,240,10,0" VerticalContentAlignment="Center" HorizontalAlignment="Center" Foreground="White" Grid.Row="2"/>
|
<Label Name="lblProgress" Content="Label" Margin="0,240,10,0" VerticalContentAlignment="Center" HorizontalAlignment="Center" Foreground="White" Grid.Row="2"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Controls:MetroWindow>
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Interop;
|
using System.Windows.Interop;
|
||||||
|
using MahApps.Metro.Controls;
|
||||||
using MediaBrowser.Common.Logging;
|
using MediaBrowser.Common.Logging;
|
||||||
using MediaBrowser.Model.Progress;
|
using MediaBrowser.Model.Progress;
|
||||||
|
|
||||||
@ -10,7 +11,7 @@ namespace MediaBrowser.Common.UI
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaction logic for Splash.xaml
|
/// Interaction logic for Splash.xaml
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class Splash : Window
|
public partial class Splash : MetroWindow
|
||||||
{
|
{
|
||||||
private const int GWL_STYLE = -16;
|
private const int GWL_STYLE = -16;
|
||||||
private const int WS_SYSMENU = 0x80000;
|
private const int WS_SYSMENU = 0x80000;
|
||||||
@ -19,12 +20,12 @@ namespace MediaBrowser.Common.UI
|
|||||||
[DllImport("user32.dll")]
|
[DllImport("user32.dll")]
|
||||||
private static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
|
private static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
|
||||||
|
|
||||||
|
|
||||||
public Splash(Progress<TaskProgress> progress)
|
public Splash(Progress<TaskProgress> progress)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
progress.ProgressChanged += progress_ProgressChanged;
|
progress.ProgressChanged += progress_ProgressChanged;
|
||||||
|
Loaded+=Splash_Loaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
void progress_ProgressChanged(object sender, TaskProgress e)
|
void progress_ProgressChanged(object sender, TaskProgress e)
|
||||||
@ -43,6 +44,9 @@ namespace MediaBrowser.Common.UI
|
|||||||
{
|
{
|
||||||
var hwnd = new WindowInteropHelper(this).Handle;
|
var hwnd = new WindowInteropHelper(this).Handle;
|
||||||
SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) & ~WS_SYSMENU);
|
SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) & ~WS_SYSMENU);
|
||||||
|
|
||||||
|
// Setting this in markup throws an exception at runtime
|
||||||
|
ShowTitleBar = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
|
<package id="MahApps.Metro" version="0.9.0.0" targetFramework="net45" />
|
||||||
<package id="protobuf-net" version="2.0.0.480" targetFramework="net45" />
|
<package id="protobuf-net" version="2.0.0.480" targetFramework="net45" />
|
||||||
<package id="Rx-Core" version="2.0.20823" targetFramework="net45" />
|
<package id="Rx-Core" version="2.0.20823" targetFramework="net45" />
|
||||||
<package id="Rx-Interfaces" version="2.0.20823" targetFramework="net45" />
|
<package id="Rx-Interfaces" version="2.0.20823" targetFramework="net45" />
|
||||||
|
@ -2,10 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.Composition;
|
using System.ComponentModel.Composition;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using MediaBrowser.Common.Logging;
|
|
||||||
using MediaBrowser.Controller.FFMpeg;
|
using MediaBrowser.Controller.FFMpeg;
|
||||||
using MediaBrowser.Controller.Library;
|
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Providers
|
namespace MediaBrowser.Controller.Providers
|
||||||
|
Loading…
Reference in New Issue
Block a user