private void InsertContentControl(int number, string content, float X, float Y, float W, float H, StyleInfo styleInfo, PageText pt) { int sCountTo, sCountFrom; sCountFrom = (int)(X / spaceWidth); sCountTo = (int)((X + W) / spaceWidth); int rCount = (int)((Y + H) / rowHeight); //if (styleInfo.FontWeight == FontWeightEnum.Bold) //{ // content = content.Insert(0, BoldOn); // content = content.Insert(content.Length, BoldOff); //} //if (styleInfo.FontSize > 11f) //{ // content = content.Insert(0, Expanded); // content = content.Insert(content.Length, ExpandedNormal); //} DMPControl control = new DMPControl(); control.Number = number; control.LineNumber = rCount; control.FromIndex = sCountFrom; control.ToIndex = sCountTo; control.ContentLength = content.Length; control.VerticalAlign = styleInfo.VerticalAlign; control.TextAlign = styleInfo.TextAlign; control.String = content; control.CanGrow = pt.CanGrow; control.SI = styleInfo; control.TopBorder = styleInfo.BStyleTop == BorderStyleEnum.Solid || styleInfo.BStyleTop == BorderStyleEnum.Dotted; control.BottomBorder = styleInfo.BStyleBottom == BorderStyleEnum.Solid || styleInfo.BStyleBottom == BorderStyleEnum.Dotted; ContentControls.Add(control); }
private void ControlToLine(DMPControl control) { if (Content.Count > control.LineNumber) { bool isFullTextPrinted = Content[control.LineNumber].InsertText(control.String, control.FromIndex, control.ToIndex, control.SI); int lineNumber = control.LineNumber + 1; int sCountFrom = control.FromIndex; int sCountTo = control.ToIndex; if (control.CanGrow) { CheckGrowedText(isFullTextPrinted, control.String, lineNumber, sCountFrom, sCountTo, control.SI); } } }
public void InsertLineContent(int number, float X, float Y, float W, float H, StyleInfo styleInfo) { int sCountTo, sCountFrom; sCountFrom = (int)(X / spaceWidth); sCountTo = (int)((X + W) / spaceWidth); int rCount = (int)((Y + H) / rowHeight); int i = rCount; DMPControl control = new DMPControl(); control.Number = number; control.LineNumber = rCount; control.FromIndex = sCountFrom; control.ToIndex = sCountTo; control.VerticalAlign = styleInfo.VerticalAlign; control.TextAlign = styleInfo.TextAlign; control.InsertLine(sCountFrom, sCountTo); control.CanGrow = false; control.SI = styleInfo; control.TopBorder = styleInfo.BStyleTop == BorderStyleEnum.Solid || styleInfo.BStyleTop == BorderStyleEnum.Dotted; control.BottomBorder = styleInfo.BStyleBottom == BorderStyleEnum.Solid || styleInfo.BStyleBottom == BorderStyleEnum.Dotted; ContentControls.Add(control); }
private void ControlToLine(DMPControl control) { if (Content.Count > control.LineNumber) { bool isFullTextPrinted = Content[control.LineNumber].InsertText(control.String, control.FromIndex, control.ToIndex, control.SI); int lineNumber = control.LineNumber + 1; int sCountFrom = control.FromIndex; int sCountTo = control.ToIndex; if (control.CanGrow) CheckGrowedText(isFullTextPrinted, control.String, lineNumber, sCountFrom, sCountTo, control.SI); } }