FooterMenuItems

This commit is contained in:
RMBGAME
2021-08-23 13:01:48 +08:00
parent 4995629127
commit b91a678513
4 changed files with 46 additions and 8 deletions
+31
View File
@@ -124,6 +124,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ST.Tools.DesktopBridgeLink"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ST.Server.Resources", "src\ST.Server.Resources\ST.Server.Resources.csproj", "{9252AA73-9CF7-4B09-89CB-7FCB65A5DCFF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentAvalonia", "references\FluentAvalonia\FluentAvalonia\FluentAvalonia.csproj", "{42154590-445B-41CF-AAEB-AACD1B65FA2C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -1518,6 +1520,34 @@ Global
{9252AA73-9CF7-4B09-89CB-7FCB65A5DCFF}.Release|x64.Build.0 = Release|Any CPU
{9252AA73-9CF7-4B09-89CB-7FCB65A5DCFF}.Release|x86.ActiveCfg = Release|Any CPU
{9252AA73-9CF7-4B09-89CB-7FCB65A5DCFF}.Release|x86.Build.0 = Release|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|ARM.ActiveCfg = Debug|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|ARM.Build.0 = Debug|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|ARM64.Build.0 = Debug|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|iPhone.Build.0 = Debug|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|x64.ActiveCfg = Debug|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|x64.Build.0 = Debug|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|x86.ActiveCfg = Debug|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|x86.Build.0 = Debug|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|Any CPU.Build.0 = Release|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|ARM.ActiveCfg = Release|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|ARM.Build.0 = Release|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|ARM64.ActiveCfg = Release|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|ARM64.Build.0 = Release|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|iPhone.ActiveCfg = Release|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|iPhone.Build.0 = Release|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|x64.ActiveCfg = Release|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|x64.Build.0 = Release|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|x86.ActiveCfg = Release|Any CPU
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1567,6 +1597,7 @@ Global
{2A66B796-7BC2-4BE0-A920-1A457BBCCC67} = {1B889C56-157A-4493-85F2-76366282B002}
{137690DF-A3CB-4817-ACB8-9EAF3A52B5B5} = {E448F863-4C9D-47A4-BC4A-4A1381B54DA4}
{9252AA73-9CF7-4B09-89CB-7FCB65A5DCFF} = {327FDEE7-C4C8-4AA4-A7B0-8BCE3D75346F}
{42154590-445B-41CF-AAEB-AACD1B65FA2C} = {673FF8CD-9E85-4FA1-ABFC-D1149675E138}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9313F2B4-10DA-43AA-A481-CAA7571C740C}
@@ -172,6 +172,7 @@
IsSettingsVisible="False"
OpenPaneLength="240"
MenuItems="{Binding TabItems}"
FooterMenuItems="{Binding FooterTabItems}"
SelectedItem="{Binding SelectedItem}">
<!--<ui:NavigationView.PaneHeader>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Height="110" VerticalAlignment="Top">
@@ -70,6 +70,7 @@
<ItemGroup>
<ProjectReference Include="..\..\references\AvaloniaGif\AvaloniaGif\AvaloniaGif.csproj" />
<ProjectReference Include="..\..\references\FluentAvalonia\FluentAvalonia\FluentAvalonia.csproj" />
<ProjectReference Include="..\Common.CoreLib\Common.CoreLib.csproj" />
<ProjectReference Include="..\ST.Client.Desktop\ST.Client.Desktop.csproj" />
</ItemGroup>
@@ -83,7 +84,7 @@
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="0.10.7" />
<!--<PackageReference Include="CefNet.Avalonia" Version="90.6.21124.1851" />-->
<!--<PackageReference Include="LibVLCSharp.Avalonia" Version="3.5.1" />-->
<PackageReference Include="FluentAvaloniaUI" Version="1.1.1" />
<!--<PackageReference Include="FluentAvaloniaUI" Version="1.1.1" />-->
</ItemGroup>
<ItemGroup Condition="'$(Configuration)'=='Debug'">
@@ -50,6 +50,7 @@ namespace System.Application.UI.ViewModels
readonly Dictionary<Type, Lazy<TabItemViewModel>> mTabItems = new();
public IEnumerable<TabItemViewModel> TabItems => mTabItems.Values.Select(x => x.Value);
public List<TabItemViewModel> FooterTabItems { get; set; } = new();
public MainWindowViewModel() : base()
{
@@ -93,12 +94,16 @@ namespace System.Application.UI.ViewModels
AddTabItem<GameRelatedPageViewModel>();
//AddTabItem<OtherPlatformPageViewModel>();
AddTabItem(() => SettingsPageViewModel.Instance);
AddTabItem(() => AboutPageViewModel.Instance);
//AddTabItem(() => SettingsPageViewModel.Instance);
//AddTabItem(() => AboutPageViewModel.Instance);
FooterTabItems.Add(SettingsPageViewModel.Instance);
FooterTabItems.Add(AboutPageViewModel.Instance);
if (AppHelper.EnableDevtools)
{
AddTabItem<DebugPageViewModel>();
//FooterTabItems.Add(new DebugPageViewModel().AddTo(this));
//if (AppHelper.IsSystemWebViewAvailable)
//{
// AddTabItem<DebugWebViewPageViewModel>();
@@ -139,11 +144,11 @@ namespace System.Application.UI.ViewModels
mTabItems.Add(typeof(TabItemVM), value);
}
void AddTabItem<TabItemVM>(Func<TabItemVM> func) where TabItemVM : TabItemViewModel
{
Lazy<TabItemViewModel> value = new(func);
mTabItems.Add(typeof(TabItemVM), value);
}
//void AddTabItem<TabItemVM>(Func<TabItemVM> func) where TabItemVM : TabItemViewModel
//{
// Lazy<TabItemViewModel> value = new(func);
// mTabItems.Add(typeof(TabItemVM), value);
//}
TabItemVM GetTabItemVM<TabItemVM>() where TabItemVM : TabItemViewModel => (TabItemVM)mTabItems[typeof(TabItemVM)].Value;
}