Exemplo n.º 1
0
        private void ShowDetailForm(AggregateLogItem item)
        {
            const int FORM_Y_OFFSET = 30;

            var form = new ItemDetailForm
            {
                Item   = item,
                Height = this.Height - FORM_Y_OFFSET,
                Top    = this.Top + FORM_Y_OFFSET
            };

            form.Width = Math.Max(form.Width, this.Width / 2);
            form.Left  = this.Left + ((this.Width - form.Width) / 2);

            form.ShowDialog(this);
        }
Exemplo n.º 2
0
        private void ShowDetailForm(AggregateLogItem item)
        {
            const int FORM_Y_OFFSET = 5;

            if (_detailForm == null)
            {
                _detailForm = new ItemDetailForm();
            }

            _detailForm.Bounds = new Rectangle(
                this.Left + ((this.Width - _detailForm.Width) / 2),
                this.Top + FORM_Y_OFFSET,
                Math.Max(_detailForm.Width, this.Width / 2),
                this.Height - FORM_Y_OFFSET * 2);

            _detailForm.Item              = item;
            _detailForm.FormBorderEffect  = FormBorderEffect.Glow;
            _detailForm.InactiveGlowColor = ColorService.GetColor(item.AccumulatedState);
            _detailForm.ActiveGlowColor   = _detailForm.InactiveGlowColor;

            _detailForm.ShowDialog(this);
        }