Exemplo n.º 1
0
        /// <summary>
        /// Represent a color blend for pressed item.
        /// </summary>
        /// <param name="theme">Them used to paint.</param>
        /// <returns>ColorBlend.</returns>
        //INSTANT C# NOTE: C# does not support parameterized properties - the following property has been rewritten as a function:
        //ORIGINAL LINE: Public Shared ReadOnly Property PressedBlend(Optional ByVal theme As Zeroit.Framework.Utilities.GraphicsExtension.ControlRenderer.Drawing.ColorTheme = Zeroit.Framework.Utilities.GraphicsExtension.ControlRenderer.Drawing.ColorTheme.Blue) As ColorBlend
        public static ColorBlend PressedBlend(Zeroit.Framework.Utilities.GraphicsExtension.ControlRenderer.Drawing.ColorTheme theme = Zeroit.Framework.Utilities.GraphicsExtension.ControlRenderer.Drawing.ColorTheme.Blue)
        {
            Color[]    colors = new Color[2];
            float[]    pos    = new float[2];
            ColorBlend blend  = new ColorBlend();

            pos[0] = 0.0F;
            pos[1] = 1.0F;
            //INSTANT C# NOTE: The following VB 'Select Case' included either a non-ordinal switch expression or non-ordinal, range-type, or non-constant 'Case' expressions and was converted to C# 'if-else' logic:
            //		Select Case theme
            //ORIGINAL LINE: Case Zeroit.Framework.Utilities.GraphicsExtension.ControlRenderer.Drawing.ColorTheme.Blue
            if (theme == Zeroit.Framework.Utilities.GraphicsExtension.ControlRenderer.Drawing.ColorTheme.Blue)
            {
                colors[0] = Color.FromArgb(160, 189, 227);
                colors[1] = Color.FromArgb(255, 255, 255);
            }
            blend.Colors    = colors;
            blend.Positions = pos;
            return(blend);
        }
Exemplo n.º 2
0
 //INSTANT C# NOTE: C# does not support parameterized properties - the following property has been rewritten as a function:
 //ORIGINAL LINE: Public Shared ReadOnly Property SeparatorPen(Optional ByVal theme As Zeroit.Framework.Utilities.GraphicsExtension.ControlRenderer.Drawing.ColorTheme = Zeroit.Framework.Utilities.GraphicsExtension.ControlRenderer.Drawing.ColorTheme.Blue) As Pen
 public static Pen SeparatorPen(Zeroit.Framework.Utilities.GraphicsExtension.ControlRenderer.Drawing.ColorTheme theme = Zeroit.Framework.Utilities.GraphicsExtension.ControlRenderer.Drawing.ColorTheme.Blue)
 {
     return(new Pen(Color.FromArgb(197, 197, 197)));
 }