Exemplo n.º 1
0
        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);

            // draw here
            foreach (var c in m_states)
            {
                c.Paint(e.Graphics);
            }

            foreach (var c in m_affects)
            {
                c.Paint(e.Graphics);
            }

            // draw foucs
            if (_selectedState != null)
            {
                _selectedState.PaintFocus(e.Graphics);
            }

            if (_selectedAffect != null)
            {
                _selectedAffect.PaintFocus(e.Graphics);
            }

            // draw adding...
            if (this.f_addnewAffect && this._selectedState != null)
            {
                e.Graphics.DrawLine(Pens.OrangeRed, _selectedState.Location, m_mouseLocation);
            }
        }