Browse Source

BaseTextItem show Field names with StringTrimming.EllipsisCharacter,BaseImageItem show image source

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@5686 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Peter Forstmeier 16 years ago
parent
commit
3b1ca96543
  1. 7
      src/AddIns/Misc/SharpReport/ICSharpCode.Reports.Addin/Project/ReportItems/BaseImageItem.cs
  2. 10
      src/AddIns/Misc/SharpReport/ICSharpCode.Reports.Addin/Project/ReportItems/BaseTextItem.cs

7
src/AddIns/Misc/SharpReport/ICSharpCode.Reports.Addin/Project/ReportItems/BaseImageItem.cs

@ -68,8 +68,7 @@ namespace ICSharpCode.Reports.Addin
Image im = this.image; Image im = this.image;
if (im != null) { if (im != null) {
graphics.DrawImage(this.Image,this.ClientRectangle); graphics.DrawImage(this.Image,this.ClientRectangle);
} }
} }
} }
@ -140,9 +139,11 @@ namespace ICSharpCode.Reports.Addin
[XmlIgnoreAttribute] [XmlIgnoreAttribute]
public Image Image { public Image Image {
get { get {
string text = "<Image>";
if (this.imageSource == GlobalEnums.ImageSource.Database ) { if (this.imageSource == GlobalEnums.ImageSource.Database ) {
this.image = FakeImage(base.Size,"<Database>"); text = "<Database>";
} }
this.image = FakeImage(base.Size,text);
if (this.image != null) { if (this.image != null) {
return image; return image;
} else { } else {

10
src/AddIns/Misc/SharpReport/ICSharpCode.Reports.Addin/Project/ReportItems/BaseTextItem.cs

@ -52,6 +52,8 @@ namespace ICSharpCode.Reports.Addin
public override void Draw(Graphics graphics) public override void Draw(Graphics graphics)
{ {
StringTrimming designTrimmimg = StringTrimming.EllipsisCharacter;
if (graphics == null) { if (graphics == null) {
throw new ArgumentNullException("graphics"); throw new ArgumentNullException("graphics");
} }
@ -59,11 +61,15 @@ namespace ICSharpCode.Reports.Addin
graphics.FillRectangle(b, base.DrawingRectangle); graphics.FillRectangle(b, base.DrawingRectangle);
} }
if (this.stringTrimming != StringTrimming.None) {
designTrimmimg = stringTrimming;
}
TextDrawer.DrawString(graphics,this.Text,this.Font, TextDrawer.DrawString(graphics,this.Text,this.Font,
new SolidBrush(this.ForeColor), new SolidBrush(this.ForeColor),
this.ClientRectangle, this.ClientRectangle,
this.stringTrimming,this.contentAlignment); designTrimmimg,
this.contentAlignment);
base.DrawControl(graphics,base.DrawingRectangle); base.DrawControl(graphics,base.DrawingRectangle);
} }

Loading…
Cancel
Save