- Remove unnecessary code

- Execute `OnValueChanged` event in task
This commit is contained in:
Stone-Red-Code
2021-09-13 19:49:05 +02:00
parent d70e6229cc
commit e00c873bd5
5 changed files with 45 additions and 41 deletions
+1 -4
View File
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DesktopMagicPluginAPI.Inputs
@@ -48,7 +45,7 @@ namespace DesktopMagicPluginAPI.Inputs
/// </summary>
public void Click()
{
OnClick?.Invoke();
_ = Task.Run(() => OnClick?.Invoke());
}
}
}
+2 -1
View File
@@ -1,4 +1,5 @@
using System;
using System.Threading.Tasks;
namespace DesktopMagicPluginAPI.Inputs
{
@@ -17,7 +18,7 @@ namespace DesktopMagicPluginAPI.Inputs
/// </summary>
protected void ValueChanged()
{
OnValueChanged?.Invoke();
_ = Task.Run(() => OnValueChanged?.Invoke());
}
}
}