public void UpdateImageData(Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training.Models.Image image) { this.Image = image; this.ImageDataChanged?.Invoke(this, EventArgs.Empty); this.AddedImageRegions.Clear(); this.DeletedImageRegions.Clear(); }
private async void OnDeleteImageClicked(object sender, RoutedEventArgs e) { try { foreach (var item in this.selectedTagImagesGridView.SelectedItems.ToArray()) { Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training.Models.Image tagImage = (Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training.Models.Image)item; await trainingApi.DeleteImagesAsync(this.CurrentProject.Id, new string[] { tagImage.Id.ToString() }); this.SelectedTagImages.Remove(tagImage); this.needsTraining = true; } } catch (Exception ex) { await Util.GenericApiCallExceptionHandler(ex, "Failure deleting images"); } }
public ProjectImageViewModel(Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training.Models.Image selectedImage) { Title = "Computer Vision"; SelectedImage = selectedImage; }