https://ufcpp.net/study/csharp/MiscEventSubscribe.html#parameter-issue
// ボタンのクリックを1回受け取るまで待ちたい public static Task FirstClickAsync(this Button x) { var tcs = new TaskCompletionSource<bool>(); EventHandler handler = null; handler = (sender, arg) => { x.Click -= handler; tcs.TrySetResult(false); }; x.Click += handler; return tcs.Task; }