Example #1
0
        public static void drawText(Graphics g, RectangleF range, string context, TextAttibute style)
        {
            Font  drawFont  = style.Font;
            Brush drawBrush = new HatchBrush(HatchStyle.SmallGrid, Color.Black);
            Pen   blackPen  = new Pen(Color.Black);
            //g.DrawRectangle(blackPen, x, y, width, height);
            StringFormat drawFormat = new StringFormat();

            drawFormat.LineAlignment = StringAlignment.Center;
            drawFormat.Alignment     = StringAlignment.Center;
            drawFormat.FormatFlags   = StringFormatFlags.NoClip;
            g.DrawString(context, drawFont, drawBrush, range, drawFormat);
        }
Example #2
0
 public override void ObjectParse(object sender, ConvertEventArgs e)
 {
     if ((sender as Binding).DataSource is ReportAttribute)
     {
         ReportAttribute attr         = (sender as Binding).DataSource as ReportAttribute;
         ComboBoxEdit    comboBoxEdit = ((sender as Binding).BindableComponent as ComboBoxEdit);
         e.Value = new Font(comboBoxEdit.SelectedItem.ToString(), attr.Font.Size, attr.Font.Style);
     }
     else
     {
         TextAttibute attr         = (sender as Binding).DataSource as TextAttibute;
         ComboBoxEdit comboBoxEdit = ((sender as Binding).BindableComponent as ComboBoxEdit);
         e.Value = new Font(comboBoxEdit.SelectedItem.ToString(), attr.Font.Size, attr.Font.Style);
     }
 }
Example #3
0
        public TextAttibute Clone()
        {
            //克隆丢失动态列属性
            TextAttibute textAttr = new TextAttibute();

            textAttr.Font              = font;
            textAttr.ForeBrush         = ForeBrush;
            textAttr.BackgroupBrush    = backgroupBrush;
            textAttr.Valign            = valign;
            textAttr.BoundaryLine      = boundaryLine;
            textAttr.AutoWrap          = autoWrap;
            textAttr.PrintStyle        = printStyle;
            textAttr.IsAdjustWeith     = isAdjustWeith;
            textAttr.Diagonal          = diagonal;
            textAttr.Excursion         = Excursion;
            textAttr.NameZh_cn         = NameZh_cn;
            textAttr.textPropertyArray = this.textPropertyArray;
            textAttr.DynamicColumn     = dynamicColumn;
            return(textAttr);
        }