private void createOuterFrame(PhotoFrameImages Image1) { this.FramPen = new Pen(Image1.BorderColor, 0); this.FrameImage = Image1.ImageSource!=null && Image1.ImageSource!="" ?( File.Exists(Image1.ImageSource)?Image.FromFile(Image1.ImageSource):null ): null; this.FrameImageWidth = this.FrameImage != null ? this.FrameImage.Width : 0; this.FileName.FrameImageName = Image1.FileName; }
private void createInnerFrame(PhotoFrameImages Image1) { this.ImagePen = new Pen(Image1.BorderColor, 0); this.innerImage = Image1.ImageSource!=null && Image1.ImageSource!="" ?( File.Exists(Image1.ImageSource)?Image.FromFile(Image1.ImageSource):null ): null; this.InnerHeight = Image1.Height; this.InnerWidth = Image1.Width; if (Image1.Unit == PhotoUnit.Inches) { this.InnerHeight *= this.InnerHeight; this.InnerWidth *= this.InnerWidth; } this.FileName.Height = Image1.Height.ToString(); this.FileName.Width = Image1.Width.ToString(); }