Nuget updates, bugfixes
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.1" />
|
||||||
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
|
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ using FileTime.Core.Services;
|
|||||||
using FileTime.Core.ContainerSizeScanner;
|
using FileTime.Core.ContainerSizeScanner;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using FileTime.Core.Providers;
|
using FileTime.Core.Providers;
|
||||||
|
using Avalonia.Threading;
|
||||||
|
|
||||||
namespace FileTime.Avalonia.Application
|
namespace FileTime.Avalonia.Application
|
||||||
{
|
{
|
||||||
@@ -122,7 +123,7 @@ namespace FileTime.Avalonia.Application
|
|||||||
catch { }
|
catch { }
|
||||||
}
|
}
|
||||||
|
|
||||||
History = newHistory;
|
await Dispatcher.UIThread.InvokeAsync(() => History = newHistory);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task TimeRunnerContainerRefreshed(object? sender, AbsolutePath container, CancellationToken token = default)
|
private async Task TimeRunnerContainerRefreshed(object? sender, AbsolutePath container, CancellationToken token = default)
|
||||||
|
|||||||
@@ -27,18 +27,18 @@
|
|||||||
<Content Include="Assets\filetime.ico" />
|
<Content Include="Assets\filetime.ico" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia" Version="0.10.12" />
|
<PackageReference Include="Avalonia" Version="0.10.13" />
|
||||||
<PackageReference Include="Avalonia.Desktop" Version="0.10.12" />
|
<PackageReference Include="Avalonia.Desktop" Version="0.10.13" />
|
||||||
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||||
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="0.10.12" />
|
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="0.10.13" />
|
||||||
<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.12" />
|
<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.13" />
|
||||||
<PackageReference Include="Avalonia.Svg.Skia" Version="0.10.12" />
|
<PackageReference Include="Avalonia.Svg.Skia" Version="0.10.12" />
|
||||||
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="0.10.12" />
|
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="0.10.12.2" />
|
||||||
<PackageReference Include="IDisposableAnalyzers" Version="4.0.1">
|
<PackageReference Include="IDisposableAnalyzers" Version="4.0.2">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
|
||||||
|
|||||||
@@ -56,13 +56,15 @@ namespace FileTime.Avalonia
|
|||||||
[STAThread]
|
[STAThread]
|
||||||
public static void Main(string[] args)
|
public static void Main(string[] args)
|
||||||
{
|
{
|
||||||
|
#if DEBUG
|
||||||
|
#else
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
|
#endif
|
||||||
}
|
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
finally { }
|
|
||||||
#else
|
#else
|
||||||
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
var message = $"Ciritcal error cought in {nameof(Program)}";
|
var message = $"Ciritcal error cought in {nameof(Program)}";
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Reactive.Linq;
|
||||||
|
using System.Reactive.Subjects;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using AsyncEvent;
|
using AsyncEvent;
|
||||||
|
using Avalonia.Threading;
|
||||||
using FileTime.Core.Command;
|
using FileTime.Core.Command;
|
||||||
using FileTime.Core.Timeline;
|
using FileTime.Core.Timeline;
|
||||||
using MvvmGen;
|
using MvvmGen;
|
||||||
@@ -16,8 +19,10 @@ namespace FileTime.Avalonia.ViewModels
|
|||||||
[Property]
|
[Property]
|
||||||
private ReadOnlyCommandTimeState _commandTimeState;
|
private ReadOnlyCommandTimeState _commandTimeState;
|
||||||
|
|
||||||
|
private readonly BehaviorSubject<int> _progressSubject = new BehaviorSubject<int>(0);
|
||||||
|
|
||||||
[Property]
|
[Property]
|
||||||
private int _progress;
|
private IObservable<int> _progress;
|
||||||
|
|
||||||
[Property]
|
[Property]
|
||||||
private bool _isSelected;
|
private bool _isSelected;
|
||||||
@@ -31,12 +36,13 @@ namespace FileTime.Avalonia.ViewModels
|
|||||||
{
|
{
|
||||||
_commandTimeState = commandTimeState;
|
_commandTimeState = commandTimeState;
|
||||||
_commandTimeState.Command.ProgressChanged.Add(HandleProgressChange);
|
_commandTimeState.Command.ProgressChanged.Add(HandleProgressChange);
|
||||||
|
|
||||||
|
_progress = _progressSubject.Throttle(TimeSpan.FromSeconds(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
private Task HandleProgressChange(object? sender, AsyncEventArgs e, CancellationToken token = default)
|
private async Task HandleProgressChange(object? sender, AsyncEventArgs e, CancellationToken token = default)
|
||||||
{
|
{
|
||||||
Progress = _commandTimeState.Command.Progress;
|
await Dispatcher.UIThread.InvokeAsync(() => _progressSubject.OnNext(_commandTimeState.Command.Progress));
|
||||||
return Task.CompletedTask;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Destroy()
|
public void Destroy()
|
||||||
|
|||||||
@@ -232,7 +232,7 @@
|
|||||||
<Border BorderThickness="1" Classes="TimelineCommand" Classes.SelectedTimelineCommand="{Binding IsSelected}">
|
<Border BorderThickness="1" Classes="TimelineCommand" Classes.SelectedTimelineCommand="{Binding IsSelected}">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock Text="{Binding Name}"/>
|
<TextBlock Text="{Binding Name}"/>
|
||||||
<ProgressBar Margin="0,5,0,0" Maximum="100" Value="{Binding Progress}"/>
|
<ProgressBar Margin="0,5,0,0" Maximum="100" Value="{Binding Progress^}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\Core\FileTime.Core\FileTime.Core.csproj"/>
|
<ProjectReference Include="..\..\Core\FileTime.Core\FileTime.Core.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0"/>
|
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0"/>
|
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.1" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user