Nuget updates, fixes
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="11.0.0-preview8" />
|
||||
<PackageReference Include="Avalonia" Version="11.0.0-rc1.1" />
|
||||
<PackageReference Include="PropertyChanged.SourceGenerator" Version="1.0.8">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
<TrimmableAssembly Include="Avalonia.Themes.Default" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="11.0.0-preview8" />
|
||||
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview8" />
|
||||
<PackageReference Include="Avalonia" Version="11.0.0-rc1.1" />
|
||||
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-rc1.1" />
|
||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview8" />
|
||||
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-preview8" />
|
||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-rc1.1" />
|
||||
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-rc1.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0" />
|
||||
|
||||
@@ -59,7 +59,8 @@ public static class Startup
|
||||
serviceCollection.TryAddSingleton<IIconProvider, MaterialIconProvider>();
|
||||
serviceCollection.TryAddSingleton<IModalService, ModalService>();
|
||||
serviceCollection.TryAddSingleton<IDialogService, DialogService>();
|
||||
serviceCollection.TryAddSingleton<ISystemClipboardService, SystemClipboardService>();
|
||||
serviceCollection.TryAddSingleton<SystemClipboardService>();
|
||||
serviceCollection.TryAddSingleton<ISystemClipboardService>(sp => sp.GetRequiredService<SystemClipboardService>());
|
||||
serviceCollection.TryAddSingleton<ToastMessageSink>();
|
||||
serviceCollection.TryAddSingleton<IUserCommunicationService>(s => s.GetRequiredService<IDialogService>());
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="11.0.0-preview8" />
|
||||
<PackageReference Include="Avalonia" Version="11.0.0-rc1.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0" />
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="11.0.0-preview8" />
|
||||
<PackageReference Include="Avalonia.Controls.ItemsRepeater" Version="11.0.0-preview8" />
|
||||
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview8" />
|
||||
<PackageReference Include="Avalonia" Version="11.0.0-rc1.1" />
|
||||
<PackageReference Include="Avalonia.Controls.ItemsRepeater" Version="11.0.0-rc1.1" />
|
||||
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-rc1.1" />
|
||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview8" />
|
||||
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-preview8" />
|
||||
<PackageReference Include="Avalonia.Svg.Skia" Version="11.0.0-preview8.2" />
|
||||
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0-preview8" />
|
||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-rc1.1" />
|
||||
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-rc1.1" />
|
||||
<PackageReference Include="Avalonia.Svg.Skia" Version="11.0.0-rc1.1" />
|
||||
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.0-rc1.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
|
||||
<PackageReference Include="MvvmGen" Version="1.2.1" />
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Input.Platform;
|
||||
using Avalonia.Controls;
|
||||
using FileTime.App.Core.Services;
|
||||
|
||||
namespace FileTime.GuiApp.Services;
|
||||
|
||||
public class SystemClipboardService : ISystemClipboardService
|
||||
{
|
||||
internal TopLevel? TopLevel { get; set; }
|
||||
public async Task CopyToClipboardAsync(string text)
|
||||
{
|
||||
var clipboard = AvaloniaLocator.Current.GetService<IClipboard>();
|
||||
var clipboard = TopLevel?.Clipboard;
|
||||
|
||||
if (clipboard is null) { return; }
|
||||
|
||||
@@ -16,7 +16,7 @@ public class SystemClipboardService : ISystemClipboardService
|
||||
}
|
||||
public async Task GetFiles()
|
||||
{
|
||||
var clipboard = AvaloniaLocator.Current.GetService<IClipboard>();
|
||||
var clipboard = TopLevel?.Clipboard;
|
||||
|
||||
if (clipboard is null) { return; }
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ public partial class MainWindow : Window
|
||||
_logger?.LogInformation($"Starting {nameof(MainWindow)} initialization...");
|
||||
_modalService = DI.ServiceProvider.GetRequiredService<IModalService>();
|
||||
_modalService.OpenModals.ToCollection().Subscribe(m => _openModals = m);
|
||||
DI.ServiceProvider.GetRequiredService<Services.SystemClipboardService>().TopLevel = GetTopLevel(this);
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user