Japt

Drone Theme - VB.NET

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