28 lines
696 B
C#
28 lines
696 B
C#
using MaterialSkin.Controls;
|
|
using VisionBuilder.UI.Common.Processing;
|
|
|
|
namespace VisionBuilder.UI.Windows.Settings;
|
|
|
|
public class WindowsLoadingService: ILoadingService
|
|
{
|
|
public void StartLoading(string title)
|
|
{
|
|
lock (this)
|
|
{
|
|
MaterialLoader.Instance.StartLoading(title);
|
|
Application.DoEvents(); // Ensure the UI updates immediately
|
|
Thread.Sleep(10);
|
|
}
|
|
|
|
}
|
|
|
|
public void StopLoading(string title)
|
|
{
|
|
lock (this)
|
|
{
|
|
MaterialLoader.Instance.FinishLoading(title);
|
|
Application.DoEvents(); // Ensure the UI updates immediately
|
|
Thread.Sleep(10);
|
|
}
|
|
}
|
|
} |