private void CommanOk_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            var img = NewImageVM.GetImage();

            NewImageEvent.Invoke(img, 5, 5, false);

            Close();
        }
Пример #2
0
 void Update()
 {
     if (newImage != null)
     {
         ImageDataArgs eventData = new ImageDataArgs(newImage);
         newImage = null;
         NewImageEvent?.Invoke(this, eventData);
     }
 }
 /// <summary>
 /// Raise a new media item event
 /// </summary>
 /// <param name="mediaItem"></param>
 /// <returns></returns>
 private async Task RaiseNewMediaItem(MediaItem mediaItem)
 {
     // TODO: Figure out media type image/audio/video/pdf/other?
     INewMediaItemEvent newMediaEvent = new NewImageEvent
     {
         MediaItemId     = mediaItem.Id,
         UniqueMediaName = mediaItem.UniqueMediaName,
         Date            = DateTime.UtcNow,
         PublishedBy     = new UserSummaryDto {
             AccountId = mediaItem.AccountId, UserId = mediaItem.UserId
         },
         Item = Mapper.Map <MediaItemDto>(mediaItem),
     };
     await _bus.PublishAsync(newMediaEvent);
 }
Пример #4
0
 /// <summary>
 /// 触发图像采集完成事件
 /// </summary>
 /// <param name="imageInfo">图像信息</param>
 protected void OnNewImageEvent(ImageInfo imageInfo)
 {
     NewImageEvent?.Invoke(this, new NewImageEventArgs(imageInfo));
 }