Ejemplo n.º 1
0
    public static Color GetString(this BorderColour border)
    {
        switch (border)
        {
        case BorderColour.RED:
            return(System.Drawing.Color.Red);

        case BorderColour.GREEN:
            return(System.Drawing.Color.Green);

        case BorderColour.WHITE:
            return(System.Drawing.Color.White);

        case BorderColour.BLUE:
            return(System.Drawing.Color.Blue);

        case BorderColour.BLACK:
            return(System.Drawing.Color.Black);

        case BorderColour.YELLOW:
            return(System.Drawing.Color.Yellow);

        default:
            return(System.Drawing.Color.White);
        }
    }
Ejemplo n.º 2
0
 /// <summary>
 /// Return the URL for a mounted print preview image.
 /// </summary>
 /// <param name="sWorkID">The ID of the work.</param>
 /// <param name="border">The border to use for the print.</param>
 /// <returns>The URL of a mounted print preview of the work.</returns>
 public static Uri MountedPrintPreviewURL( string sWorkID, BorderColour border )
 {
     return WorkImageURL( sWorkID, ArtCropping.None, ArtSize.Small, ArtView.Preview,
         "product:" + RBEnums.ToURL( ArtProduct.MountedPrint ) + "/" +
         "border:" + RBEnums.ToURL( border ) + "/" );
 }
        public override void RenderBorder(Graphics g, Rectangle borderRectangle)
        {
            KryptonToggleSwitch toggleSwitch = new KryptonToggleSwitch();

            Color borderColour = !toggleSwitch.Enabled && toggleSwitch.GrayWhenDisabled ? BorderColour.ToGrayScale() : BorderColour;

            g.SetClip(borderRectangle);

            using (Pen borderPen = new Pen(borderColour))
            {
                g.DrawRectangle(borderPen, borderRectangle.X, borderRectangle.Y, borderRectangle.Width - 1, borderRectangle.Height - 1);
            }
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Return the URL for a laminated print preview image.
 /// </summary>
 /// <param name="sWorkID">The ID of the work.</param>
 /// <param name="border">The border to use for the print.</param>
 /// <param name="size">The size of the laminated print.</param>
 /// <returns>The URL of a laminated print preview of the work.</returns>
 public static Uri LaminatedPrintPreviewURL( string sWorkID, BorderColour border, ArtSize size )
 {
     return WorkImageURL( sWorkID, ArtCropping.None, size, ArtView.Preview,
         "product:" + RBEnums.ToURL( ArtProduct.LaminatedPrint ) + "/" +
         "border:" + RBEnums.ToURL( border ) + "/" );
 }