Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into feature/networktes…
Browse files Browse the repository at this point in the history
…tservice
  • Loading branch information
luojunyuan committed Aug 29, 2024
2 parents a3811a9 + 6a3c8f6 commit ca7fa0b
Show file tree
Hide file tree
Showing 92 changed files with 3,238 additions and 1,406 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
[![NET 7.0](https://img.shields.io/badge/dotnet-7.0-purple.svg?style=flat-square&color=512bd4)](https://learn.microsoft.com/zh-cn/dotnet/core/whats-new/dotnet-7)
[![C# 11](https://img.shields.io/badge/c%23-11-brightgreen.svg?style=flat-square&color=6da86a)](https://learn.microsoft.com/zh-cn/dotnet/csharp/whats-new/csharp-11)

[![爱发电](https://img.shields.io/badge/爱发电-软妹币玩家-blue.svg?style=flat-square&color=ea4aaa&logo=github-sponsors)](https://afdian.net/@rmbgame)
[![爱发电](https://img.shields.io/badge/爱发电-软妹币玩家-blue.svg?style=flat-square&color=ea4aaa&logo=github-sponsors)](https://afdian.com/@rmbgame)
[![Kofi](https://img.shields.io/badge/Kofi-RMBGAME-orange.svg?style=flat-square&logo=kofi)](https://ko-fi.com/rmbgame)
[![Patreon](https://img.shields.io/badge/Patreon-RMBGAME-red.svg?style=flat-square&logo=patreon)](https://www.patreon.com/rmbgame)

Expand Down
13 changes: 11 additions & 2 deletions build/settings_v4_app.json
Original file line number Diff line number Diff line change
Expand Up @@ -964,8 +964,8 @@
},
{
"TypeName": "bool",
"PropertyName": "UseDoh2",
"DefaultValue": "false",
"PropertyName": "UseDoh",
"DefaultValue": "true",
"DefaultValueIsConst": true,
"Summary": "启用 DNS over HTTPS",
"IsRegionOrEndregion": null,
Expand All @@ -988,6 +988,15 @@
"Summary": "加速页面 Tab 选项卡选中下标",
"IsRegionOrEndregion": null,
"IsValueType": null
},
{
"TypeName": "bool",
"PropertyName": "AutoShowWattAcceleratorWindow",
"DefaultValue": "true",
"DefaultValueIsConst": true,
"Summary": "加速后自动唤起 Watt 加速器界面",
"IsRegionOrEndregion": null,
"IsValueType": null
}
],
"Usings": ""
Expand Down
2 changes: 1 addition & 1 deletion ref/Avalonia.Image2
5 changes: 5 additions & 0 deletions ref/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<CheckEolWorkloads>false</CheckEolWorkloads>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion ref/DirectoryPackages
2 changes: 1 addition & 1 deletion ref/SteamClient
2 changes: 1 addition & 1 deletion ref/WTTS.MicroServices.ClientSDK
Submodule WTTS.MicroServices.ClientSDK updated 40 files
+1 −1 ref/DirectoryPackages
+5 −0 src/BD.WTTS.MicroServices.ClientSDK.UnitTest/SDKTest.cs
+37 −0 src/BD.WTTS.MicroServices.ClientSDK/Services/IMicroServiceClient.Clients.cs
+86 −1 src/BD.WTTS.MicroServices.ClientSDK/Services/Implementation/MicroServiceClientBase.Clients.cs
+19 −6 src/BD.WTTS.Primitives.Models/Models/Accelerator/AccelerateProjectDTO.cs
+9 −0 src/BD.WTTS.Primitives.Models/Models/GameLibrary/Jobs/Distributed/AchievementModel.cs
+16 −0 src/BD.WTTS.Primitives.Models/Models/GameLibrary/Jobs/Distributed/ConfigurationModel.cs
+14 −0 src/BD.WTTS.Primitives.Models/Models/GameLibrary/Jobs/Distributed/GameInfoModel.cs
+11 −0 src/BD.WTTS.Primitives.Models/Models/GameLibrary/Jobs/Distributed/GameInfoRefreshDistributedModel.cs
+4 −0 src/BD.WTTS.Primitives.Models/Models/GameLibrary/Jobs/Distributed/GamePriceRefreshDistributedModel.cs
+4 −0 src/BD.WTTS.Primitives.Models/Models/GameLibrary/Jobs/Distributed/GamePriceSubModel.cs
+8 −0 src/BD.WTTS.Primitives.Models/Models/GameLibrary/Jobs/Distributed/LanguageModel.cs
+9 −0 src/BD.WTTS.Primitives.Models/Models/GameLibrary/Jobs/Distributed/RateMediaAgencyModel.cs
+7 −0 src/BD.WTTS.Primitives.Models/Models/GameLibrary/Jobs/Distributed/StaticResourceModel.cs
+0 −21 src/BD.WTTS.Primitives.Models/Models/Identity/EmailConfirmRequest.cs
+3 −3 src/BD.WTTS.Primitives.Models/Models/Ordering/AgreementDTO.cs
+27 −0 src/BD.WTTS.Primitives.Models/Models/Plugin/PluginCategoryDTO.cs
+8 −32 src/BD.WTTS.Primitives.Models/Models/Plugin/PluginDTOs.cs
+26 −0 src/BD.WTTS.Primitives.Models/Models/Plugin/PluginPackageInfoDTO.cs
+0 −18 src/BD.WTTS.Primitives.Models/Models/Plugin/PluginUpdateDTO.cs
+30 −0 src/BD.WTTS.Primitives.Models/Models/Plugin/PluginUpdateDetailDTO.cs
+13 −0 src/BD.WTTS.Primitives.Models/Models/Plugin/PluginUpdateRequest.cs
+17 −0 src/BD.WTTS.Primitives.Models/Models/SteamBot/WishList/BotConfigModel.cs
+13 −0 src/BD.WTTS.Primitives.Models/Models/SteamBot/WishList/WishListJobDistributedMasterItem.cs
+17 −0 src/BD.WTTS.Primitives.Models/Models/SteamBot/WishList/WishListJobDistributedMasterModel.cs
+12 −0 src/BD.WTTS.Primitives.Models/Models/SteamBot/WishList/WishListJobDistributedSalveModel.cs
+15 −0 src/BD.WTTS.Primitives.Models/Models/SteamBot/WishList/WishListJobDistributedSalveTaskItem.cs
+4 −1 src/BD.WTTS.Primitives.Models/Models/SteamRecharge/BusinessOrderRequest.cs
+43 −0 src/BD.WTTS.Primitives.Models/Models/XunYou/XunYouGood.cs
+5 −0 src/BD.WTTS.Primitives/Constants/Constants.Lengths.cs
+5 −5 src/BD.WTTS.Primitives/Constants/Constants.Urls.cs
+2 −0 src/BD.WTTS.Primitives/Enums/Basics/ThirdpartyPlatform.cs
+32 −0 src/BD.WTTS.Primitives/Enums/Order/AgreementStatus.cs
+3 −0 src/BD.WTTS.Primitives/Enums/Order/OrderBusinessType.cs
+12 −5 src/BD.WTTS.Primitives/Enums/Order/OrderType.cs
+8 −0 src/BD.WTTS.Primitives/Enums/SteamBot/RewardRecordStatus.cs
+23 −0 src/BD.WTTS.Primitives/Enums/SteamBot/RewardStatus.cs
+18 −0 src/BD.WTTS.Primitives/Enums/SteamBot/RewardType.cs
+2 −1 src/BD.WTTS.Primitives/Enums/SteamRecharge/GoodsRechargeType.cs
+1 −1 src/Directory.Build.props
2 changes: 1 addition & 1 deletion ref/WinAuth
Binary file added ref/WinDivert.mpo
Binary file not shown.
11 changes: 11 additions & 0 deletions ref/WinDivert.mpo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
static void WinDivert()
{
var dllWinDivert = Path.Combine(ProjectUtils.ProjPath, "ref", "WinDivert.dll");
var sysWinDivert64 = Path.Combine(ProjectUtils.ProjPath, "ref", "WinDivert64.sys");

byte[][] data = [File.ReadAllBytes(dllWinDivert), File.ReadAllBytes(sysWinDivert64)];
var bytes = MemoryPackSerializer.Serialize(data);
bytes.AsSpan().Reverse();

File.WriteAllBytes(Path.Combine(ProjectUtils.ProjPath, "ref", "WinDivert.mpo"), bytes);
}
4 changes: 2 additions & 2 deletions src/AssemblyInfo.Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ public static partial class AssemblyInfo
/// <summary>
/// 预览版本号,范围 1~9,只增不减
/// </summary>
const string ver_for_preview = "8";
const string ver_for_preview = "9";

/// <summary>
/// RC 版本号,范围 0~9,只增不减
/// </summary>
const string ver_for_rc = "9";

public const string FileVersion = $"{Version2}.{ver_for_rc}0{ver_for_preview}.0";
public const string FileVersion = $"{Version2}.{ver_for_rc}1{ver_for_preview}.0";

//public const string InformationalVersion = Version;
//public const string InformationalVersion = $"{Version}-preview.{ver_for_preview}";
Expand Down
1 change: 1 addition & 0 deletions src/Avalonia.Skia.Internals/Avalonia.Skia.Internals.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<DelaySign>false</DelaySign>
<AssemblyOriginatorKeyFile>$(MSBuildProjectDirectory)\..\..\avalonia.snk</AssemblyOriginatorKeyFile>
<!--https://github.com/AvaloniaUI/Avalonia/blob/0.10.10/build/SharedVersion.props#L18-->
<AvaloniaAccessUnstablePrivateApis>true</AvaloniaAccessUnstablePrivateApis>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="BD.Common.XmlnsDefinition.Avalonia">
<Aliases>BD_Common_XmlnsDefinition_Avalonia</Aliases>
</PackageReference>
<ProjectReference Include="..\BD.WTTS.Client.Avalonia\BD.WTTS.Client.Avalonia.csproj" />
<ProjectReference Include="..\BD.WTTS.Client\BD.WTTS.Client.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@

<ItemGroup>
<PackageReference Include="Moq" />
<PackageReference Include="BD.Common.XmlnsDefinition.Avalonia">
<Aliases>BD_Common_XmlnsDefinition_Avalonia</Aliases>
</PackageReference>
<ProjectReference Include="..\BD.WTTS.Client.Avalonia\BD.WTTS.Client.Avalonia.csproj" />
<ProjectReference Include="..\BD.WTTS.Client.Plugins.Accelerator\BD.WTTS.Client.Plugins.Accelerator.csproj" />
<ProjectReference Include="..\BD.WTTS.Client.Plugins.ArchiSteamFarmPlus\BD.WTTS.Client.Plugins.ArchiSteamFarmPlus.csproj" />
Expand Down
4 changes: 1 addition & 3 deletions src/BD.WTTS.Client.Avalonia/BD.WTTS.Client.Avalonia.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<RootNamespace>BD.WTTS</RootNamespace>
<DefineConstants>AVALONIA;$(DefineConstants)</DefineConstants>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
<AvaloniaAccessUnstablePrivateApis>true</AvaloniaAccessUnstablePrivateApis>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -72,9 +73,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="BD.Common.XmlnsDefinition.Avalonia">
<Aliases>BD_Common_XmlnsDefinition_Avalonia</Aliases>
</PackageReference>
<PackageReference Include="BD.Common" />
<PackageReference Include="BD.Common.Primitives" />
<PackageReference Include="BD.Common.Essentials" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public async Task<bool> ShowTaskDialogAsync<TPageViewModel>(
Func<bool>? cancelCloseAction = null,
bool disableScroll = false)
where TPageViewModel : ViewModelBase
{
{
var td = new TaskDialogEx
{
Title = title,
Expand All @@ -111,6 +111,12 @@ public async Task<bool> ShowTaskDialogAsync<TPageViewModel>(
XamlRoot = GetWindowTopLevel(),
};

if (td.XamlRoot == null)
{
Toast.LogAndShowT(new Exception("在 AppWindow 为 Null 时,无法弹出 Taskdialog."));
return false;
}

if (viewModel != null)
{
if (viewModel is IWindowViewModel window)
Expand Down
40 changes: 40 additions & 0 deletions src/BD.WTTS.Client.Avalonia/UI/App.TrayIcon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,50 @@ void InitTrayIcon()
#else
s.HasTrayIcon ? ShutdownMode.OnExplicitShutdown : ShutdownMode.OnMainWindowClose;
#endif
#if MACOS
if (Current!.TryGetFeature<IActivatableLifetime>() is { } activatableLifetime)
{
activatableLifetime.Activated += ActivatableLifetimeOnActivated;
// macOS 中 右键隐藏 会触发目前不需要使用
//activatableLifetime.Deactivated += ActivatableLifetimeOnDeactivated;
}
#endif
}
}

#if MACOS
/// <summary>
/// 从 macOS Dock 栏恢复窗口显示
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ActivatableLifetimeOnActivated(object? sender, ActivatedEventArgs e)
{
switch (e.Kind)
{
case ActivationKind.Background:
case ActivationKind.Reopen:
RestoreMainWindow();
break;
}
}

///// <summary>
///// macOS 中 右键隐藏 会触发目前不需要使用
///// </summary>
///// <param name="sender"></param>
///// <param name="e"></param>
//private void ActivatableLifetimeOnDeactivated(object? sender, ActivatedEventArgs e)
//{
// switch (e.Kind)
// {
// case ActivationKind.Background:
// Console.WriteLine($"ActivatableLifetimeOnDeactivated {e.Kind}");
// break;
// }
//}
#endif

public void UpdateMenuItems()
{
MainThread2.BeginInvokeOnMainThread(() =>
Expand Down
14 changes: 14 additions & 0 deletions src/BD.WTTS.Client.Avalonia/UI/Styling/Controls/Button.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
<StackPanel Spacing="10">
<HyperlinkButton Content="更新日志" />
<Button Content="更新日志" Theme="{StaticResource HyperlinkButton}" />
<Button Classes="TransparentAccent" Content="更新日志" />
<Button
Classes="TransparentAccent"
Content="更新日志"
IsEnabled="False" />
<Button
Content="更新日志"
IsEnabled="False"
Expand Down Expand Up @@ -221,6 +226,15 @@
<Setter Property="Background" Value="Transparent" />
</Style>

<Style Selector="Button.TransparentAccent /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonForeground}" />
</Style>

<Style Selector="Button.TransparentAccent:pointerover /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonForegroundPointerOver}" />
</Style>

<Style Selector="Button.TransparentAccent:pressed /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonForegroundPressed}" />
</Style>
</Styles>
6 changes: 6 additions & 0 deletions src/BD.WTTS.Client.Avalonia/UI/Styling/Icons.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,10 @@
<StreamGeometry x:Key="Phone">
M15.75 2C16.9926 2 18 3.00736 18 4.25V19.75C18 20.9926 16.9926 22 15.75 22H8.25C7.00736 22 6 20.9926 6 19.75V4.25C6 3.00736 7.00736 2 8.25 2H15.75ZM13.25 18H10.75C10.3358 18 10 18.3358 10 18.75C10 19.1642 10.3358 19.5 10.75 19.5H13.25C13.6642 19.5 14 19.1642 14 18.75C14 18.3358 13.6642 18 13.25 18Z
</StreamGeometry>
<StreamGeometry x:Key="GOGGalaxy">
M304.99296 650.144H185.98496a17.12 17.12 0 0 0-16.992 17.184v85.344c0 8.992 7.68 16.992 16.992 16.992h119.52v56.32H156.16096a43.84 43.84 0 0 1-43.488-44v-144.512c0-23.968 19.68-43.488 44-43.488h148.32z m43.168-157.824c0 24.832-20 44.832-44.832 44.832H112.19296v-57.696h161.312a16.896 16.896 0 0 0 17.024-16.992V272.64a17.024 17.024 0 0 0-17.024-17.184H187.36096a17.152 17.152 0 0 0-17.536 17.184v86.144c0 9.856 7.68 17.024 17.024 17.024H256.00096v57.632H157.02496a44.544 44.544 0 0 1-44.832-44.32V242.304c0-24.352 20.192-44.32 44.832-44.32H303.04096c24.672 0 44.64 19.968 44.64 44.32v249.984z m563.168 333.664h-56.32v-175.84h-39.68a17.12 17.12 0 0 0-16.992 17.184v158.624h-56.832v-175.84h-39.68a17.12 17.12 0 0 0-16.992 17.184v158.624h-56.832v-188.512c0-23.968 19.68-43.488 44-43.488h239.328z m0.512-333.664c0 24.832-20.192 44.832-44.832 44.832h-191.136v-57.696h161.312a16.96 16.96 0 0 0 17.024-16.992V272.64a17.12 17.12 0 0 0-17.024-17.184h-86.656a17.024 17.024 0 0 0-17.024 17.184v86.144c0 9.856 7.68 17.024 17.024 17.024h69.152v57.632h-98.688a44.352 44.352 0 0 1-44.64-44.32V242.304c0-24.352 19.968-44.32 44.64-44.32h146.336c24.832 0 44.832 19.968 44.832 44.32v249.984zM585.34496 198.016h-146.688c-24.832 0-44.512 19.968-44.512 44.32v146.816a44.16 44.16 0 0 0 44.512 44.32h146.688a44.48 44.48 0 0 0 44.512-44.32V242.336c0-24.352-20.192-44.32-44.512-44.32z m-12.672 74.656v86.144c0 9.504-7.68 17.024-17.152 17.024h-86.688a16.96 16.96 0 0 1-16.992-17.024V272.96c0-9.312 7.328-16.992 16.992-16.992h85.856c9.824 0 16.992 7.68 16.992 16.992z m-33.824 321.344h-144.672c-24.16 0-43.808 19.488-43.808 43.488v144.512c0 24.32 19.68 44 43.808 44h144.672c24.32 0 44-19.68 44-44v-144.512c0-23.968-19.68-43.488-44-43.488z m-12.864 73.344v85.344a16.96 16.96 0 0 1-16.992 16.992v-0.352h-84.864a17.12 17.12 0 0 1-17.152-17.152v-84.832a17.28 17.28 0 0 1 17.152-17.184h85.344c9.344 0 17.024 7.84 17.024 17.184z m476.16-620.352A74.24 74.24 0 0 0 949.31296 24.64H74.65696A74.304 74.304 0 0 0 0.00096 99.296v825.344a74.304 74.304 0 0 0 74.656 74.656h874.656a74.304 74.304 0 0 0 74.656-74.656V99.296c0-20.32-8.48-39.168-21.856-52.832z m0 877.664a52.416 52.416 0 0 1-52.832 52.832H74.65696a52.576 52.576 0 0 1-53.344-52.832V99.328a52.672 52.672 0 0 1 52.832-52.832H948.80096c29.344 0 52.992 23.68 52.992 52.832v825.344z
</StreamGeometry>
<StreamGeometry x:Key="Discord">
M1049.062 139.672a3 3 0 0 0-1.528-1.4A970.13 970.13 0 0 0 808.162 64.06a3.632 3.632 0 0 0-3.846 1.82 674.922 674.922 0 0 0-29.8 61.2 895.696 895.696 0 0 0-268.852 0 619.082 619.082 0 0 0-30.27-61.2 3.78 3.78 0 0 0-3.848-1.82 967.378 967.378 0 0 0-239.376 74.214 3.424 3.424 0 0 0-1.576 1.352C78.136 367.302 36.372 589.38 56.86 808.708a4.032 4.032 0 0 0 1.53 2.75 975.332 975.332 0 0 0 293.65 148.378 3.8 3.8 0 0 0 4.126-1.352A696.4 696.4 0 0 0 416.24 860.8a3.72 3.72 0 0 0-2.038-5.176 642.346 642.346 0 0 1-91.736-43.706 3.77 3.77 0 0 1-0.37-6.252 502.094 502.094 0 0 0 18.218-14.274 3.638 3.638 0 0 1 3.8-0.512c192.458 87.834 400.82 87.834 591 0a3.624 3.624 0 0 1 3.848 0.466 469.066 469.066 0 0 0 18.264 14.32 3.768 3.768 0 0 1-0.324 6.252 602.814 602.814 0 0 1-91.78 43.66 3.75 3.75 0 0 0-2 5.222 782.11 782.11 0 0 0 60.028 97.63 3.728 3.728 0 0 0 4.126 1.4A972.096 972.096 0 0 0 1221.4 811.458a3.764 3.764 0 0 0 1.53-2.704c24.528-253.566-41.064-473.824-173.868-669.082zM444.982 675.16c-57.944 0-105.688-53.174-105.688-118.478s46.818-118.482 105.688-118.482c59.33 0 106.612 53.64 105.686 118.478 0 65.308-46.82 118.482-105.686 118.482z m390.76 0c-57.942 0-105.686-53.174-105.686-118.478s46.818-118.482 105.686-118.482c59.334 0 106.614 53.64 105.688 118.478 0 65.308-46.354 118.482-105.688 118.482z
</StreamGeometry>
</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public class ReactiveAppWindow<TViewModel> : AppWindow, IViewFor<TViewModel>, IV
public static readonly StyledProperty<bool> IsSaveWindowSizeProperty = AvaloniaProperty
.Register<ReactiveAppWindow<TViewModel>, bool>(nameof(IsSaveWindowSize), true);

private bool _isInitialize;

/// <summary>
/// Initializes a new instance of the <see cref="ReactiveAppWindow{TViewModel}"/> class.
/// </summary>
Expand Down Expand Up @@ -127,27 +129,32 @@ public override void Show()
{
var primaryScreenBounds = screen.Bounds;

if (CanResize && !IsVisible)
if (CanResize && !_isInitialize && !IsVisible)
{
WindowStartupLocation = WindowStartupLocation.Manual;
var scalingOffset = 31 - ((screen.Scaling - 1) / 0.5); // appwindow偏移量

if (SizePosition.Width > 0 &&
primaryScreenBounds.Width >= SizePosition.Width)
Width = SizePosition.Width;

if (SizePosition.Height > 0 &&
primaryScreenBounds.Height >= SizePosition.Height)
Height = SizePosition.Height - 31; // appwindow偏移量
Height = SizePosition.Height - scalingOffset;

if (SizePosition.X > 0 && SizePosition.Y > 0)
{
var leftTopPoint = new PixelPoint(SizePosition.X, SizePosition.Y + 31);
var offsetY = (int)Math.Round(scalingOffset * screen.Scaling);
//var offsetY = scalingOffset;
var leftTopPoint = new PixelPoint(SizePosition.X, SizePosition.Y + offsetY);
var rightBottomPoint = new PixelPoint(SizePosition.X + (int)Width, SizePosition.Y + (int)Height);
if (primaryScreenBounds.Contains(leftTopPoint) &&
primaryScreenBounds.Contains(rightBottomPoint))
{
Position = leftTopPoint;
WindowStartupLocation = WindowStartupLocation.Manual;
}
}
_isInitialize = true;
}
}
}
Expand Down
35 changes: 35 additions & 0 deletions src/BD.WTTS.Client.Avalonia/UI/Views/Controls/SnackbarManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,4 +193,39 @@ public void UpdatePseudoClasses(NotificationPosition position)
PseudoClasses.Set(":bottomleft", position == NotificationPosition.BottomLeft);
PseudoClasses.Set(":bottomright", position == NotificationPosition.BottomRight);
}

/// <inheritdoc/>
public void Close(INotification notification)
{
Dispatcher.UIThread.VerifyAccess();

//if (_items.Remove(notification, out var notificationCard))
//{
// notificationCard.Close();
//}
}

/// <inheritdoc/>
public void Close(object content)
{
Dispatcher.UIThread.VerifyAccess();

//if (_items.Remove(content, out var notificationCard))
//{
// notificationCard.Close();
//}
}

/// <inheritdoc/>
public void CloseAll()
{
Dispatcher.UIThread.VerifyAccess();

//foreach (var kvp in _items)
//{
// kvp.Close();
//}

_items?.Clear();
}
}
Loading

0 comments on commit ca7fa0b

Please sign in to comment.