using System.Threading.Tasks; using SnippingTool; namespace RhSolutions.Tools; internal class OcrTool : Tool { public Application Application { get; set; } public OcrTool(ReaderFactory readerFactory, WriterFactory writerFactory, Application application) : base(readerFactory, writerFactory) { Application = application; } public override void Execute() { Application.Visible = false; Task.Run(async delegate { await Task.Delay(100); }).Wait(); string shot = Snipper.SnipBase64(); Application.Visible = true; } }