mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Add Tabbed controlled window
This commit is contained in:
parent
dc1fd60bfd
commit
ebc3172f74
@ -4,5 +4,12 @@
|
|||||||
Startup="OnStartup"
|
Startup="OnStartup"
|
||||||
Exit="OnExit">
|
Exit="OnExit">
|
||||||
<Application.Resources>
|
<Application.Resources>
|
||||||
|
<ResourceDictionary>
|
||||||
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
|
||||||
|
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
|
||||||
|
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/Dark.Purple.xaml" />
|
||||||
|
</ResourceDictionary.MergedDictionaries>
|
||||||
|
</ResourceDictionary>
|
||||||
</Application.Resources>
|
</Application.Resources>
|
||||||
</Application>
|
</Application>
|
||||||
|
@ -1,20 +1,34 @@
|
|||||||
<Window x:Class="Wabbajack.App.Blazor.MainWindow"
|
<mah:MetroWindow x:Class="Wabbajack.App.Blazor.MainWindow"
|
||||||
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"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:Wabbajack.App.Blazor"
|
xmlns:local="clr-namespace:Wabbajack.App.Blazor"
|
||||||
xmlns:blazor="clr-namespace:Microsoft.AspNetCore.Components.WebView.Wpf;assembly=Microsoft.AspNetCore.Components.WebView.Wpf"
|
xmlns:blazor="clr-namespace:Microsoft.AspNetCore.Components.WebView.Wpf;assembly=Microsoft.AspNetCore.Components.WebView.Wpf"
|
||||||
|
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="MainWindow" Height="750" Width="1200" MinHeight="750" MinWidth="1200">
|
ShowTitleBar="False"
|
||||||
<Grid Background="#121212">
|
Title="WABBAJACK" Height="750" Width="1200" MinHeight="750" MinWidth="1200">
|
||||||
<blazor:BlazorWebView HostPage="wwwroot\index.html" x:Name="BlazorWebView">
|
<Grid Background="#121212" MouseDown="UIElement_OnMouseDown">
|
||||||
<blazor:BlazorWebView.RootComponents>
|
<TabControl>
|
||||||
<blazor:RootComponent Selector="#app" ComponentType="{x:Type local:Main}" />
|
<TabItem>
|
||||||
</blazor:BlazorWebView.RootComponents>
|
<TabItem.Header>
|
||||||
</blazor:BlazorWebView>
|
<TextBlock FontSize="16" Margin="0, 0, 8, 0">WABBAJACK 3.0.0</TextBlock>
|
||||||
|
</TabItem.Header>
|
||||||
|
<blazor:BlazorWebView HostPage="wwwroot\index.html" x:Name="BlazorWebView">
|
||||||
|
<blazor:BlazorWebView.RootComponents>
|
||||||
|
<blazor:RootComponent Selector="#app" ComponentType="{x:Type local:Main}" />
|
||||||
|
</blazor:BlazorWebView.RootComponents>
|
||||||
|
</blazor:BlazorWebView>
|
||||||
|
</TabItem>
|
||||||
|
<TabItem>
|
||||||
|
<TabItem.Header>
|
||||||
|
<TextBlock FontSize="16">Manual Download</TextBlock>
|
||||||
|
</TabItem.Header>
|
||||||
|
</TabItem>
|
||||||
|
</TabControl>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Window.TaskbarItemInfo>
|
<Window.TaskbarItemInfo>
|
||||||
<TaskbarItemInfo x:Name="TaskBarItem"/>
|
<TaskbarItemInfo x:Name="TaskBarItem"/>
|
||||||
</Window.TaskbarItemInfo>
|
</Window.TaskbarItemInfo>
|
||||||
</Window>
|
</mah:MetroWindow>
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Input;
|
||||||
using Wabbajack.App.Blazor.State;
|
using Wabbajack.App.Blazor.State;
|
||||||
|
|
||||||
namespace Wabbajack.App.Blazor;
|
namespace Wabbajack.App.Blazor;
|
||||||
|
|
||||||
public partial class MainWindow
|
public partial class MainWindow
|
||||||
{
|
{
|
||||||
|
private Point _lastPosition;
|
||||||
|
|
||||||
public MainWindow(IServiceProvider serviceProvider, IStateContainer stateContainer)
|
public MainWindow(IServiceProvider serviceProvider, IStateContainer stateContainer)
|
||||||
{
|
{
|
||||||
stateContainer.TaskBarStateObservable.Subscribe(state =>
|
stateContainer.TaskBarStateObservable.Subscribe(state =>
|
||||||
@ -20,6 +24,11 @@ public partial class MainWindow
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
BlazorWebView.Services = serviceProvider;
|
BlazorWebView.Services = serviceProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void UIElement_OnMouseDown(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
this.DragMove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Required so compiler doesn't complain about not finding the type. [MC3050]
|
// Required so compiler doesn't complain about not finding the type. [MC3050]
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
<PackageReference Include="Blazored.Toast" Version="3.2.2" />
|
<PackageReference Include="Blazored.Toast" Version="3.2.2" />
|
||||||
<PackageReference Include="DynamicData" Version="7.4.9" />
|
<PackageReference Include="DynamicData" Version="7.4.9" />
|
||||||
<PackageReference Include="GitInfo" Version="2.2.0" />
|
<PackageReference Include="GitInfo" Version="2.2.0" />
|
||||||
|
<PackageReference Include="MahApps.Metro" Version="2.4.9" />
|
||||||
<PackageReference Include="Microsoft-WindowsAPICodePack-Shell" Version="1.1.4" />
|
<PackageReference Include="Microsoft-WindowsAPICodePack-Shell" Version="1.1.4" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Wpf" Version="6.0.101-preview.11.2349" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Wpf" Version="6.0.101-preview.11.2349" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.0" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.0" />
|
||||||
@ -47,6 +48,10 @@
|
|||||||
<ProjectReference Include="..\Wabbajack.Services.OSIntegrated\Wabbajack.Services.OSIntegrated.csproj" />
|
<ProjectReference Include="..\Wabbajack.Services.OSIntegrated\Wabbajack.Services.OSIntegrated.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Remove="Browser\BrowserWindow.xaml.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- dotnet tool install Excubo.WebCompiler -g -->
|
<!-- dotnet tool install Excubo.WebCompiler -g -->
|
||||||
<Target Name="TestWebCompiler" BeforeTargets="PreBuildEvent">
|
<Target Name="TestWebCompiler" BeforeTargets="PreBuildEvent">
|
||||||
<Exec Command="webcompiler -h" ContinueOnError="true" StandardOutputImportance="low" StandardErrorImportance="low" LogStandardErrorAsError="false" IgnoreExitCode="true">
|
<Exec Command="webcompiler -h" ContinueOnError="true" StandardOutputImportance="low" StandardErrorImportance="low" LogStandardErrorAsError="false" IgnoreExitCode="true">
|
||||||
|
Loading…
Reference in New Issue
Block a user