modernaesthetics

Future Theme - C#

Jun 6th, 2018
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 5.01 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Drawing;
  4. using System.Drawing.Drawing2D;
  5. using System.ComponentModel;
  6. using System.Windows.Forms;
  7.  
  8.  
  9. //------------------
  10. //Creator: aeonhack
  11. //Site: elitevs.net
  12. //Created: 9/23/2011
  13. //Changed: 9/23/2011
  14. //Version: 1.0.0
  15. //Theme Base: 1.5.2
  16. //------------------
  17. class FutureTheme : ThemeContainer152
  18. {
  19.  
  20.     public FutureTheme()
  21.     {
  22.         MoveHeight = 24;
  23.         BackColor = Color.FromArgb(34, 34, 34);
  24.  
  25.         SetColor("Back", 34, 34, 34);
  26.         SetColor("Gradient1", 34, 34, 34);
  27.         SetColor("Gradient2", 23, 23, 23);
  28.         SetColor("Border1", 34, 34, 34);
  29.         SetColor("Border2", 49, 49, 49);
  30.         SetColor("Border3", Color.Black);
  31.         SetColor("Line1", Color.Black);
  32.         SetColor("Line2", Color.Black);
  33.         SetColor("Hatch1", Color.Black);
  34.         SetColor("Hatch2", 34, 34, 34);
  35.         SetColor("Shade1", 70, Color.Black);
  36.         SetColor("Shade2", Color.Transparent);
  37.         SetColor("Text", Color.White);
  38.     }
  39.  
  40.     private Color C1;
  41.     private Color C2;
  42.     private Color C3;
  43.     private Color C4;
  44.     private Color C5;
  45.     private Pen P1;
  46.     private Pen P2;
  47.     private Pen P3;
  48.     private Pen P4;
  49.     private Pen P5;
  50.     private HatchBrush B1;
  51.  
  52.     private SolidBrush B2;
  53.     protected override void ColorHook()
  54.     {
  55.         C1 = GetColor("Back");
  56.         C2 = GetColor("Gradient1");
  57.         C3 = GetColor("Gradient2");
  58.         C4 = GetColor("Shade1");
  59.         C5 = GetColor("Shade2");
  60.  
  61.         P1 = new Pen(GetColor("Border1"));
  62.         P2 = new Pen(GetColor("Line1"));
  63.         P3 = new Pen(GetColor("Line2"));
  64.         P4 = new Pen(GetColor("Border2"));
  65.         P5 = new Pen(GetColor("Border3"));
  66.  
  67.         B1 = new HatchBrush(HatchStyle.DarkUpwardDiagonal, GetColor("Hatch1"), GetColor("Hatch2"));
  68.         B2 = new SolidBrush(GetColor("Text"));
  69.  
  70.         BackColor = C1;
  71.     }
  72.  
  73.  
  74.     private Rectangle RT1;
  75.     protected override void PaintHook()
  76.     {
  77.         G.Clear(C1);
  78.  
  79.         RT1 = new Rectangle(1, 1, Width - 2, 22);
  80.         DrawGradient(C2, C3, RT1, 90f);
  81.         DrawBorders(P1, RT1);
  82.  
  83.         G.DrawLine(P2, 0, 23, Width, 23);
  84.  
  85.         G.FillRectangle(B1, 0, 24, Width, 13);
  86.  
  87.         DrawGradient(C4, C5, 0, 24, Width, 6);
  88.  
  89.         G.DrawLine(P3, 0, 37, Width, 37);
  90.         DrawBorders(P4, 1, 38, Width - 2, Height - 39);
  91.  
  92.         DrawText(B2, HorizontalAlignment.Left, 5, 0);
  93.  
  94.         DrawBorders(P5);
  95.     }
  96.  
  97. }
  98.  
  99. //------------------
  100. //Creator: aeonhack
  101. //Site: elitevs.net
  102. //Created: 9/23/2011
  103. //Changed: 9/23/2011
  104. //Version: 1.0.0
  105. //Theme Base: 1.5.2
  106. //------------------
  107. class FutureButton : ThemeControl152
  108. {
  109.  
  110.  
  111.     private ColorBlend Blend;
  112.     public FutureButton()
  113.     {
  114.         SetColor("Blend1", 28, 28, 28);
  115.         SetColor("Blend2", 32, 32, 32);
  116.         SetColor("Blend3", 24, 24, 24);
  117.         SetColor("Border1A", 40, 40, 40);
  118.         SetColor("Border1B", 48, 48, 48);
  119.         SetColor("Border2", Color.Black);
  120.         SetColor("Border3", 24, 24, 24);
  121.         SetColor("Line1", 44, 44, 44);
  122.         SetColor("TextShade", Color.Black);
  123.         SetColor("Text", Color.White);
  124.         SetColor("Corners", 40, 40, 40);
  125.  
  126.         Blend = new ColorBlend();
  127.         Blend.Positions = new float[] {
  128.                         0f,
  129.                         0.5f,
  130.                         1f
  131.                 };
  132.     }
  133.  
  134.     private Pen P1;
  135.     private Pen P2;
  136.     private Pen P3;
  137.     private Pen P4;
  138.     private SolidBrush B1;
  139.     private SolidBrush B2;
  140.     private Color C1;
  141.     private Color C2;
  142.  
  143.     private Color C3;
  144.     protected override void ColorHook()
  145.     {
  146.         C1 = GetColor("Border1A");
  147.         C2 = GetColor("Border1B");
  148.         C3 = GetColor("Corners");
  149.  
  150.         P2 = new Pen(GetColor("Border2"));
  151.         P3 = new Pen(GetColor("Border3"));
  152.         P4 = new Pen(GetColor("Line1"));
  153.  
  154.         B1 = new SolidBrush(GetColor("TextShade"));
  155.         B2 = new SolidBrush(GetColor("Text"));
  156.  
  157.         Blend.Colors = new Color[] {
  158.                         GetColor("Blend1"),
  159.                         GetColor("Blend2"),
  160.                         GetColor("Blend3")
  161.                 };
  162.     }
  163.  
  164.  
  165.     private LinearGradientBrush GB1;
  166.     protected override void PaintHook()
  167.     {
  168.         DrawGradient(Blend, ClientRectangle, 90f);
  169.  
  170.         GB1 = new LinearGradientBrush(ClientRectangle, C1, C2, 90f);
  171.         P1 = new Pen(GB1);
  172.  
  173.         DrawBorders(P1);
  174.         DrawBorders(P2, 1);
  175.  
  176.         if (State == MouseState.Down)
  177.         {
  178.             DrawBorders(P3, 2);
  179.  
  180.             DrawText(B1, HorizontalAlignment.Center, 2, 2);
  181.             DrawText(B2, HorizontalAlignment.Center, 1, 1);
  182.         }
  183.         else
  184.         {
  185.             G.DrawLine(P4, 2, 2, Width - 3, 2);
  186.  
  187.             DrawText(B1, HorizontalAlignment.Center, 1, 1);
  188.             DrawText(B2, HorizontalAlignment.Center, 0, 0);
  189.         }
  190.  
  191.         DrawCorners(C3, 1, 1, Width - 2, Height - 2);
  192.         DrawCorners(BackColor);
  193.     }
  194. }
Advertisement
Add Comment
Please, Sign In to add comment