Пример #1
0
        private void SelectThumbImage(ThumbImage selected)
        {
            SetSelectedThumb(selected.Index);
            var ea = new ThumbClickEventArgs(selected.Index, selected.Name, selected.Description);

            OnThumbClick(ea);
        }
Пример #2
0
        private void Add(ThumbImage thumb)
        {
            var tv = new ThumbView(thumb)
            {
                Left   = _leftPos,
                Top    = _topPos,
                Row    = _row,
                Column = _column
            };

            _column++;

            _leftPos += tv.Width + SPACE_WIDTH;
            if (_leftPos + tv.Width + SPACE_WIDTH > Screen.PrimaryScreen.WorkingArea.Size.Width /*_clientWidth*/ + 360)
            {
                //wrap to next line
                _leftPos = SPACE_WIDTH;
                _topPos += tv.Height + SPACE_HEIGHT;
                _column  = 0;
                _row++;
            }

            tv.ThumbClick += Thumb_Click;
            tv.ThumbEnter += Thumb_DoubleClick;
            tv.Visible     = true;

            Controls.Add(tv);
        }
Пример #3
0
 public ThumbView(ThumbImage thumb)
     : this()
     => ThumbImage = thumb;