Files
NebulaLauncher/Nebula.Launcher/ViewModels/Popup/LoadingContextViewModel.cs

50 lines
1.1 KiB
C#
Raw Normal View History

2025-01-08 18:00:06 +03:00
using CommunityToolkit.Mvvm.ComponentModel;
using Nebula.Launcher.Views.Popup;
using Nebula.Shared.Models;
2025-01-14 22:10:16 +03:00
using Nebula.Shared.Services;
2025-01-08 18:00:06 +03:00
2025-01-14 22:10:16 +03:00
namespace Nebula.Launcher.ViewModels.Popup;
2025-01-08 18:00:06 +03:00
[ViewModelRegister(typeof(LoadingContextView), false)]
2025-01-14 22:10:16 +03:00
[ConstructGenerator]
2025-01-08 18:00:06 +03:00
public sealed partial class LoadingContextViewModel : PopupViewModelBase, ILoadingHandler
{
2025-01-14 22:10:16 +03:00
[GenerateProperty] public override PopupMessageService PopupMessageService { get; }
2025-01-08 18:00:06 +03:00
2025-01-14 22:10:16 +03:00
[ObservableProperty] private int _currJobs;
[ObservableProperty] private int _resolvedJobs;
2025-01-08 18:00:06 +03:00
public string LoadingName { get; set; } = "Loading...";
2025-01-12 15:15:01 +03:00
public override bool IsClosable => false;
2025-01-08 18:00:06 +03:00
public override string Title => LoadingName;
2025-01-14 22:10:16 +03:00
2025-01-08 18:00:06 +03:00
public void SetJobsCount(int count)
{
CurrJobs = count;
}
public int GetJobsCount()
{
return CurrJobs;
}
public void SetResolvedJobsCount(int count)
{
ResolvedJobs = count;
}
public int GetResolvedJobsCount()
{
return ResolvedJobs;
}
2025-01-14 22:10:16 +03:00
protected override void Initialise()
{
}
protected override void InitialiseInDesignMode()
{
}
2025-01-08 18:00:06 +03:00
}