- tweak: file managment
This commit is contained in:
44
Nebula.Launcher/ViewModels/LoadingContextViewModel.cs
Normal file
44
Nebula.Launcher/ViewModels/LoadingContextViewModel.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using Nebula.Launcher.ViewHelper;
|
||||
using Nebula.Launcher.Views.Popup;
|
||||
using Nebula.Shared.Models;
|
||||
|
||||
namespace Nebula.Launcher.ViewModels;
|
||||
|
||||
[ViewModelRegister(typeof(LoadingContextView), false)]
|
||||
public sealed partial class LoadingContextViewModel : PopupViewModelBase, ILoadingHandler
|
||||
{
|
||||
public LoadingContextViewModel() :base(){}
|
||||
public LoadingContextViewModel(IServiceProvider provider) : base(provider){}
|
||||
|
||||
public string LoadingName { get; set; } = "Loading...";
|
||||
|
||||
public override string Title => LoadingName;
|
||||
|
||||
[ObservableProperty]
|
||||
private int _currJobs;
|
||||
[ObservableProperty]
|
||||
private int _resolvedJobs;
|
||||
|
||||
public void SetJobsCount(int count)
|
||||
{
|
||||
CurrJobs = count;
|
||||
}
|
||||
|
||||
public int GetJobsCount()
|
||||
{
|
||||
return CurrJobs;
|
||||
}
|
||||
|
||||
public void SetResolvedJobsCount(int count)
|
||||
{
|
||||
ResolvedJobs = count;
|
||||
|
||||
}
|
||||
|
||||
public int GetResolvedJobsCount()
|
||||
{
|
||||
return ResolvedJobs;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user