Skip to content

Commit

Permalink
feat(cancellation): implements it cyclotron component
Browse files Browse the repository at this point in the history
  • Loading branch information
didimitrie committed Apr 3, 2021
1 parent 59f87b2 commit bdc105f
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Threading;
using System.Threading.Tasks;
using GrasshopperAsyncComponent;
using System.Windows.Forms;

namespace GrasshopperAsyncComponentDemo.SampleImplementations
{
Expand All @@ -31,6 +32,15 @@ protected override void RegisterOutputParams(GH_OutputParamManager pManager)
{
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
Expand Down

0 comments on commit bdc105f

Please sign in to comment.