/// <summary> /// Executes worker with popup progress bar form. /// Rethrows all exceptions. Throws Hybmesh.EUserInterrupt on cancellation request. /// </summary> static public void Exec(ExecutorFunc worker) { using (var dialog = new CBForm(worker)){ dialog.ShowDialog(); if (dialog.ExecError != null) { throw dialog.ExecError; } } }