Upgraded to preview8

This commit is contained in:
Robert committed 2023-05-11 23:10:49 +02:00
1 parent 3c6d770ec2
commit bf6674e44f
24 files changed
+117 -113

No files matched your search

@@ -21,12 +21,12 @@
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.999-cibuild0034035-beta" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.999-cibuild0034035-beta" />
<PackageReference Include="Avalonia" Version="11.0.0-preview8" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.0-preview8" />
<!--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.999-cibuild0034035-beta" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.999-cibuild0034035-beta" />
<PackageReference Include="Avalonia.Win32" Version="11.0.999-cibuild0034035-beta" />
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.0-preview8" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.0-preview8" />
<PackageReference Include="Avalonia.Win32" Version="11.0.0-preview8" />
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.3" />
<PackageReference Include="Microsoft.Win32" Version="2.0.1" />
<PackageReference Include="Microsoft.Windows.Compatibility" Version="7.0.0" />
@@ -16,12 +16,6 @@ public class AutoRunProvider : IAutoRunProvider
{
private readonly string _autorunName = $"Artemis 2 autorun {Environment.UserName}";
private readonly string _oldAutorunName = "Artemis 2 autorun";
private readonly IAssetLoader _assetLoader;
public AutoRunProvider(IAssetLoader assetLoader)
{
_assetLoader = assetLoader;
}
private async Task<bool> IsAutoRunTaskCreated(string autorunName)
{
@@ -43,7 +37,7 @@ public class AutoRunProvider : IAutoRunProvider
private async Task CreateAutoRunTask(TimeSpan autoRunDelay, string autorunName)
{
await using Stream taskFile = _assetLoader.Open(new Uri("avares://Artemis.UI.Windows/Assets/autorun.xml"));
await using Stream taskFile = AssetLoader.Open(new Uri("avares://Artemis.UI.Windows/Assets/autorun.xml"));
XDocument document = await XDocument.LoadAsync(taskFile, LoadOptions.None, CancellationToken.None);
XElement task = document.Descendants().First();
@@ -9,11 +9,11 @@ namespace Artemis.UI.Windows.Providers;
public class CursorProvider : ICursorProvider
{
public CursorProvider(IAssetLoader assetLoader)
public CursorProvider()
{
Rotate = new Cursor(new Bitmap(assetLoader.Open(new Uri("avares://Artemis.UI.Windows/Assets/Cursors/aero_rotate.png"))), new PixelPoint(21, 10));
Drag = new Cursor(new Bitmap(assetLoader.Open(new Uri("avares://Artemis.UI.Windows/Assets/Cursors/aero_drag.png"))), new PixelPoint(11, 3));
DragHorizontal = new Cursor(new Bitmap(assetLoader.Open(new Uri("avares://Artemis.UI.Windows/Assets/Cursors/aero_drag_horizontal.png"))), new PixelPoint(16, 5));
Rotate = new Cursor(new Bitmap(AssetLoader.Open(new Uri("avares://Artemis.UI.Windows/Assets/Cursors/aero_rotate.png"))), new PixelPoint(21, 10));
Drag = new Cursor(new Bitmap(AssetLoader.Open(new Uri("avares://Artemis.UI.Windows/Assets/Cursors/aero_drag.png"))), new PixelPoint(11, 3));
DragHorizontal = new Cursor(new Bitmap(AssetLoader.Open(new Uri("avares://Artemis.UI.Windows/Assets/Cursors/aero_drag_horizontal.png"))), new PixelPoint(16, 5));
}
public Cursor Rotate { get; }