Exemplo n.º 1
0
        private void ExecuteDocRowPaint(DDocRow docRow)
        {
            if (!_footerDocument.OwnerPfooter.IsEdit) return;
            //行号
            if (EditorSetting.IsShowRowIndex)
            {
                _graphics.DrawString(Convert.ToString(docRow.Index), _mFont, _brush2, docRow.X - 40,
                                 docRow.Y);
            }

            var member = docRow.GetShortestMember(MemberType.Unknown);
            var offset = member == null ? docRow.Height / 2 : (member.Height + _enterArrow.Height) / 2;

            //回车符
            if (docRow.FirstMember == null)
            {
                _graphics.DrawImage(_enterArrow, docRow.X,
                                    docRow.Y + docRow.Height - offset);
            }
            else if (!docRow.IsContinue)
            {
                if (docRow.LastMember != null)
                {
                    _graphics.DrawImage(_enterArrow, docRow.LastMember.X + docRow.LastMember.Width,
                                        docRow.Y + docRow.Height - offset);
                }
                else
                {
                    _graphics.DrawImage(_enterArrow, docRow.FirstMember.X + docRow.FirstMember.Width,
                                        docRow.Y + docRow.Height - offset);
                }

            }
            else if (docRow.FirstMember.IsBreakTail)
            {
                _graphics.DrawImage(_enterArrow, docRow.FirstMember.X + docRow.FirstMember.Width,
                                        docRow.Y + docRow.Height - offset);
            }
            else if (docRow.LastMember != null && docRow.LastMember.IsBreakTail)
            {
                _graphics.DrawImage(_enterArrow, docRow.LastMember.X + docRow.LastMember.Width,
                                        docRow.Y + docRow.Height - offset);
            }

            //空行选择区域
            if (docRow.IsSelected && docRow.FirstMember == null)
                _graphics.FillRectangle(_brush1, docRow.X, docRow.Y, _enterArrow.Width, docRow.Height);
        }
Exemplo n.º 2
0
        private void ExecuteDocRowPaint(DDocRow docRow)
        {
            _enterArrow = _view.GetImageList8().Images[0];
            //网格线
            if (EditorSetting.IsShowGridLine)
            {
                _graphics.DrawLine(new Pen(Color.Gray), docRow.X, docRow.Y + docRow.Height, docRow.X + docRow.Width,
                   docRow.Y + docRow.Height);
            }

            //行号
            if (EditorSetting.IsShowRowIndex)
            {
                _graphics.DrawString(Convert.ToString(docRow.Index), _mFont, _brush2, docRow.X - 40,
                                 docRow.Y);
            }

            var member = docRow.GetShortestMember(MemberType.Unknown);
            var offset = member == null ? docRow.Height / 2 : (member.Height + _enterArrow.Height) / 2;

            //回车符
            if (docRow.FirstMember == null)
            {
                _graphics.DrawImage(_enterArrow, docRow.X,
                                    docRow.Y + docRow.Height - offset);
            }
            else if (docRow.LastMember == null)
            {
                _graphics.DrawImage(_enterArrow, docRow.FirstMember.X + docRow.FirstMember.Width,
                                    docRow.Y + docRow.Height - offset);
            }
            else if (!docRow.IsContinue)
            {
                _graphics.DrawImage(_enterArrow, docRow.LastMember.X + docRow.LastMember.Width,
                                    docRow.Y + docRow.Height - offset);
            }
            else if (docRow.LastMember.IsBreakTail)
            {
                _graphics.DrawImage(_enterArrow, docRow.LastMember.X + docRow.LastMember.Width,
                                    docRow.Y + docRow.Height - offset);
            }

            //空行选择区域
            if (docRow.IsSelected && docRow.FirstMember == null)
                _graphics.FillRectangle(_brush1, docRow.X, docRow.Y, _enterArrow.Width, docRow.Height);
        }
Exemplo n.º 3
0
        private void ExecuteDocRowPaint(DDocRow docRow)
        {
            var member = docRow.GetShortestMember(MemberType.Unknown);
            var offset = member == null ? docRow.Height / 2 : (member.Height + _enterArrow.Height) / 2;

            //回车符
            if (docRow.FirstMember == null)
            {
                _graphics.DrawImage(_enterArrow, docRow.X,
                                    docRow.Y + docRow.Height - offset);
            }
            else if (!docRow.IsContinue)
            {
                if (docRow.LastMember != null)
                {
                    _graphics.DrawImage(_enterArrow, docRow.LastMember.X + docRow.LastMember.Width,
                                        docRow.Y + docRow.Height - offset);
                }
                else
                {
                    _graphics.DrawImage(_enterArrow, docRow.FirstMember.X + docRow.FirstMember.Width,
                                        docRow.Y + docRow.Height - offset);
                }

            }
            else if (docRow.FirstMember.IsBreakTail)
            {
                _graphics.DrawImage(_enterArrow, docRow.FirstMember.X + docRow.FirstMember.Width,
                                        docRow.Y + docRow.Height - offset);
            }
            else if (docRow.LastMember != null && docRow.LastMember.IsBreakTail)
            {
                _graphics.DrawImage(_enterArrow, docRow.LastMember.X + docRow.LastMember.Width,
                                        docRow.Y + docRow.Height - offset);
            }

            //空行选择区域
            if (docRow.IsSelected && docRow.FirstMember == null)
                _graphics.FillRectangle(_brush1, docRow.X, docRow.Y, _enterArrow.Width, docRow.Height);
        }