Advertisement
hackersock

Fusion Theme - 1.5.4 [C#]

Dec 26th, 2011
478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 4.78 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 - modded by tokzikate
  11. //Site: elitevs.net
  12. //Created: 9/23/2011
  13. //Changed: 9/23/2011
  14. //Version: 1.0.0
  15. //Theme Base: 1.5.4
  16. //------------------
  17. class FusionTheme : ThemeContainer154
  18. {
  19.  
  20.     private GraphicsPath Path;
  21.  
  22.     private ColorBlend Blend;
  23.     public FusionTheme()
  24.     {
  25.         Header = 34;
  26.         BackColor = Color.White;
  27.         TransparencyKey = Color.Fuchsia;
  28.  
  29.         SetColor("Sides", 47, 47, 50);
  30.         SetColor("Gradient1", 52, 52, 55);
  31.         SetColor("Gradient2", 47, 47, 50);
  32.         SetColor("Text", Color.White);
  33.         SetColor("Back", Color.White);
  34.         SetColor("Border1", Color.Black);
  35.         SetColor("Border2", 60, 60, 63);
  36.         SetColor("Border3", 60, 60, 63);
  37.         SetColor("Border4", Color.Black);
  38.         SetColor("Blend1", Color.Transparent);
  39.         SetColor("Blend2", 60, 60, 63);
  40.  
  41.         Path = new GraphicsPath();
  42.  
  43.         Blend = new ColorBlend();
  44.         Blend.Positions = new float[] {
  45.             0f,
  46.             0.5f,
  47.             1f
  48.         };
  49.     }
  50.  
  51.     private Pen P1;
  52.     private Pen P2;
  53.     private Pen P3;
  54.     private Pen P4;
  55.     private Pen P5;
  56.     private Color C1;
  57.     private Color C2;
  58.     private Color C3;
  59.     private SolidBrush B1;
  60.  
  61.     private SolidBrush B2;
  62.     protected override void ColorHook()
  63.     {
  64.         P1 = new Pen(TransparencyKey, 3);
  65.         P2 = new Pen(GetColor("Border1"));
  66.         P3 = new Pen(GetColor("Border2"));
  67.         P4 = new Pen(GetColor("Border3"));
  68.         P5 = new Pen(GetColor("Border4"));
  69.  
  70.         C1 = GetColor("Sides");
  71.         C2 = GetColor("Gradient1");
  72.         C3 = GetColor("Gradient2");
  73.  
  74.         B1 = new SolidBrush(GetColor("Text"));
  75.         B2 = new SolidBrush(GetColor("Back"));
  76.  
  77.         Blend.Colors = new Color[] {
  78.             GetColor("Blend1"),
  79.             GetColor("Blend2"),
  80.             GetColor("Blend1")
  81.         };
  82.  
  83.         BackColor = B2.Color;
  84.     }
  85.  
  86.  
  87.     private Rectangle RT1;
  88.     protected override void PaintHook()
  89.     {
  90.         G.DrawRectangle(P1, ClientRectangle);
  91.         G.SetClip(Path);
  92.  
  93.         G.Clear(C1);
  94.  
  95.         DrawGradient(C2, C3, 0, 0, 16, Height);
  96.         DrawGradient(C2, C3, Width - 16, 0, 16, Height);
  97.  
  98.         DrawText(B1, HorizontalAlignment.Left, 12, 0);
  99.  
  100.         RT1 = new Rectangle(12, 34, Width - 24, Height - 34 - 12);
  101.  
  102.         G.FillRectangle(B2, RT1);
  103.         DrawBorders(P2, RT1, 1);
  104.         DrawBorders(P3, RT1);
  105.  
  106.         DrawBorders(P4, 1);
  107.         DrawGradient(Blend, 1, 1, Width - 2, 2, 0f);
  108.  
  109.         G.ResetClip();
  110.         G.DrawPath(P5, Path);
  111.     }
  112.  
  113.     protected override void OnResize(EventArgs e)
  114.     {
  115.         Path.Reset();
  116.         Path.AddLines(new Point[] {
  117.             new Point(2, 0),
  118.             new Point(Width - 3, 0),
  119.             new Point(Width - 1, 2),
  120.             new Point(Width - 1, Height - 3),
  121.             new Point(Width - 3, Height - 1),
  122.             new Point(2, Height - 1),
  123.             new Point(0, Height - 3),
  124.             new Point(0, 2),
  125.             new Point(2, 0)
  126.         });
  127.  
  128.         base.OnResize(e);
  129.     }
  130.  
  131. }
  132.  
  133. //------------------
  134. //Creator: aeonhack
  135. //Site: elitevs.net
  136. //Created: 9/23/2011
  137. //Changed: 9/23/2011
  138. //Version: 1.0.0
  139. //Theme Base: 1.5.2
  140. //------------------
  141. class FusionButton : ThemeControl154
  142. {
  143.  
  144.     public FusionButton()
  145.     {
  146.         SetColor("DownGradient1", 255, 127, 1);
  147.         SetColor("DownGradient2", 255, 175, 12);
  148.         SetColor("NoneGradient1", 255, 175, 12);
  149.         SetColor("NoneGradient2", 255, 127, 1);
  150.         SetColor("TextShade", 30, Color.Black);
  151.         SetColor("Text", Color.White);
  152.         SetColor("Border1", 255, 197, 19);
  153.         SetColor("Border2", 254, 133, 0);
  154.     }
  155.  
  156.     private Color C1;
  157.     private Color C2;
  158.     private Color C3;
  159.     private Color C4;
  160.     private SolidBrush B1;
  161.     private SolidBrush B2;
  162.     private Pen P1;
  163.  
  164.     private Pen P2;
  165.     protected override void ColorHook()
  166.     {
  167.         C1 = GetColor("DownGradient1");
  168.         C2 = GetColor("DownGradient2");
  169.         C3 = GetColor("NoneGradient1");
  170.         C4 = GetColor("NoneGradient2");
  171.  
  172.         B1 = new SolidBrush(GetColor("TextShade"));
  173.         B2 = new SolidBrush(GetColor("Text"));
  174.  
  175.         P1 = new Pen(GetColor("Border1"));
  176.         P2 = new Pen(GetColor("Border2"));
  177.     }
  178.  
  179.     protected override void PaintHook()
  180.     {
  181.         if (State == MouseState.Down)
  182.         {
  183.             DrawGradient(C1, C2, ClientRectangle, 90f);
  184.         }
  185.         else
  186.         {
  187.             DrawGradient(C3, C4, ClientRectangle, 90f);
  188.         }
  189.  
  190.         DrawText(B1, HorizontalAlignment.Center, 1, 1);
  191.         DrawText(B2, HorizontalAlignment.Center, 0, 0);
  192.  
  193.         DrawBorders(P1, 1);
  194.         DrawBorders(P2);
  195.  
  196.         DrawCorners(BackColor);
  197.     }
  198.  
  199. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement