Exemple #1
0
        public MultiInstanceDetailWindow(
            IMultiImageDataSource source,
            CurrentItem item,
            Image itemImage,
            List <String> classifications)
        {
            InitializeComponent();

            this.Title           = item.CurrentSource.Name;
            this.Source          = source;
            this.Item            = item;
            this.Classifications = classifications;

            // Create a copy of the image but you have to
            // set width and height or it won't zoom
            this.ItemImage        = new Image();
            this.ItemImage.Source = itemImage.Source;
            this.ItemImage.Width  = itemImage.Width;
            this.ItemImage.Height = itemImage.Height;

            this.ScaleImage();
            this.ImagePanel.Children.Add(this.ItemImage);

            this.AddPanelItems();

            this.ButtonDownZoom.Click += (o, e) => ZoomOut();
            this.ButtonUpZoom.Click   += (o, e) => ZoomIn();

            this.CloseWindow.Click += (o, e) => { this.Close(); };
        }
        public MultiImageInstance(
            IMultiImageDataSource source,
            CurrentItem item,
            double parentHeight,
            double parentWidth,
            List <String> classifications)
        {
            InitializeComponent();

            this.Source       = source;
            this.Item         = item;
            this.ParentHeight = (parentHeight > 0) ? parentHeight : 300;
            this.ParentWidth  = (parentWidth > 0) ? parentWidth : 300;;

            this.Classifications = classifications;

            // this.ImageName.Text = this.Item.CurrentSource.Name;
            this.UpdateLabels();

            this.ImageGrid.MouseDown += ImageSelected;
            //this.ImagePanel.MouseDown += ImageSelected;

            this.ThreadCollectImage(null);
        }