mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-28 23:19:53 +08:00
Misc
This commit is contained in:
@@ -38,10 +38,10 @@
|
||||
<StyleInclude Source="/Application/UI/Styles/Controls/DataGrid.xaml" />
|
||||
<StyleInclude Source="/Application/UI/Styles/Controls/DateTimePicker.xaml" />
|
||||
<StyleInclude Source="/Application/UI/Styles/Controls/ProgressBar.xaml" />
|
||||
<!--<StyleInclude Source="/Application/UI/Styles/Controls/ProgressRingArc.xaml" />-->
|
||||
<!--<StyleInclude Source="/Application/UI/Styles/Controls/ProgressRing.xaml" />-->
|
||||
<StyleInclude Source="/Application/UI/Styles/Controls/ToggleSwitch.xaml" />
|
||||
|
||||
<StyleInclude Source="/Application/UI/Views/Controls/Badge.xaml" />
|
||||
|
||||
<StyleInclude Source="/Application/UI/Styles/Window.xaml" />
|
||||
<StyleInclude Source="/Application/UI/Styles/Settings.xaml" />
|
||||
</Styles>
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
<Styles
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:System.Application.UI.Views.Controls"
|
||||
xmlns:ui="using:FluentAvalonia.UI.Controls">
|
||||
<Design.PreviewWith>
|
||||
<Border Padding="40">
|
||||
<controls:Badge Background="#3CB371" Text="Test">
|
||||
<controls:Badge.Icon>
|
||||
<ui:SymbolIcon Symbol="Games" />
|
||||
</controls:Badge.Icon>
|
||||
<TextBlock Text="Hello World!" />
|
||||
</controls:Badge>
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
|
||||
<Style Selector="controls|Badge">
|
||||
<Setter Property="Background" Value="{DynamicResource MaterialDesignCardBackground}" />
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
<Setter Property="ClipToBounds" Value="False" />
|
||||
<Setter Property="Height" Value="26" />
|
||||
<Setter Property="FontSize" Value="12" />
|
||||
<Setter Property="Padding" Value="8 4" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<Border>
|
||||
<DockPanel Background="Transparent" ClipToBounds="False">
|
||||
<Border Padding="{TemplateBinding Padding}" Background="#555555">
|
||||
<DockPanel VerticalAlignment="Center">
|
||||
<Border Name="IconColumn" Height="24">
|
||||
<Viewbox
|
||||
Name="IconBox"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
<ContentPresenter Name="Icon" Content="{TemplateBinding Icon}" />
|
||||
</Viewbox>
|
||||
</Border>
|
||||
<ContentPresenter
|
||||
Name="ContentPresenter"
|
||||
Margin="5,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
IsVisible="{TemplateBinding Content,
|
||||
Converter={StaticResource IsNullConverter},
|
||||
ConverterParameter=invert}" />
|
||||
</DockPanel>
|
||||
</Border>
|
||||
<Border Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
|
||||
<TextBlock VerticalAlignment="Center" Text="{TemplateBinding Text}" />
|
||||
</Border>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Styles>
|
||||
@@ -0,0 +1,30 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Collections;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Metadata;
|
||||
using System.Collections;
|
||||
|
||||
namespace System.Application.UI.Views.Controls
|
||||
{
|
||||
public class Badge : ContentControl
|
||||
{
|
||||
public static readonly StyledProperty<string> TextProperty =
|
||||
AvaloniaProperty.Register<Badge, string>(nameof(Text), string.Empty);
|
||||
|
||||
public static readonly StyledProperty<Control> IconProperty =
|
||||
AvaloniaProperty.Register<Badge, Control>(nameof(Icon));
|
||||
|
||||
public string Text
|
||||
{
|
||||
get => GetValue(TextProperty);
|
||||
set => SetValue(TextProperty, value);
|
||||
}
|
||||
|
||||
public Control Icon
|
||||
{
|
||||
get => GetValue(IconProperty);
|
||||
set => SetValue(IconProperty, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="System.Application.UI.Views.Controls.Badge">
|
||||
|
||||
</UserControl>
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Collections;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Metadata;
|
||||
using System.Collections;
|
||||
|
||||
namespace System.Application.UI.Views.Controls
|
||||
{
|
||||
public partial class Badge : UserControl
|
||||
{
|
||||
public Badge()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
+9
-1
@@ -46,7 +46,13 @@
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
|
||||
<Border Classes="Item">
|
||||
<DockPanel>
|
||||
<TextBlock Text="启动时不要在提示捐助消息"/>
|
||||
<ToggleSwitch/>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
<Expander>
|
||||
<Expander.Header>
|
||||
@@ -57,6 +63,8 @@
|
||||
</StackPanel>
|
||||
<DatePicker Classes="right"
|
||||
DayVisible="False"
|
||||
MinYear="{x:Static vm:AboutPageViewModel.StartYear}"
|
||||
MaxYear="{x:Static vm:AboutPageViewModel.ThisYear}"
|
||||
SelectedDate="{Binding DonateFliterDate,Mode=TwoWay}"/>
|
||||
</DockPanel>
|
||||
</Expander.Header>
|
||||
|
||||
+7
-7
@@ -125,7 +125,7 @@
|
||||
VerticalAlignment="Center"
|
||||
VerticalContentAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Classes="Header light"
|
||||
Margin="0,0,6,0"
|
||||
@@ -196,16 +196,16 @@
|
||||
Padding="0"
|
||||
TextWrapping="Wrap">
|
||||
<TextBox.Text>
|
||||
English: 沙中金
|
||||
English: 沙中金
|
||||
|
||||
Spanish: EspRoy
|
||||
Spanish: EspRoy
|
||||
|
||||
Italian: Zhengye
|
||||
Italian: Zhengye
|
||||
</TextBox.Text>
|
||||
</TextBox>
|
||||
</StackPanel>
|
||||
</Expander>
|
||||
|
||||
|
||||
<Separator Classes="Separator"/>
|
||||
|
||||
<Expander>
|
||||
@@ -334,11 +334,11 @@ Italian: Zhengye
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Button>
|
||||
|
||||
|
||||
<TextBlock Classes="h7 light"
|
||||
Margin="0 20"
|
||||
HorizontalAlignment="Center"
|
||||
Text="{Binding Copyright}"
|
||||
Text="{x:Static vm:AboutPageViewModel.Copyright}"
|
||||
VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
+30
-4
@@ -282,8 +282,34 @@
|
||||
<Separator Height="{ReflectionBinding $parent.Height}" Classes="Separator"/>
|
||||
|
||||
<StackPanel IsVisible="{Binding CardsFarmer.GamesToFarmReadOnly.Count,Converter={StaticResource IsNullConverter},ConverterParameter=invert}"
|
||||
Spacing="3"
|
||||
Orientation="Horizontal">
|
||||
<DockPanel ToolTip.Tip="{ReflectionBinding Path=Res.ASF_GamesRemaining,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
|
||||
<controls:Badge Background="#3CB371"
|
||||
Text="{Binding CardsFarmer.GamesToFarmReadOnly.Count}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.ASF_GamesRemaining,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<controls:Badge.Icon>
|
||||
<ui:SymbolIcon Symbol="Games" />
|
||||
</controls:Badge.Icon>
|
||||
</controls:Badge>
|
||||
|
||||
<controls:Badge Background="#3CB371"
|
||||
Text="{Binding CardsFarmer.CardsRemaining}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.ASF_CardsRemaining,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<controls:Badge.Icon>
|
||||
<ui:SymbolIcon Symbol="Page2" />
|
||||
</controls:Badge.Icon>
|
||||
</controls:Badge>
|
||||
|
||||
<controls:Badge Background="#3CB371"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.ASF_TimeRemaining,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Text="{Binding CardsFarmer.TimeRemaining,StringFormat= {}{0:hh\\:mm\\:ss}}">
|
||||
<controls:Badge.Icon>
|
||||
<ui:SymbolIcon Symbol="Clock" />
|
||||
</controls:Badge.Icon>
|
||||
</controls:Badge>
|
||||
|
||||
<!--<DockPanel ToolTip.Tip="{ReflectionBinding Path=Res.ASF_GamesRemaining,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
VerticalAlignment="Center">
|
||||
<Border>
|
||||
<ui:SymbolIcon Symbol="Games"
|
||||
@@ -295,9 +321,9 @@
|
||||
<TextBlock Text="{Binding CardsFarmer.GamesToFarmReadOnly.Count}"
|
||||
VerticalAlignment="Center"
|
||||
DockPanel.Dock="Right"/>
|
||||
</DockPanel>
|
||||
</DockPanel>-->
|
||||
|
||||
<DockPanel ToolTip.Tip="{ReflectionBinding Path=Res.ASF_CardsRemaining,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
<!--<DockPanel ToolTip.Tip="{ReflectionBinding Path=Res.ASF_CardsRemaining,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
VerticalAlignment="Center">
|
||||
<ui:SymbolIcon Symbol="Page2"
|
||||
Margin="5 0"
|
||||
@@ -319,7 +345,7 @@
|
||||
<TextBlock Text="{Binding CardsFarmer.TimeRemaining,StringFormat= {}{0:hh\\:mm\\:ss}}"
|
||||
VerticalAlignment="Center"
|
||||
DockPanel.Dock="Right"/>
|
||||
</DockPanel>
|
||||
</DockPanel>-->
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
|
||||
@@ -201,6 +201,7 @@
|
||||
<Panel DockPanel.Dock="Top">
|
||||
<Separator Height="13" IsVisible="{Binding !IsShowCode}"></Separator>
|
||||
<ProgressBar Value="{Binding CodeCountdown,Mode=OneWay}"
|
||||
Classes="notransitions"
|
||||
IsVisible="{Binding IsShowCode}"
|
||||
Margin="0 10 0 4"/>
|
||||
<Separator Classes="Separator" Margin="0 14 0 4"/>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
xmlns:ms="using:System.Application.Settings"
|
||||
FontFamily="{Binding Source={x:Static ms:UISettings.FontName},Path=Value, Mode=OneWay,Converter={StaticResource NameToFontFamilyConverter}}"
|
||||
UseLayoutRounding="True"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
SizeToContent="WidthAndHeight"
|
||||
MinWidth="450" MinHeight="50"
|
||||
MaxWidth="900" MaxHeight="600"
|
||||
|
||||
@@ -33,6 +33,10 @@
|
||||
<None Remove="CefSharp\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AvaloniaResource Remove="Application\UI\Views\Controls\UserControl\Badge.xaml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AvaloniaXaml Remove="Application\UI\Views\Controls\WebView3.axaml" />
|
||||
<AvaloniaXaml Remove="Application\UI\Views\Pages\About\About_ChangeLog.axaml" />
|
||||
@@ -58,6 +62,13 @@
|
||||
<None Remove="Application\UI\Assets\Fonts\WenQuanYiMicroHei-01.ttf" />
|
||||
<None Remove="Application\UI\Assets\movecross.png" />
|
||||
<None Remove="Application\UI\Styles\Controls\ProgressBar.xaml" />
|
||||
<None Remove="Application\UI\Views\Controls\UserControl\Badge.xaml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<AvaloniaXaml Include="Application\UI\Views\Controls\Badge.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</AvaloniaXaml>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -110,8 +121,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Application\UI\Views\Controls\UserControl\Badge.axaml.cs">
|
||||
<DependentUpon>Badge.axaml</DependentUpon>
|
||||
<Compile Update="Application\UI\Views\Controls\Badge.xaml.cs">
|
||||
<DependentUpon>Badge.xaml</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -83,6 +83,11 @@ namespace System.Application
|
||||
/// 解锁成就提示
|
||||
/// </summary>
|
||||
UnLockAchievement = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 捐助提示
|
||||
/// </summary>
|
||||
Donate = 2,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -174,5 +174,19 @@ namespace System.Application.UI.ViewModels
|
||||
}
|
||||
}).ForgetAndDispose();
|
||||
}
|
||||
|
||||
//public async override void Activation()
|
||||
//{
|
||||
// if (IsFirstActivation)
|
||||
// {
|
||||
// if (UISettings.DoNotShowMessageBoxs.Value?.Contains(MessageBox.DontPromptType.Donate) == false)
|
||||
// {
|
||||
// //INotificationService.Instance.Notify("如果你觉得Steam++好用,你可以考虑给我们一些捐助以支持我们继续开发,谢谢!", NotificationType.Message);
|
||||
// await MessageBox.ShowAsync("如果你觉得Steam++好用,你可以考虑给我们一些捐助以支持我们继续开发,谢谢!", button: MessageBox.Button.OK,
|
||||
// rememberChooseKey: MessageBox.DontPromptType.Donate);
|
||||
// }
|
||||
// }
|
||||
// base.Activation();
|
||||
//}
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,10 @@ namespace System.Application.UI.ViewModels
|
||||
set => this.RaiseAndSetIfChanged(ref _DonateFliterDate, value);
|
||||
}
|
||||
|
||||
private const int DonateListPageSize = 50;
|
||||
public static readonly DateTimeOffset StartYear = new(2020, 1, 1, 0, 0, 0, TimeSpan.Zero);
|
||||
public static readonly DateTimeOffset ThisYear = new DateTimeOffset(DateTimeOffset.Now.Year + 1, 1, 1, 0, 0, 0, TimeSpan.Zero).AddDays(-1);
|
||||
|
||||
private const int DonateListPageSize = 100;
|
||||
|
||||
public AboutPageViewModel()
|
||||
{
|
||||
@@ -173,7 +176,7 @@ namespace System.Application.UI.ViewModels
|
||||
|
||||
public string LabelVersionDisplay => ThisAssembly.IsAlphaRelease ? "Alpha Version:" : (ThisAssembly.IsBetaRelease ? "Beta Version:" : "Current Version:");
|
||||
|
||||
public string Copyright
|
||||
public static string Copyright
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user