From b93aa1a76a18afc59cc016d8b0f3471c252e12b7 Mon Sep 17 00:00:00 2001 From: Dimitrie Stefanescu Date: Sat, 3 Apr 2021 18:03:30 +0100 Subject: [PATCH] feat(cancellation): adds readme example --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 28a42c8..4ddcb87 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,26 @@ Q: Does this component use all my cores? A: OH YES. It goes WROOOM. ![image](https://user-images.githubusercontent.com/7696515/95597125-29310900-0a46-11eb-99ce-663b34506a7a.png) + +Q: Can I enable cancellation of a longer running task? + +A: Yes, now you can! In your component, just add a right click menu action like so: + +```cs + + public override void AppendAdditionalMenuItems(ToolStripDropDown menu) + { + base.AppendAdditionalMenuItems(menu); + Menu_AppendItem(menu, "Cancel", (s, e) => + { + RequestCancellation(); + }); + } + +``` + + + ### Debugging Quite easy: