mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-28 23:19:53 +08:00
🚧 GameAccount Plugin UI
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
[assembly: XmlnsDefinition("https://steampp.net/ui", "BD.WTTS.Converters")]
|
||||
[assembly: XmlnsDefinition("https://steampp.net/ui", "BD.WTTS.UI.ViewModels")]
|
||||
[assembly: XmlnsDefinition("https://steampp.net/ui", "BD.WTTS.Markup")]
|
||||
[assembly: XmlnsDefinition("https://steampp.net/ui", "BD.WTTS.Models")]
|
||||
[assembly: XmlnsDefinition("https://steampp.net/services", "BD.WTTS.Services")]
|
||||
|
||||
// FluentAvaloniaUI
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using BD.WTTS.Client.Resources;
|
||||
using static BD.WTTS.Services.INotificationService;
|
||||
|
||||
namespace BD.WTTS.UI;
|
||||
@@ -38,7 +39,7 @@ partial class App
|
||||
new NativeMenuItemSeparator(),
|
||||
new NativeMenuItem
|
||||
{
|
||||
Header = "Exit",
|
||||
[!NativeMenuItem.HeaderProperty] = new Binding { Path = "Res.Exit", Source = ResourceService.Current, Mode = BindingMode.OneWay },
|
||||
Command = ReactiveCommand.Create(() => { Shutdown(); })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,5 @@
|
||||
</Style>
|
||||
<Style Selector="ui|TabView /template/ ContentPresenter#TabContentPresenter">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="ToolTip.Tip" Value="11111"/>
|
||||
</Style>
|
||||
</Styles>
|
||||
|
||||
@@ -7,17 +7,6 @@
|
||||
<!--<EnableDynamicLoading>true</EnableDynamicLoading>-->
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AvaloniaXaml Remove="UI\Views\Pages\新文件夹1\**" />
|
||||
<AvaloniaXaml Remove="UI\Views\Pages\新文件夹\**" />
|
||||
<Compile Remove="UI\Views\Pages\新文件夹1\**" />
|
||||
<Compile Remove="UI\Views\Pages\新文件夹\**" />
|
||||
<EmbeddedResource Remove="UI\Views\Pages\新文件夹1\**" />
|
||||
<EmbeddedResource Remove="UI\Views\Pages\新文件夹\**" />
|
||||
<None Remove="UI\Views\Pages\新文件夹1\**" />
|
||||
<None Remove="UI\Views\Pages\新文件夹\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- ImplicitUsings -->
|
||||
<Compile Include="..\ImplicitUsings.MessagePack.cs">
|
||||
|
||||
@@ -9,4 +9,5 @@ using Avalonia.Metadata;
|
||||
[assembly: XmlnsDefinition("https://steampp.net/ui", "BD.WTTS.Converters")]
|
||||
[assembly: XmlnsDefinition("https://steampp.net/ui", "BD.WTTS.UI.ViewModels")]
|
||||
[assembly: XmlnsDefinition("https://steampp.net/ui", "BD.WTTS.Markup")]
|
||||
[assembly: XmlnsDefinition("https://steampp.net/ui", "BD.WTTS.Models")]
|
||||
[assembly: XmlnsDefinition("https://steampp.net/services", "BD.WTTS.Services")]
|
||||
@@ -6,6 +6,23 @@ public sealed partial class GameAccountPageViewModel
|
||||
{
|
||||
public GameAccountPageViewModel()
|
||||
{
|
||||
|
||||
GamePlatforms = new ObservableCollection<PlatformAccount>
|
||||
{
|
||||
new PlatformAccount
|
||||
{
|
||||
FullName = "Steam",
|
||||
Icon = "Steam",
|
||||
},
|
||||
new PlatformAccount
|
||||
{
|
||||
FullName = "Epic Games",
|
||||
Icon = "EpicGames",
|
||||
},
|
||||
new PlatformAccount
|
||||
{
|
||||
FullName = "Ubisoft",
|
||||
Icon = "Ubisoft",
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="BD.WTTS.UI.Views.AccountItems">
|
||||
Welcome to Avalonia!
|
||||
Welcome to Avalonia!
|
||||
</UserControl>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="BD.WTTS.UI.Views.GameAccountPage">
|
||||
<ui:TabView Padding="0"
|
||||
TabItems="{Binding GamePlatforms}"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="Transparent"
|
||||
IsAddTabButtonVisible="False"
|
||||
@@ -62,20 +63,31 @@
|
||||
</Button.Flyout>
|
||||
</Button>
|
||||
</ui:TabView.TabStripFooter>
|
||||
<ui:TabViewItem Header="Steam">
|
||||
<ui:TabViewItem.IconSource>
|
||||
<ui:PathIconSource Data="{StaticResource Steam}" />
|
||||
</ui:TabViewItem.IconSource>
|
||||
</ui:TabViewItem>
|
||||
<ui:TabViewItem Header="EpicGames">
|
||||
<ui:TabViewItem.IconSource>
|
||||
<ui:PathIconSource Data="{StaticResource EpicGames}" />
|
||||
</ui:TabViewItem.IconSource>
|
||||
</ui:TabViewItem>
|
||||
<ui:TabViewItem Header="Ubisoft">
|
||||
<ui:TabViewItem.IconSource>
|
||||
<ui:PathIconSource Data="{StaticResource Ubisoft}" />
|
||||
</ui:TabViewItem.IconSource>
|
||||
</ui:TabViewItem>
|
||||
<ui:TabView.Styles>
|
||||
<Style Selector="ui|TabViewItem" x:DataType="spp:PlatformAccount">
|
||||
<!--<Setter Property="IconSource">
|
||||
<ui:FontIconSource Glyph="{Binding Icon}" />
|
||||
</Setter>-->
|
||||
<Setter Property="Content" Value="{Binding}" />
|
||||
<Setter Property="ContentTemplate">
|
||||
<DataTemplate>
|
||||
<spp:AccountItems />
|
||||
</DataTemplate>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ui:TabView.Styles>
|
||||
<ui:TabView.TabItemTemplate>
|
||||
<DataTemplate x:DataType="spp:PlatformAccount">
|
||||
<DockPanel>
|
||||
<PathIcon Data="{Binding Icon,Converter={StaticResource ResourceKeyValueConverter}}"
|
||||
Width="16"
|
||||
Height="16"
|
||||
Margin="0 0 8 0"
|
||||
DockPanel.Dock="Left"/>
|
||||
<TextBlock Text="{Binding FullName}"
|
||||
DockPanel.Dock="Right"/>
|
||||
</DockPanel>
|
||||
</DataTemplate>
|
||||
</ui:TabView.TabItemTemplate>
|
||||
</ui:TabView>
|
||||
</UserControl>
|
||||
|
||||
@@ -7,5 +7,6 @@ public partial class GameAccountPage : ReactiveUserControl<GameAccountPageViewMo
|
||||
public GameAccountPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = new GameAccountPageViewModel();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user