public void UpdatePreview(BitmapSource image, DetectionRegion region)
 {
     previewAreaImg.Source = image;
     if (region != null)
     {
         Title = "" + region;
         DuplicatorLbl.Content = region.Category.Description;
     }
 }
Ejemplo n.º 2
0
        private DetectionRegion AddRegion(int x, int y, double width, double height, Category category)
        {
            var maxPrevNumber = _regions.Count > 0 ? _regions.Max(itm => itm.MyOrderNum) : 0;
            var region        = new DetectionRegion(myCanvas, x, y, width, height, maxPrevNumber, category, Frame_SizeChanged);

            _regions.Add(region);
            UpdateRegionsList();
            SelectControl(region.Frame);
            return(region);
        }