mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
General cleanup and refactor.
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Gui.ViewModels.Windows;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@@ -45,8 +47,6 @@ using Avalonia.Threading;
|
||||
using ReactiveUI;
|
||||
using Schemas;
|
||||
|
||||
namespace Aaru.Gui.ViewModels.Windows;
|
||||
|
||||
public sealed class ImageSidecarViewModel : ViewModelBase
|
||||
{
|
||||
readonly Encoding _encoding;
|
||||
@@ -266,15 +266,14 @@ public sealed class ImageSidecarViewModel : ViewModelBase
|
||||
Progress2Visible = false;
|
||||
});
|
||||
|
||||
async void UpdateProgress2(string text, long current, long maximum) =>
|
||||
await Dispatcher.UIThread.InvokeAsync(() =>
|
||||
{
|
||||
Progress2Text = text;
|
||||
Progress2Indeterminate = false;
|
||||
async void UpdateProgress2(string text, long current, long maximum) => await Dispatcher.UIThread.InvokeAsync(() =>
|
||||
{
|
||||
Progress2Text = text;
|
||||
Progress2Indeterminate = false;
|
||||
|
||||
Progress2MaxValue = maximum;
|
||||
Progress2Value = current;
|
||||
});
|
||||
Progress2MaxValue = maximum;
|
||||
Progress2Value = current;
|
||||
});
|
||||
|
||||
async void InitProgress2() => await Dispatcher.UIThread.InvokeAsync(() =>
|
||||
{
|
||||
@@ -286,15 +285,14 @@ public sealed class ImageSidecarViewModel : ViewModelBase
|
||||
Progress1Visible = false;
|
||||
});
|
||||
|
||||
async void UpdateProgress(string text, long current, long maximum) =>
|
||||
await Dispatcher.UIThread.InvokeAsync(() =>
|
||||
{
|
||||
ProgressText = text;
|
||||
ProgressIndeterminate = false;
|
||||
async void UpdateProgress(string text, long current, long maximum) => await Dispatcher.UIThread.InvokeAsync(() =>
|
||||
{
|
||||
ProgressText = text;
|
||||
ProgressIndeterminate = false;
|
||||
|
||||
ProgressMaxValue = maximum;
|
||||
ProgressValue = current;
|
||||
});
|
||||
ProgressMaxValue = maximum;
|
||||
ProgressValue = current;
|
||||
});
|
||||
|
||||
async void InitProgress() => await Dispatcher.UIThread.InvokeAsync(() =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user