public LocatorResult Next() { if (_index < _points.Length) { var res = LocatorResult.CreateClicked(_points[_index].X, _points[_index].Y); _index++; return(res); } return(LocatorResult.CreateNotClicked()); }
public async Task <LocatorResult> Locator(CancellationToken ct) { var historyProvider = _coreShell.ExportProvider.GetExportedValue <IPlotHistoryProvider>(); var history = historyProvider.GetPlotHistory(_session); if (history.PlotContentProvider.Locator != null) { return(await history.PlotContentProvider.Locator.StartLocatorModeAsync(ct)); } return(LocatorResult.CreateNotClicked()); }
public Task <LocatorResult> Locator(Guid deviceId, CancellationToken ct) { LocatorCalls.Add(ct); return(LocatorHandler != null?LocatorHandler(deviceId, ct) : Task.FromResult(LocatorResult.CreateNotClicked())); }
Task <LocatorResult> IRCallbacks.Locator(Guid deviceId, CancellationToken ct) { var callback = _callback; return(callback != null?callback.Locator(deviceId, ct) : Task.FromResult(LocatorResult.CreateNotClicked())); }
public void EndLocatorMode() { _shell.AssertIsOnMainThread(); EndLocatorMode(LocatorResult.CreateNotClicked()); }
public Task <LocatorResult> Locator(Guid deviceId, CancellationToken ct) => Task.FromResult(LocatorResult.CreateNotClicked());
public void EndLocatorMode() { EndLocatorMode(LocatorResult.CreateNotClicked()); }
public Task InvokeAsync() { InteractiveWorkflow.Plots.EndLocatorMode(VisualComponent.Device, LocatorResult.CreateNotClicked()); return(Task.CompletedTask); }
public Task <CommandResult> InvokeAsync() { InteractiveWorkflow.Plots.EndLocatorMode(VisualComponent.Device, LocatorResult.CreateNotClicked()); return(Task.FromResult(CommandResult.Executed)); }