public override Item Clone() { ItemPageBreak @break = new ItemPageBreak(this); @break.Text = this.Text; return(@break); }
internal Page(Resco.Controls.DetailView.DetailView parent, int iFirst, int iPageBreak) { this.m_parent = parent; this.m_iFirst = iFirst; if (iPageBreak >= 0) { this.m_Item = (ItemPageBreak)this.m_parent.Items[iPageBreak]; this.m_count = iPageBreak - iFirst; } else { this.m_count = this.m_parent.Items.Count - iFirst; this.m_Item = null; } }
public override Item Clone() { ItemPageBreak @break = new ItemPageBreak(this); @break.Text = this.Text; return @break; }
private void DrawTabStrip(Graphics gr, int left, int top, int width, int height) { Resco.Controls.DetailView.DetailView parent = base.Parent; PageCollection pages = parent.Pages; int num = (parent.PagesLocation == RescoPagesLocation.Top) ? height : 0; int pageCount = parent.PageCount; bool pagesRightToLeft = this.PagesRightToLeft; int num3 = left; if (parent.PagesLocation == RescoPagesLocation.Top) { top--; } left += pagesRightToLeft ? width : 0; int num4 = 0; for (int i = 0; i < pageCount; i++) { if (pages[i].PagingItem.Visible) { string text = pages[i].Text; ItemPageBreak pagingItem = pages[i].PagingItem; SizeF ef = gr.MeasureString(text, pagingItem.TextFont); pagingItem.m_TextWidth = Convert.ToInt32(Math.Ceiling((double)ef.Width)); pagingItem.m_TextHeight = Convert.ToInt32(Math.Ceiling((double)ef.Height)); num4 += pagingItem.m_TextWidth + 10; parent.m_PagesOverWidth = (parent.m_StartDrawPage != 0) || (num4 >= width); if (i >= parent.m_StartDrawPage) { int x = left - (pagesRightToLeft ? (pagingItem.m_TextWidth + 10) : 0); if (parent.CurrentPageIndex == i) { if ((base.TextBackColor != Color.Transparent) || !base.Parent.UseGradient) { gr.FillRectangle(base.m_TextBackBrush, x, top, pagingItem.m_TextWidth + 10, height); } } else { gr.FillRectangle(this.m_GrayBrush, x, top, pagingItem.m_TextWidth + 10, height); } if (parent.CurrentPageIndex != i) { gr.DrawLine(this.m_BlackPen, x, top + num, ((x + pagingItem.m_TextWidth) + 10) - 1, top + num); } gr.DrawLine(this.m_BlackPen, x + (pagesRightToLeft ? 0 : ((pagingItem.m_TextWidth + 10) - 1)), top, x + (pagesRightToLeft ? 0 : ((pagingItem.m_TextWidth + 10) - 1)), top + height); gr.DrawString(text, pagingItem.TextFont, pagingItem.GetTextForeBrush(), new Rectangle(x + 5, top + ((height - pagingItem.m_TextHeight) / 2), pagingItem.m_TextWidth, pagingItem.m_TextHeight)); if (pagesRightToLeft) { left -= pagingItem.m_TextWidth + 10; if (left < 0) { break; } } else { left += pagingItem.m_TextWidth + 10; if (left > width) { break; } } } } } if (pagesRightToLeft) { if (left > 0) { gr.DrawLine(this.m_BlackPen, num3, top + num, left, top + num); } } else if (left < width) { gr.DrawLine(this.m_BlackPen, left, top + num, num3 + width, top + num); } if (parent.m_PagesOverWidth) { bool isLeftRight = this.ArrowStyle == RescoArrowStyle.LeftRight; Image image = Resco.Controls.DetailView.DetailView.GetArrow(true, isLeftRight, parent.m_RightArrowClicked, true); Image image2 = Resco.Controls.DetailView.DetailView.GetArrow(false, isLeftRight, parent.m_LeftArrowClicked, true); if (isLeftRight) { Rectangle destRect = new Rectangle(num3 + (pagesRightToLeft ? 0 : (width - (Resco.Controls.DetailView.DetailView.TabImageSize.Width * 2))), top, Resco.Controls.DetailView.DetailView.TabImageSize.Width, Resco.Controls.DetailView.DetailView.TabImageSize.Height); Rectangle srcRect = new Rectangle(0, 0, image2.Width, image2.Height); gr.DrawImage(image2, destRect, srcRect, GraphicsUnit.Pixel); destRect.X = num3 + (pagesRightToLeft ? Resco.Controls.DetailView.DetailView.TabImageSize.Width : (width - Resco.Controls.DetailView.DetailView.TabImageSize.Width)); srcRect = new Rectangle(0, 0, image.Width, image.Height); gr.DrawImage(image, destRect, srcRect, GraphicsUnit.Pixel); } else { Rectangle rectangle3 = new Rectangle(num3 + (pagesRightToLeft ? 0 : (width - Resco.Controls.DetailView.DetailView.TabImageSize.Width)), top, Resco.Controls.DetailView.DetailView.TabImageSize.Width, Resco.Controls.DetailView.DetailView.TabImageSize.Height); Rectangle rectangle4 = new Rectangle(0, 0, image2.Width, image2.Height); gr.DrawImage(image2, rectangle3, rectangle4, GraphicsUnit.Pixel); rectangle3.Y = top + Resco.Controls.DetailView.DetailView.TabImageSize.Height; rectangle4 = new Rectangle(0, 0, image.Width, image.Height); gr.DrawImage(image, rectangle3, rectangle4, GraphicsUnit.Pixel); } } }