protected override Task OnInitializedAsync() { if (JobId < 0 || JobId >= ExecutorService.Jobs.Count) { if (ExecutorService.LastJob == null) { return(Task.CompletedTask); } JobId = ExecutorService.LastJob.Id; } var job = ExecutorService.Jobs[JobId]; if (job.Commands != null) { ScriptCommandGrid.SetData(new List <IScriptCommand>(job.Commands)); } ExecutorService.CommandUpdated += OnCommandUpdated; return(Task.CompletedTask); }
private void OnCommandUpdated(IScriptCommand command) { InvokeAsync(() => ScriptCommandGrid.Update(command)); }