Example #1
0
 public LocatorResult Next()
 {
     if (_index < _points.Length)
     {
         var res = LocatorResult.CreateClicked(_points[_index].X, _points[_index].Y);
         _index++;
         return(res);
     }
     return(LocatorResult.CreateNotClicked());
 }
Example #2
0
        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());
        }
Example #3
0
 public Task <LocatorResult> Locator(Guid deviceId, CancellationToken ct)
 {
     LocatorCalls.Add(ct);
     return(LocatorHandler != null?LocatorHandler(deviceId, ct) : Task.FromResult(LocatorResult.CreateNotClicked()));
 }
Example #4
0
        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());
        }
Example #6
0
 public Task <LocatorResult> Locator(Guid deviceId, CancellationToken ct) => Task.FromResult(LocatorResult.CreateNotClicked());
Example #7
0
 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));
        }