public override async Task ExecuteAsync(TaskCancellationToken cancellationToken = null) { if (!control.TryCommit(out var exception)) { Console.WriteLine($"{exception.Message}\n{exception.StackTrace}"); } }
public override async Task ExecuteAsync(TaskCancellationToken cancellationToken = null) { if (!control.TryInsert(Values, out var exception)) { Console.WriteLine($"{exception.Message}\n{exception.StackTrace}"); } else { control.insertBox.Reset(); } }
public override async Task ExecuteAsync(TaskCancellationToken cancellationToken = null) { control.table.CellSelected += Table_CellSelected; while (selectedCells.Count < rowCount) { if (cancellationToken?.IsCancellationRequested ?? false) { throw new TaskCanceledException(); } await Task.Delay(100); } control.table.CellSelected -= Table_CellSelected; }
public override async Task ExecuteAsync(TaskCancellationToken cancellationToken = null) { var selection = new SelectCommand(rowCount, control); var task = selection.ExecuteAsync(cancellationToken); await task; if (task.IsCanceled) { throw new TaskCanceledException(); } if (!control.TryDelete(selection.SelectedRows, out var exception)) { Console.WriteLine($"{exception.Message}\n{exception.StackTrace}"); } }
public override async Task ExecuteAsync(TaskCancellationToken cancellationToken = null) { control.Refresh(); }
public abstract Task ExecuteAsync(TaskCancellationToken cancellationToken);