Exemplo n.º 1
0
 /// <summary>
 /// Copy the ImageWFBase properties
 /// </summary>
 /// <param name="image">ImageWFBase object whose properties are to be copied</param>
 public void CopyImageBaseProperties(ImageWFBase image)
 {
     CopyBaseProperties(image);
     ImageFileName = image.ImageFileName;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Paint the background image on the card.
 /// </summary>
 /// <param name="g">Graphics object on which to do the drawing</param>
 /// <param name="image">BackgorundImage object to draw</param>
 private void PaintImage(Graphics g, ImageWFBase image)
 {
     if(image != null &&
        image.ImageFileName != null &&
        image.ImageFileName != string.Empty)
     {
         g.DrawImage(image.Image,
                     new Rectangle(image.X + CardLocation.X,
                                   image.Y + cardLocation.Y,
                                   image.Width, image.Height));
     }
     if(QslCard.IsInDesignMode)
     {
         if(image.IsHighlighted)
         {
             g.DrawRectangle(highlighedPen, new Rectangle(
                 image.X + CardLocation.X, image.Y + CardLocation.Y,
                 image.Width, image.Height));
         }
         else if(image.IsSelected)
         {
             g.DrawRectangle(selectedPen, new Rectangle(
                 image.X + CardLocation.X, image.Y + CardLocation.Y,
                 image.Width, image.Height));
         }
     }
 }