Guest User

Erosion Theme

a guest
Aug 19th, 2014
542
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 10.89 KB | None | 0 0
  1. 'THIS IS NOT THE FINAL VERSION.
  2. 'EDITED BY HEWO & Mr. Kr00z£r
  3. 'Erosion Orange
  4. 'Based on Drone Theme
  5. Imports System, System.Collections
  6. Imports System.Drawing, System.Drawing.Drawing2D
  7. Imports System.ComponentModel, System.Windows.Forms
  8.  
  9. '------------------
  10. 'Creator: aeonhack
  11. 'Site: elitevs.net
  12. 'Created: 9/2/2011
  13. 'Changed: 9/2/2011
  14. 'Version: 1.0.0
  15. 'Theme Base: 1.5.3
  16. '------------------
  17. Class ErosionTheme
  18.     Inherits ThemeContainer153
  19.  
  20.     Sub New()
  21.         Header = 24
  22.         TransparencyKey = Color.Fuchsia
  23.     End Sub
  24.  
  25.     Protected Overrides Sub ColorHook()
  26.  
  27.     End Sub
  28.  
  29.     Protected Overrides Sub PaintHook()
  30.         G.Clear(Color.FromArgb(24, 24, 24))
  31.  
  32.         DrawGradient(Color.FromArgb(255, 165, 0), Color.FromArgb(255, 102, 0), 11, 8, Width - 22, 17)
  33.         G.FillRectangle(New SolidBrush(Color.FromArgb(255, 165, 0)), 11, 3, Width - 22, 5)
  34.  
  35.         Dim P As New Pen(Color.FromArgb(13, Color.White))
  36.         G.DrawLine(P, 10, 1, 10, Height)
  37.         G.DrawLine(P, Width - 11, 1, Width - 11, Height)
  38.         G.DrawLine(P, 11, Height - 11, Width - 12, Height - 11)
  39.         G.DrawLine(P, 11, 29, Width - 12, 29)
  40.         G.DrawLine(P, 11, 25, Width - 12, 25)
  41.  
  42.         G.FillRectangle(New SolidBrush(Color.FromArgb(13, Color.White)), 0, 2, Width, 6)
  43.         G.FillRectangle(New SolidBrush(Color.FromArgb(13, Color.White)), 0, Height - 6, Width, 4)
  44.  
  45.         G.FillRectangle(New SolidBrush(Color.FromArgb(24, 24, 24)), 11, Height - 6, Width - 22, 4)
  46.  
  47.         Dim T As New HatchBrush(HatchStyle.Trellis, Color.FromArgb(24, 24, 24), Color.FromArgb(8, 8, 8))
  48.         G.FillRectangle(T, 11, 30, Width - 22, Height - 41)
  49.  
  50.         DrawText(Brushes.White, HorizontalAlignment.Left, 15, 2)
  51.  
  52.         DrawBorders(New Pen(Color.FromArgb(58, 58, 58)), 1)
  53.         DrawBorders(Pens.Black)
  54.  
  55.         P = New Pen(Color.FromArgb(25, Color.White))
  56.         G.DrawLine(P, 11, 3, Width - 12, 3)
  57.         G.DrawLine(P, 12, 2, 12, 7)
  58.         G.DrawLine(P, Width - 13, 2, Width - 13, 7)
  59.  
  60.         G.DrawLine(Pens.Black, 11, 0, 11, Height)
  61.         G.DrawLine(Pens.Black, Width - 12, 0, Width - 12, Height)
  62.  
  63.         G.DrawRectangle(Pens.Black, 11, 2, Width - 23, 22)
  64.         G.DrawLine(Pens.Black, 11, Height - 12, Width - 12, Height - 12)
  65.         G.DrawLine(Pens.Black, 11, 30, Width - 12, 30)
  66.  
  67.         DrawCorners(Color.Fuchsia)
  68.     End Sub
  69.  
  70. End Class
  71.  
  72. '------------------
  73. 'Creator: aeonhack
  74. 'Site: elitevs.net
  75. 'Created: 9/2/2011
  76. 'Changed: 9/2/2011
  77. 'Version: 1.0.0
  78. 'Theme Base: 1.5.3
  79. '------------------
  80. Class ErosionButton
  81.     Inherits ThemeControl153
  82.  
  83.     Protected Overrides Sub ColorHook()
  84.  
  85.     End Sub
  86.  
  87.     Protected Overrides Sub PaintHook()
  88.         DrawBorders(New Pen(Color.FromArgb(32, 32, 32)), 1)
  89.         G.FillRectangle(New SolidBrush(Color.FromArgb(62, 62, 62)), 0, 0, Width, 8)
  90.         DrawBorders(Pens.Black, 2)
  91.         DrawBorders(Pens.Black)
  92.  
  93.         If State = MouseState.Over Then
  94.             G.FillRectangle(New SolidBrush(Color.FromArgb(255, 165, 50)), 3, 3, Width - 6, Height - 6)
  95.             DrawBorders(New Pen(Color.FromArgb(255, 102, 0)), 3)
  96.         ElseIf State = MouseState.Down Then
  97.             G.FillRectangle(New SolidBrush(Color.FromArgb(255, 102, 0)), 3, 3, Width - 6, Height - 6)
  98.             DrawBorders(New Pen(Color.FromArgb(0, 55, 90)), 3)
  99.         Else
  100.             G.FillRectangle(New SolidBrush(Color.FromArgb(24, 24, 24)), 3, 3, Width - 6, Height - 6)
  101.             DrawBorders(New Pen(Color.FromArgb(38, 38, 38)), 3)
  102.         End If
  103.  
  104.         G.FillRectangle(New SolidBrush(Color.FromArgb(13, Color.White)), 3, 3, Width - 6, 8)
  105.  
  106.         If State = MouseState.Down Then
  107.             DrawText(Brushes.White, HorizontalAlignment.Center, 1, 1)
  108.         Else
  109.             DrawText(Brushes.White, HorizontalAlignment.Center, 0, 0)
  110.         End If
  111.  
  112.     End Sub
  113.  
  114. End Class
  115.  
  116. Class ErosionMiniToolBox
  117.     Inherits ThemeControl153
  118.  
  119.     Protected Overrides Sub ColorHook()
  120.  
  121.     End Sub
  122.  
  123.     Protected Overrides Sub PaintHook()
  124.         DrawBorders(New Pen(Color.FromArgb(32, 32, 32)), 1)
  125.         G.FillRectangle(New SolidBrush(Color.FromArgb(62, 62, 62)), 0, 0, Width, 8)
  126.         DrawBorders(Pens.Black, 2)
  127.         DrawBorders(Pens.Black)
  128.  
  129.         If State = MouseState.Over Then
  130.             G.FillRectangle(New SolidBrush(Color.FromArgb(255, 125, 70)), 3, 3, Width - 6, Height - 6)
  131.             DrawBorders(New Pen(Color.FromArgb(38, 38, 38)), 3)
  132.         ElseIf State = MouseState.Down Then
  133.             G.FillRectangle(New SolidBrush(Color.FromArgb(255, 165, 50)), 3, 3, Width - 6, Height - 6)
  134.             DrawBorders(New Pen(Color.FromArgb(0, 55, 90)), 3)
  135.         Else
  136.             G.FillRectangle(New SolidBrush(Color.FromArgb(255, 120, 0)), 3, 3, Width - 6, Height - 6)
  137.             DrawBorders(New Pen(Color.FromArgb(38, 38, 38)), 3)
  138.         End If
  139.  
  140.         G.FillRectangle(New SolidBrush(Color.FromArgb(13, Color.White)), 3, 3, Width - 6, 8)
  141.  
  142.         If State = MouseState.Down Then
  143.             DrawText(Brushes.White, HorizontalAlignment.Center, 0, 0)
  144.         Else
  145.             DrawText(Brushes.White, HorizontalAlignment.Center, 0, 0)
  146.         End If
  147.  
  148.     End Sub
  149.  
  150. End Class
  151.  
  152. '------------------
  153. 'Creator: aeonhack
  154. 'Site: elitevs.net
  155. 'Created: 9/24/2011
  156. 'Changed: 9/24/2011
  157. 'Version: 1.0.0
  158. 'Theme Base: 1.5.3
  159. '------------------
  160. Class ErosionProgressBar
  161.     Inherits ThemeControl153
  162.  
  163.     Private Blend As ColorBlend
  164.  
  165.  
  166.     Sub New()
  167.         Blend = New ColorBlend
  168.         Blend.Colors = New Color() {Color.FromArgb(255, 165, 50), Color.FromArgb(255, 102, 0), Color.FromArgb(255, 102, 0), Color.FromArgb(255, 165, 50)}
  169.         Blend.Positions = New Single() {0.0F, 0.4F, 0.6F, 1.0F}
  170.     End Sub
  171.  
  172.     Protected Overrides Sub OnCreation()
  173.         If Not DesignMode Then
  174.             Dim T As New Threading.Thread(AddressOf MoveGlow)
  175.             T.IsBackground = True
  176.             T.Start()
  177.         End If
  178.     End Sub
  179.  
  180.     Private GlowPosition As Single = -1.0F
  181.     Private Sub MoveGlow()
  182.         While True
  183.             GlowPosition += 0.01F
  184.             If GlowPosition >= 1.0F Then GlowPosition = -1.0F
  185.             Invalidate()
  186.             Threading.Thread.Sleep(25)
  187.         End While
  188.     End Sub
  189.  
  190.     Private _Value As Integer
  191.     Property Value() As Integer
  192.         Get
  193.             Return _Value
  194.         End Get
  195.         Set(ByVal value As Integer)
  196.             If value > _Maximum Then value = _Maximum
  197.             If value < 0 Then value = 0
  198.  
  199.             _Value = value
  200.             Invalidate()
  201.         End Set
  202.     End Property
  203.  
  204.     Private _Maximum As Integer = 100
  205.     Property Maximum() As Integer
  206.         Get
  207.             Return _Maximum
  208.         End Get
  209.         Set(ByVal value As Integer)
  210.             If value < 1 Then value = 1
  211.             If _Value > value Then _Value = value
  212.  
  213.             _Maximum = value
  214.             Invalidate()
  215.         End Set
  216.     End Property
  217.  
  218.     Sub Increment(ByVal amount As Integer)
  219.         Value += amount
  220.     End Sub
  221.  
  222.     Protected Overrides Sub ColorHook()
  223.  
  224.     End Sub
  225.  
  226.     Private Progress As Integer
  227.     Protected Overrides Sub PaintHook()
  228.         DrawBorders(New Pen(Color.FromArgb(32, 32, 32)), 1)
  229.         G.FillRectangle(New SolidBrush(Color.FromArgb(50, 50, 50)), 0, 0, Width, 8)
  230.  
  231.         DrawGradient(Color.FromArgb(8, 8, 8), Color.FromArgb(23, 23, 23), 2, 2, Width - 4, Height - 4, 90.0F)
  232.  
  233.         Progress = CInt((_Value / _Maximum) * Width)
  234.  
  235.         If Not Progress = 0 Then
  236.             G.SetClip(New Rectangle(3, 3, Progress - 6, Height - 6))
  237.             G.FillRectangle(New SolidBrush(Color.FromArgb(255, 165, 50)), 0, 0, Progress, Height)
  238.  
  239.             DrawGradient(Blend, CInt(GlowPosition * Progress), 0, Progress, Height, 0.0F)
  240.             DrawBorders(New Pen(Color.FromArgb(15, Color.White)), 3, 3, Progress - 6, Height - 6)
  241.  
  242.             G.FillRectangle(New SolidBrush(Color.FromArgb(13, Color.White)), 3, 3, Width - 6, 5)
  243.  
  244.             G.ResetClip()
  245.         End If
  246.  
  247.         DrawBorders(Pens.Black, 2)
  248.         DrawBorders(Pens.Black)
  249.     End Sub
  250. End Class
  251.  
  252. '------------------
  253. 'Creator: aeonhack
  254. 'Site: elitevs.net
  255. 'Created: 10/25/2011
  256. 'Changed: 10/25/2011
  257. 'Version: 1.0.0
  258. 'Theme Base: 1.5.3
  259. '------------------
  260. Class ErosionGroupBox
  261.     Inherits ThemeContainer153
  262.  
  263.     Sub New()
  264.         ControlMode = True
  265.         Header = 26
  266.     End Sub
  267.  
  268.     Protected Overrides Sub ColorHook()
  269.  
  270.     End Sub
  271.  
  272.     Protected Overrides Sub PaintHook()
  273.         G.Clear(Color.FromArgb(24, 24, 24))
  274.  
  275.         DrawGradient(Color.FromArgb(255, 165, 0), Color.FromArgb(255, 102, 10), 5, 5, Width - 10, 26)
  276.         G.DrawLine(New Pen(Color.FromArgb(20, Color.White)), 7, 7, Width - 8, 7)
  277.  
  278.         DrawBorders(Pens.Black, 5, 5, Width - 10, 26, 1)
  279.         DrawBorders(New Pen(Color.FromArgb(36, 36, 36)), 5, 5, Width - 10, 26)
  280.  
  281.         '???
  282.         DrawBorders(New Pen(Color.FromArgb(8, 8, 8)), 5, 34, Width - 10, Height - 39, 1)
  283.         DrawBorders(New Pen(Color.FromArgb(36, 36, 36)), 5, 34, Width - 10, Height - 39)
  284.  
  285.         DrawBorders(New Pen(Color.FromArgb(36, 36, 36)), 1)
  286.         DrawBorders(Pens.Black)
  287.  
  288.         G.DrawLine(New Pen(Color.FromArgb(48, 48, 48)), 1, 1, Width - 2, 1)
  289.  
  290.         DrawText(Brushes.White, HorizontalAlignment.Left, 9, 5)
  291.     End Sub
  292. End Class
  293.  
  294. '------------------
  295. 'Creator: aeonhack
  296. 'Site: elitevs.net
  297. 'Created: 10/25/2011
  298. 'Changed: 10/25/2011
  299. 'Version: 1.0.0
  300. 'Theme Base: 1.5.3
  301. '------------------
  302. Class ErosionSeperator
  303.     Inherits ThemeControl153
  304.  
  305.     Private _Orientation As Orientation
  306.     Property Orientation() As Orientation
  307.         Get
  308.             Return _Orientation
  309.         End Get
  310.         Set(ByVal value As Orientation)
  311.             _Orientation = value
  312.  
  313.             If value = Windows.Forms.Orientation.Vertical Then
  314.                 LockHeight = 0
  315.                 LockWidth = 14
  316.             Else
  317.                 LockHeight = 14
  318.                 LockWidth = 0
  319.             End If
  320.  
  321.             Invalidate()
  322.         End Set
  323.     End Property
  324.  
  325.     Sub New()
  326.         Transparent = True
  327.         BackColor = Color.Transparent
  328.  
  329.         LockHeight = 14
  330.     End Sub
  331.  
  332.     Protected Overrides Sub ColorHook()
  333.  
  334.     End Sub
  335.  
  336.     Protected Overrides Sub PaintHook()
  337.         G.Clear(BackColor)
  338.  
  339.         Dim BL1, BL2 As New ColorBlend
  340.         BL1.Positions = New Single() {0.0F, 0.15F, 0.85F, 1.0F}
  341.         BL2.Positions = New Single() {0.0F, 0.15F, 0.5F, 0.85F, 1.0F}
  342.  
  343.         BL1.Colors = New Color() {Color.Transparent, Color.Black, Color.Black, Color.Transparent}
  344.         BL2.Colors = New Color() {Color.Transparent, Color.FromArgb(255, 165, 0), Color.FromArgb(255, 165, 0), Color.FromArgb(255, 165, 0), Color.Transparent}
  345.  
  346.         If _Orientation = Windows.Forms.Orientation.Vertical Then
  347.             DrawGradient(BL1, 6, 0, 1, Height)
  348.             DrawGradient(BL2, 7, 0, 1, Height)
  349.         Else
  350.             DrawGradient(BL1, 0, 6, Width, 1, 0.0F)
  351.             DrawGradient(BL2, 0, 7, Width, 1, 0.0F)
  352.         End If
  353.  
  354.     End Sub
  355.  
  356. End Class
Advertisement
Add Comment
Please, Sign In to add comment