internal static void InstallEvents()
 {
     ScreenshotRequested_t.Install(x => OnScreenshotRequested?.Invoke());
     ScreenshotReady_t.Install(x =>
     {
         if (x.Result != Result.OK)
         {
             OnScreenshotFailed?.Invoke(x.Result);
         }
         else
         {
             OnScreenshotReady?.Invoke(new Screenshot {
                 Value = x.Local
             });
         }
     });
 }
Example #2
0
 public static void InstallEvents()
 {
     Dispatch.Install <ScreenshotRequested_t>(x => OnScreenshotRequested?.Invoke());
     Dispatch.Install <ScreenshotReady_t>(x =>
     {
         if (x.Result != Result.OK)
         {
             OnScreenshotFailed?.Invoke(x.Result);
         }
         else
         {
             OnScreenshotReady?.Invoke(new Screenshot {
                 Value = x.Local
             });
         }
     });
 }