diff --git a/GrasshopperAsyncComponentDemo/SampleImplementations/Sample_UslessCyclesComponent.cs b/GrasshopperAsyncComponentDemo/SampleImplementations/Sample_UslessCyclesComponent.cs index b204825..b0027f8 100755 --- a/GrasshopperAsyncComponentDemo/SampleImplementations/Sample_UslessCyclesComponent.cs +++ b/GrasshopperAsyncComponentDemo/SampleImplementations/Sample_UslessCyclesComponent.cs @@ -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