ringbuffer and statistics
This commit is contained in:
28
VisionBuilder.UI.Windows/Services/WindowsLoadingService.cs
Normal file
28
VisionBuilder.UI.Windows/Services/WindowsLoadingService.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using MaterialSkin.Controls;
|
||||
using VisionBuilder.UI.Common.RecipeProcessing;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user