Esempio n. 1
0
        private void Drawable_Paint(object sender, PaintEventArgs e)
        {
            var g     = e.Graphics;
            var count = _items.Count;
            var y     = 0;

            g.Clear(DrawInfo.BackColor);

            for (int i = 0; i < _items.Count; i++)
            {
                var item = _items[i];

                // Skip Skipped items
                if (!PipelineSettings.Default.FilterShowSkipped && item.Icon == _iconSkip)
                {
                    continue;
                }

                // Skip Successful items
                if (!PipelineSettings.Default.FilterShowSuccessful && item.Icon == _iconSucceed)
                {
                    continue;
                }

                // Skip Cleaned items
                if (!PipelineSettings.Default.FilterShowCleaned && item.Icon == _iconInformation)
                {
                    continue;
                }

                // Check if the item is in the visible rectangle
                if (y + item.Height >= scrollable1.ScrollPosition.Y && y < scrollable1.ScrollPosition.Y + scrollable1.Height)
                {
                    // Check if the item is selected
                    if (MouseLocation.Y > y && MouseLocation.Y < y + item.Height)
                    {
                        _selectedItem = item;
                    }

                    // Draw item
                    item.Draw(g, y, drawable.Width);
                }

                // Add border
                y += item.Height + 3;
            }

#if MONOMAC
            drawable.Height = Math.Max(y - 3, scrollable1.Height - 3);
#else
            drawable.Height = Math.Max(y - 3, 1);
            SetWidth();
#endif

#if WINDOWS || MONOMAC
            if (Count == -1 && PipelineSettings.Default.AutoScrollBuildOutput && y - 3 >= scrollable1.Height - 3)
            {
                scrollable1.ScrollPosition = new Point(0, y - scrollable1.Height);
            }
#endif
        }
Esempio n. 2
0
 private void Drawable_MouseLeave(object sender, MouseEventArgs e)
 {
     _selectedItem = null;
     MouseLocation = new Point(-1, -1);
     drawable.Invalidate();
 }