|
|
|
@ -60,12 +60,10 @@ namespace ICSharpCode.Reports.Addin |
|
|
|
if (this.scaleImageToSize) { |
|
|
|
if (this.scaleImageToSize) { |
|
|
|
graphics.DrawImageUnscaled(this.Image,this.Location.X,this.Location.Y); |
|
|
|
graphics.DrawImageUnscaled(this.Image,this.Location.X,this.Location.Y); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
Image im = this.image; |
|
|
|
|
|
|
|
if (im != null) { |
|
|
|
|
|
|
|
graphics.DrawImage(this.Image,this.ClientRectangle); |
|
|
|
graphics.DrawImage(this.Image,this.ClientRectangle); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region Property's
|
|
|
|
#region Property's
|
|
|
|
@ -74,9 +72,11 @@ namespace ICSharpCode.Reports.Addin |
|
|
|
public string ImageFileName { |
|
|
|
public string ImageFileName { |
|
|
|
get { return imageFileName; } |
|
|
|
get { return imageFileName; } |
|
|
|
set { imageFileName = value; |
|
|
|
set { imageFileName = value; |
|
|
|
|
|
|
|
if (!String.IsNullOrEmpty(reportFileName)) { |
|
|
|
this.relativeFileName = FileUtility.GetRelativePath(Path.GetFullPath(this.reportFileName),Path.GetFullPath(this.ImageFileName)); |
|
|
|
this.relativeFileName = FileUtility.GetRelativePath(Path.GetFullPath(this.reportFileName),Path.GetFullPath(this.ImageFileName)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static Bitmap ErrorBitmap(Size size) |
|
|
|
private static Bitmap ErrorBitmap(Size size) |
|
|
|
@ -138,16 +138,24 @@ namespace ICSharpCode.Reports.Addin |
|
|
|
if (this.imageSource == GlobalEnums.ImageSource.Database ) { |
|
|
|
if (this.imageSource == GlobalEnums.ImageSource.Database ) { |
|
|
|
text = "<Database>"; |
|
|
|
text = "<Database>"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (!String.IsNullOrEmpty(imageFileName)) { |
|
|
|
|
|
|
|
this.image = this.LoadImage(); |
|
|
|
|
|
|
|
return this.image; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/* |
|
|
|
this.image = FakeImage(base.Size,text); |
|
|
|
this.image = FakeImage(base.Size,text); |
|
|
|
if (this.image != null) { |
|
|
|
if (this.image != null) { |
|
|
|
return image; |
|
|
|
return image; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
var s = AbsoluteFileName; |
|
|
|
if (!String.IsNullOrEmpty(imageFileName)) { |
|
|
|
if (!String.IsNullOrEmpty(imageFileName)) { |
|
|
|
this.image = this.LoadImage(); |
|
|
|
this.image = this.LoadImage(); |
|
|
|
return this.image; |
|
|
|
return this.image; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
set { |
|
|
|
set { |
|
|
|
this.image = value; |
|
|
|
this.image = value; |
|
|
|
@ -212,16 +220,25 @@ namespace ICSharpCode.Reports.Addin |
|
|
|
public string AbsoluteFileName |
|
|
|
public string AbsoluteFileName |
|
|
|
{ |
|
|
|
{ |
|
|
|
get { |
|
|
|
get { |
|
|
|
//D:\SharpDevelop3.0_WorkingCopy\SharpDevelop\samples\SharpDevelopReports\SampleReports\Logos
|
|
|
|
//D:\SharpDevelop3.0_WorkingCopy\SharpDevelop\samples\SharpDevelopReports\SampleReports\Logos
|
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrEmpty(relativeFileName)) { |
|
|
|
if (!string.IsNullOrEmpty(relativeFileName)) { |
|
|
|
Console.WriteLine(""); |
|
|
|
Console.WriteLine(""); |
|
|
|
string testFileName = FileUtility.NormalizePath(Path.Combine(Path.GetDirectoryName(this.reportFileName),this.relativeFileName)); |
|
|
|
|
|
|
|
|
|
|
|
string testFileName = String.Empty; |
|
|
|
|
|
|
|
if (! String.IsNullOrEmpty(reportFileName)) { |
|
|
|
|
|
|
|
testFileName = FileUtility.NormalizePath(Path.Combine(Path.GetDirectoryName(this.reportFileName),this.relativeFileName)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// else
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// testFileName = FileUtility.NormalizePath(Path.Combine(Path.GetDirectoryName(this.reportFileName),this.relativeFileName));
|
|
|
|
|
|
|
|
// }
|
|
|
|
if (File.Exists(testFileName)){ |
|
|
|
if (File.Exists(testFileName)){ |
|
|
|
Console.WriteLine("Image found with Relative Filename"); |
|
|
|
Console.WriteLine("Image found with Relative Filename"); |
|
|
|
Console.WriteLine("Report Filename {0}",this.reportFileName); |
|
|
|
// Console.WriteLine("Report Filename {0}",this.reportFileName);
|
|
|
|
Console.WriteLine("Relative Filename {0}",this.relativeFileName); |
|
|
|
// Console.WriteLine("Relative Filename {0}",this.relativeFileName);
|
|
|
|
Console.WriteLine("Image Filename {0}",this.ImageFileName); |
|
|
|
// Console.WriteLine("Image Filename {0}",this.ImageFileName);
|
|
|
|
return testFileName; |
|
|
|
return testFileName; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
Console.WriteLine("AbsoluteFileName can't load image"); |
|
|
|
Console.WriteLine("AbsoluteFileName can't load image"); |
|
|
|
|