mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-04-13 11:26:34 +08:00
新增了UI节点
This commit is contained in:
21
Serein.CloudWorkbench/Services/CounterService.cs
Normal file
21
Serein.CloudWorkbench/Services/CounterService.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
namespace Serein.CloudWorkbench.Services
|
||||
{
|
||||
public class CounterService
|
||||
{
|
||||
public int Count { get; private set; } = 0;
|
||||
|
||||
public event Action? OnCountChanged;
|
||||
|
||||
public void Increment()
|
||||
{
|
||||
Count++;
|
||||
OnCountChanged?.Invoke();
|
||||
}
|
||||
|
||||
public void Decrement()
|
||||
{
|
||||
Count--;
|
||||
OnCountChanged?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user