feat(cancellation): implements it cyclotron component

This commit is contained in:
Dimitrie Stefanescu
2021-04-03 17:59:58 +01:00
parent 59f87b2a7d
commit bdc105fa95
@@ -6,6 +6,7 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
using GrasshopperAsyncComponent;
using System.Windows.Forms;
namespace GrasshopperAsyncComponentDemo.SampleImplementations
{
@@ -31,6 +32,15 @@ namespace GrasshopperAsyncComponentDemo.SampleImplementations
{
pManager.AddTextParameter("Output", "O", "Nothing really interesting.", GH_ParamAccess.item);
}
public override void AppendAdditionalMenuItems(ToolStripDropDown menu)
{
base.AppendAdditionalMenuItems(menu);
Menu_AppendItem(menu, "Cancel", (s, e) =>
{
RequestCancellation();
});
}
}
public class UselessCyclesWorker : WorkerInstance