Exemplo n.º 1
0
        // IImage Synchronously
        public static void WaitForLoaded(this IImage image)
        {
            var reset = new ManualResetEvent(image.IsLoaded);
            ImageEventHandler handler = (i, e) => reset.Set();

            image.Loaded += handler;
            reset.WaitOne();
            image.Loaded -= handler;
        }
Exemplo n.º 2
0
 private async void OnPhotoInserted(object?sender, ImageEventHandler e)
 {
     try
     {
         //throw new Exception("Testing async void");
         await PhotoInserted.InvokeAsync(e.Image);
     }
     catch (Exception ex)
     {
         await OnExecutingError.InvokeAsync(ex);
     }
 }
Exemplo n.º 3
0
 protected override void OnCallQueryImage(object sender, ImageEventHandler.ImageEventHandlerEventArgs e)
 {
     ivm.ByteStream =  e.ImageByteStream;
     debugmsg.AppendLine("OnCallQueryImage Got Byte Stream of Size " + e.ImageByteStream.Length.ToString() + " Bytes");
     ivm.DlgViewModel.MessageModel.DebugLog = debugmsg.ToString();
 }
Exemplo n.º 4
0
 protected virtual void OnImageInserted(ImageEventHandler e)
 {
     ImageInserted?.Invoke(this, e);
 }
Exemplo n.º 5
0
 public static extern void SetImageEventHandler(ImageEventHandler handler);
Exemplo n.º 6
0
 public static extern void SetScriptVideoImgHandler(ImageEventHandler handler);
Exemplo n.º 7
0
 //Listener will pass this function to the event handler allow it to call this function ever time the event is triggered.
 protected virtual void OnCallQueryImage(object sender, ImageEventHandler.ImageEventHandlerEventArgs e)
 {
 }