Advertisement
Guest User

Untitled

a guest
Jun 26th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.50 KB | None | 0 0
  1. Imports System, System.Collections
  2. Imports System.Drawing, System.Drawing.Drawing2D
  3. Imports System.ComponentModel, System.Windows.Forms
  4.  
  5. '------------------
  6. 'Creator: aeonhack
  7. 'Site: elitevs.net
  8. 'Created: 7/8/2011
  9. 'Changed: 11/2/2011
  10. 'Version: 1.2.0
  11. 'Theme Base: 1.5.3
  12. '------------------
  13. Class DeumosTheme
  14. Inherits ThemeContainer153
  15.  
  16.  
  17. Private _HeaderOffset As Integer = 1
  18. Property HeaderOffset() As Integer
  19. Get
  20. Return _HeaderOffset
  21. End Get
  22. Set(ByVal value As Integer)
  23. If value < 0 OrElse value > 2 Then Return
  24.  
  25. _HeaderOffset = value
  26. Invalidate()
  27. End Set
  28. End Property
  29.  
  30.  
  31. Private Blend As ColorBlend
  32.  
  33. Sub New()
  34. Header = 24
  35. TransparencyKey = Color.Fuchsia
  36.  
  37. Path = New GraphicsPath
  38.  
  39. Blend = New ColorBlend
  40. Blend.Positions = New Single() {0, 0.4F, 0.6F, 1}
  41.  
  42. SetColor("BackColor", 14, 14, 14)
  43. SetColor("CornerGradient1", 48, 48, 48)
  44. SetColor("CornerGradient2", 4, 4, 4)
  45. SetColor("TextShadow", Color.Black)
  46. SetColor("Text", Color.White)
  47. SetColor("BorderHighlight", 26, Color.White)
  48. SetColor("Border", 45, 45, 45)
  49. SetColor("Outline", Color.Black)
  50. SetColor("CornerHighlight", 15, Color.White)
  51. SetColor("TitleShine", 100, 100, 100)
  52. SetColor("TitleGloss", 42, Color.White)
  53. SetColor("CornerGloss", 15, Color.White)
  54. SetColor("TitleGradient1", 14, 14, 14)
  55. SetColor("TitleGradient2", 41, 41, 41)
  56.  
  57. BackColor = Color.FromArgb(14, 14, 14)
  58. End Sub
  59.  
  60. Protected Overrides Sub ColorHook()
  61. Blend.Colors = New Color() {GetColor("TitleGradient1"), GetColor("TitleGradient2"), GetColor("TitleGradient2"), GetColor("TitleGradient1")}
  62.  
  63. C1 = GetColor("BackColor")
  64. C2 = GetColor("CornerGradient1")
  65. C3 = GetColor("CornerGradient2")
  66.  
  67. P1 = New Pen(GetColor("Border"), 8)
  68. P1.Alignment = PenAlignment.Inset
  69.  
  70. P2 = New Pen(GetColor("Outline"))
  71. P3 = New Pen(GetColor("CornerHighlight"), 2)
  72. P4 = New Pen(GetColor("TitleShine"))
  73. P5 = New Pen(GetColor("BorderHighlight"))
  74.  
  75. B1 = New SolidBrush(GetColor("TitleGloss"))
  76. B2 = New SolidBrush(GetColor("CornerGloss"))
  77. B3 = New SolidBrush(GetColor("TextShadow"))
  78. B4 = New SolidBrush(GetColor("Text"))
  79.  
  80. BackColor = C1
  81. End Sub
  82.  
  83. Private C1, C2, C3 As Color
  84. Private P1, P2, P3, P4, P5 As Pen
  85. Private B1, B2, B3, B4 As SolidBrush
  86.  
  87. Private R1 As Rectangle
  88. Private G1 As LinearGradientBrush
  89.  
  90. Protected Overrides Sub PaintHook()
  91. 'Draw background
  92. G.Clear(C1)
  93. G.FillRectangle(Brushes.Fuchsia, 0, 0, Width, 3)
  94.  
  95. 'Draw border
  96. DrawBorders(P1, 0, 17, Width + 1, Height - 16) 'Border
  97.  
  98. 'Draw outline
  99. DrawBorders(P5, 1, 23, Width - 2, Height - 24)
  100. DrawBorders(P2, 0, 24, Width, Height - 24) 'InnerOutline
  101. DrawBorders(P2, 7, 23, Width - 14, Height - 30) 'OuterOutline
  102.  
  103. 'Draw title gradient
  104. R1 = New Rectangle(30, _HeaderOffset, Width - 67, 24 - _HeaderOffset)
  105. G1 = New LinearGradientBrush(R1, Color.Empty, Color.Empty, 0.0F)
  106. G1.InterpolationColors = Blend
  107. G.FillRectangle(G1, R1)
  108.  
  109. 'Draw title gloss
  110. G.FillRectangle(B1, 30, _HeaderOffset, Width - 67, 12 - _HeaderOffset)
  111. G.DrawLine(P4, 30, _HeaderOffset + 1, Width - 67, _HeaderOffset + 1)
  112.  
  113. 'Draw title outline
  114. G.DrawLine(P2, 30, _HeaderOffset, Width - 67, _HeaderOffset) 'TitleOutline
  115.  
  116. 'Draw corner gradient
  117. G.SetClip(Path)
  118. R1 = New Rectangle(0, 0, Width, 24)
  119. G1 = New LinearGradientBrush(R1, C2, C3, 90S)
  120. G.FillRectangle(G1, R1)
  121.  
  122. 'Draw corner gloss
  123. G.FillRectangle(B2, 0, 0, Width, 11)
  124. G.DrawPath(P3, PathClone)
  125. G.ResetClip()
  126.  
  127. 'Draw corner outline
  128. G.DrawPath(P2, Path) 'CornerOutline
  129.  
  130. 'Draw title elements
  131. DrawText(B3, HorizontalAlignment.Center, -21, _HeaderOffset + 1)
  132. DrawText(B4, HorizontalAlignment.Center, -20, _HeaderOffset)
  133. DrawImage(HorizontalAlignment.Left, 11, 0)
  134. End Sub
  135.  
  136. Protected Overrides Sub OnCreation()
  137. Parent.MinimumSize = New Size(120, 80)
  138. End Sub
  139.  
  140. Private Path, PathClone As GraphicsPath
  141. Protected Overrides Sub OnResize(ByVal e As EventArgs)
  142. Path.Reset()
  143.  
  144. Path.AddLine(3, 0, 31, 0)
  145. Path.AddLine(55, 24, 0, 24)
  146. Path.AddLine(0, 24, 0, 3)
  147. Path.CloseFigure()
  148.  
  149. Path.AddLine(Width - 68, 0, Width - 4, 0)
  150. Path.AddLine(Width - 1, 3, Width - 1, 24)
  151. Path.AddLine(Width - 1, 24, Width - 92, 24)
  152. Path.CloseFigure()
  153.  
  154. PathClone = DirectCast(Path.Clone, GraphicsPath)
  155. PathClone.Widen(Pens.Black)
  156.  
  157. MyBase.OnResize(e)
  158. End Sub
  159.  
  160. End Class
  161.  
  162. '------------------
  163. 'Creator: aeonhack
  164. 'Site: elitevs.net
  165. 'Created: 7/8/2011
  166. 'Changed: 8/13/2011
  167. 'Version: 1.2.0
  168. 'Theme Base: 1.5.3
  169. '------------------
  170. Class DeumosButton
  171. Inherits ThemeControl153
  172.  
  173. Sub New()
  174. SetColor("Back", 14, 14, 14)
  175. SetColor("DownGradient1", 14, 14, 14)
  176. SetColor("DownGradient2", 41, 41, 41)
  177. SetColor("OverShine", 5, Color.White)
  178. SetColor("GlossGradient1", 30, Color.White)
  179. SetColor("GlossGradient2", 5, Color.White)
  180. SetColor("Highlight1", 62, 62, 62)
  181. SetColor("Highlight2", 15, Color.White)
  182. SetColor("Border", Color.Black)
  183. SetColor("Corners", 16, 16, 16)
  184. SetColor("Text", Color.White)
  185. End Sub
  186.  
  187. Protected Overrides Sub ColorHook()
  188. C1 = GetColor("Back")
  189. C2 = GetColor("DownGradient1")
  190. C3 = GetColor("DownGradient2")
  191. C4 = GetColor("GlossGradient1")
  192. C5 = GetColor("GlossGradient2")
  193. C6 = GetColor("Corners")
  194.  
  195. B1 = New SolidBrush(GetColor("OverShine"))
  196. B2 = New SolidBrush(GetColor("Text"))
  197.  
  198. P1 = New Pen(GetColor("Highlight1"))
  199. P2 = New Pen(GetColor("Highlight2"))
  200. P3 = New Pen(GetColor("Border"))
  201. End Sub
  202.  
  203. Private C1, C2, C3, C4, C5, C6 As Color
  204. Private B1, B2 As SolidBrush
  205. Private P1, P2, P3 As Pen
  206.  
  207. Protected Overrides Sub PaintHook()
  208. G.Clear(C1)
  209.  
  210. If State = MouseState.Down Then
  211. DrawGradient(C2, C3, 0, 0, Width, Height, 90S)
  212. End If
  213.  
  214. If State = MouseState.Over Then
  215. G.FillRectangle(B1, ClientRectangle)
  216. End If
  217.  
  218. DrawGradient(C4, C5, 0, 0, Width, Height \ 2, 90S)
  219.  
  220. G.DrawLine(P1, 0, 1, Width, 1)
  221. DrawBorders(P2, ClientRectangle, 1)
  222.  
  223. DrawBorders(P3, ClientRectangle)
  224.  
  225. DrawCorners(C6, New Rectangle(1, 1, Width - 2, Height - 2))
  226. DrawCorners(BackColor, ClientRectangle)
  227.  
  228. DrawText(B2, HorizontalAlignment.Center, 0, 0)
  229. End Sub
  230.  
  231. End Class
  232.  
  233. '------------------
  234. 'Creator: aeonhack
  235. 'Site: elitevs.net
  236. 'Created: 8/13/2011
  237. 'Changed: 11/2/2011
  238. 'Version: 1.2.0
  239. 'Theme Base: 1.5.3
  240. '------------------
  241. <DefaultEvent("CheckedChanged")>
  242. Class DeumosCheckBox
  243. Inherits ThemeControl153
  244.  
  245. Sub New()
  246. LockHeight = 16
  247.  
  248. SetColor("Border", 26, 26, 26)
  249. SetColor("Gloss1", 35, Color.White)
  250. SetColor("Gloss2", 5, Color.White)
  251. SetColor("Checked1", Color.Transparent)
  252. SetColor("Checked2", 40, Color.White)
  253. SetColor("Unchecked1", 8, 8, 8)
  254. SetColor("Unchecked2", 16, 16, 16)
  255. SetColor("Glow", 5, Color.White)
  256. SetColor("Text", Color.White)
  257. SetColor("InnerOutline", Color.Black)
  258. SetColor("OuterOutline", Color.Black)
  259. End Sub
  260.  
  261. Private C1, C2, C3, C4, C5, C6 As Color
  262. Private P1, P2, P3 As Pen
  263. Private B1, B2 As SolidBrush
  264.  
  265. Protected Overrides Sub ColorHook()
  266. C1 = GetColor("Gloss1")
  267. C2 = GetColor("Gloss2")
  268. C3 = GetColor("Checked1")
  269. C4 = GetColor("Checked2")
  270. C5 = GetColor("Unchecked1")
  271. C6 = GetColor("Unchecked2")
  272.  
  273. P1 = New Pen(GetColor("Border"))
  274. P2 = New Pen(GetColor("InnerOutline"))
  275. P3 = New Pen(GetColor("OuterOutline"))
  276.  
  277. B1 = New SolidBrush(GetColor("Glow"))
  278. B2 = New SolidBrush(GetColor("Text"))
  279. End Sub
  280.  
  281. Protected Overrides Sub PaintHook()
  282. G.Clear(BackColor)
  283.  
  284. DrawBorders(P1, 0, 0, _Field, _Field, 1)
  285. DrawGradient(C1, C2, 0, 0, _Field, _Field \ 2)
  286.  
  287. If _Checked Then
  288. DrawGradient(C3, C4, 2, 2, _Field - 4, _Field - 4)
  289. Else
  290. DrawGradient(C5, C6, 2, 2, _Field - 4, _Field - 4, 90)
  291. End If
  292.  
  293. If State = MouseState.Over Then
  294. G.FillRectangle(B1, 0, 0, _Field, _Field)
  295. End If
  296.  
  297. DrawText(B2, HorizontalAlignment.Left, _Field + 3, 0)
  298.  
  299. DrawBorders(P2, 0, 0, _Field, _Field, 2)
  300. DrawBorders(P3, 0, 0, _Field, _Field)
  301.  
  302. DrawCorners(BackColor, 0, 0, _Field, _Field)
  303. End Sub
  304.  
  305. Private _Field As Integer = 16
  306. Property Field() As Integer
  307. Get
  308. Return _Field
  309. End Get
  310. Set(ByVal value As Integer)
  311. If value < 4 Then Return
  312. _Field = value
  313. LockHeight = value
  314. Invalidate()
  315. End Set
  316. End Property
  317.  
  318. Private _Checked As Boolean
  319. Property Checked() As Boolean
  320. Get
  321. Return _Checked
  322. End Get
  323. Set(ByVal value As Boolean)
  324. _Checked = value
  325. Invalidate()
  326. End Set
  327. End Property
  328.  
  329. Protected Overrides Sub OnMouseDown(ByVal e As System.Windows.Forms.MouseEventArgs)
  330. _Checked = Not _Checked
  331. RaiseEvent CheckedChanged(Me)
  332. MyBase.OnMouseDown(e)
  333. End Sub
  334.  
  335. Event CheckedChanged(ByVal sender As Object)
  336.  
  337. End Class
  338.  
  339. '------------------
  340. 'Creator: aeonhack
  341. 'Site: elitevs.net
  342. 'Created: 8/17/2011
  343. 'Changed: 11/2/2011
  344. 'Version: 1.2.0
  345. 'Theme Base: 1.5.3
  346. '------------------
  347. <DefaultEvent("CheckedChanged")>
  348. Class DeumosRadioButton
  349. Inherits ThemeControl153
  350.  
  351. Sub New()
  352. LockHeight = 16
  353.  
  354. SetColor("Gloss1", 38, Color.White)
  355. SetColor("Gloss2", 5, Color.White)
  356. SetColor("Checked1", Color.Transparent)
  357. SetColor("Checked2", 40, Color.White)
  358. SetColor("Unchecked1", 8, 8, 8)
  359. SetColor("Unchecked2", 16, 16, 16)
  360. SetColor("Glow", 5, Color.White)
  361. SetColor("Text", Color.White)
  362. SetColor("InnerOutline", Color.Black)
  363. SetColor("OuterOutline", 15, Color.White)
  364. End Sub
  365.  
  366. Protected Overrides Sub ColorHook()
  367. C1 = GetColor("Gloss1")
  368. C2 = GetColor("Gloss2")
  369. C3 = GetColor("Checked1")
  370. C4 = GetColor("Checked2")
  371. C5 = GetColor("Unchecked1")
  372. C6 = GetColor("Unchecked2")
  373.  
  374. B1 = New SolidBrush(GetColor("Glow"))
  375. B2 = New SolidBrush(GetColor("Text"))
  376.  
  377. P1 = New Pen(GetColor("InnerOutline"))
  378. P2 = New Pen(GetColor("OuterOutline"))
  379. End Sub
  380.  
  381. Private C1, C2, C3, C4, C5, C6 As Color
  382. Private P1, P2 As Pen
  383. Private B1, B2 As SolidBrush
  384.  
  385. Private R1, R2 As Rectangle
  386. Private G1 As LinearGradientBrush
  387.  
  388. Protected Overrides Sub PaintHook()
  389. G.Clear(BackColor)
  390.  
  391. G.SmoothingMode = SmoothingMode.HighQuality
  392. R1 = New Rectangle(4, 2, _Field - 8, (_Field \ 2) - 1)
  393. R2 = New Rectangle(4, 2, _Field - 8, (_Field \ 2))
  394.  
  395. G1 = New LinearGradientBrush(R2, C1, C2, 90S)
  396. G.FillEllipse(G1, R1)
  397.  
  398. R1 = New Rectangle(2, 2, _Field - 4, _Field - 4)
  399.  
  400. If _Checked Then
  401. G1 = New LinearGradientBrush(R1, C3, C4, 90S)
  402. Else
  403. G1 = New LinearGradientBrush(R1, C5, C6, 90S)
  404. End If
  405. G.FillEllipse(G1, R1)
  406.  
  407. If State = MouseState.Over Then
  408. R1 = New Rectangle(2, 2, _Field - 4, _Field - 4)
  409. G.FillEllipse(B1, R1)
  410. End If
  411.  
  412. DrawText(B2, HorizontalAlignment.Left, _Field + 3, 0)
  413.  
  414. G.DrawEllipse(P1, 2, 2, _Field - 4, _Field - 4)
  415. G.DrawEllipse(P2, 1, 1, _Field - 2, _Field - 2)
  416.  
  417. End Sub
  418.  
  419. Private _Field As Integer = 16
  420. Property Field() As Integer
  421. Get
  422. Return _Field
  423. End Get
  424. Set(ByVal value As Integer)
  425. If value < 4 Then Return
  426. _Field = value
  427. LockHeight = value
  428. Invalidate()
  429. End Set
  430. End Property
  431.  
  432. Private _Checked As Boolean
  433. Property Checked() As Boolean
  434. Get
  435. Return _Checked
  436. End Get
  437. Set(ByVal value As Boolean)
  438. _Checked = value
  439. InvalidateControls()
  440. RaiseEvent CheckedChanged(Me)
  441. Invalidate()
  442. End Set
  443. End Property
  444.  
  445. Protected Overrides Sub OnMouseDown(ByVal e As System.Windows.Forms.MouseEventArgs)
  446. If Not _Checked Then Checked = True
  447. MyBase.OnMouseDown(e)
  448. End Sub
  449.  
  450. Event CheckedChanged(ByVal sender As Object)
  451.  
  452. Protected Overrides Sub OnCreation()
  453. InvalidateControls()
  454. End Sub
  455.  
  456. Private Sub InvalidateControls()
  457. If Not IsHandleCreated OrElse Not _Checked Then Return
  458.  
  459. For Each C As Control In Parent.Controls
  460. If C IsNot Me AndAlso TypeOf C Is DeumosRadioButton Then
  461. DirectCast(C, DeumosRadioButton).Checked = False
  462. End If
  463. Next
  464. End Sub
  465.  
  466. End Class
  467.  
  468. '------------------
  469. 'Creator: aeonhack
  470. 'Site: elitevs.net
  471. 'Created: 8/13/2011
  472. 'Changed: 10/7/2011
  473. 'Version: 1.2.0
  474. 'Theme Base: 1.5.3
  475. '------------------
  476. Class DeumosGroupBox
  477. Inherits ThemeContainer153
  478.  
  479. Sub New()
  480. ControlMode = True
  481.  
  482. SetColor("Back", 14, 14, 14)
  483. SetColor("MainFill", 20, 20, 20)
  484. SetColor("MainOutline1", 32, 32, 32)
  485. SetColor("MainOutline2", Color.Black)
  486. SetColor("TitleShadow", 50, Color.Black)
  487. SetColor("TitleFill", 20, 20, 20)
  488. SetColor("Text", Color.White)
  489. SetColor("TitleOutline1", 32, 32, 32)
  490. SetColor("TitleOutline2", Color.Black)
  491.  
  492. BackColor = Color.FromArgb(20, 20, 20)
  493. End Sub
  494.  
  495. Protected Overrides Sub ColorHook()
  496. C1 = GetColor("Back")
  497.  
  498. B1 = New SolidBrush(GetColor("MainFill"))
  499. B2 = New SolidBrush(GetColor("TitleFill"))
  500. B3 = New SolidBrush(GetColor("Text"))
  501.  
  502. P1 = New Pen(GetColor("MainOutline1"))
  503. P2 = New Pen(GetColor("MainOutline2"))
  504. P3 = New Pen(GetColor("TitleShadow"))
  505. P4 = New Pen(GetColor("TitleOutline1"))
  506. P5 = New Pen(GetColor("TitleOutline2"))
  507.  
  508. BackColor = GetColor("MainFill")
  509. End Sub
  510.  
  511. Private C1 As Color
  512. Private B1, B2, B3 As SolidBrush
  513. Private P1, P2, P3, P4, P5 As Pen
  514.  
  515. Private S1 As Size
  516. Private R1 As Rectangle
  517.  
  518. Protected Overrides Sub PaintHook()
  519. G.Clear(C1)
  520.  
  521. If Me.Text.Length = 0 Then
  522. G.FillRectangle(B1, ClientRectangle)
  523. DrawBorders(P1, 1)
  524. DrawBorders(P2)
  525. Else
  526. G.FillRectangle(B1, 0, 13, Width, Height - 13)
  527. DrawBorders(P1, 0, 13, Width, Height - 13, 1)
  528. DrawBorders(P2, 0, 13, Width, Height - 13)
  529.  
  530.  
  531. S1 = Measure()
  532. R1 = New Rectangle(8, 0, S1.Width + 16, 26)
  533.  
  534. DrawBorders(P3, 7, 0, R1.Width + 1, 27)
  535.  
  536. G.FillRectangle(B2, R1)
  537.  
  538. DrawText(B3, Center(R1, S1))
  539.  
  540. DrawBorders(P4, R1, 1)
  541. DrawBorders(P5, R1)
  542.  
  543. DrawCorners(C1, 0, 13, Width, Height - 13)
  544. End If
  545.  
  546. End Sub
  547.  
  548. End Class
  549.  
  550. '------------------
  551. 'Creator: aeonhack
  552. 'Site: elitevs.net
  553. 'Created: 11/2/2011
  554. 'Changed: 11/2/2011
  555. 'Version: 1.2.0
  556. 'Theme Base: 1.5.3
  557. '------------------
  558. <DefaultEvent("TextChanged")>
  559. Class DeumosTextBox
  560. Inherits ThemeControl153
  561.  
  562. Private _TextAlign As HorizontalAlignment = HorizontalAlignment.Left
  563. Property TextAlign() As HorizontalAlignment
  564. Get
  565. Return _TextAlign
  566. End Get
  567. Set(ByVal value As HorizontalAlignment)
  568. _TextAlign = value
  569. If Base IsNot Nothing Then
  570. Base.TextAlign = value
  571. End If
  572. End Set
  573. End Property
  574.  
  575. Private _MaxLength As Integer = 32767
  576. Property MaxLength() As Integer
  577. Get
  578. Return _MaxLength
  579. End Get
  580. Set(ByVal value As Integer)
  581. _MaxLength = value
  582. If Base IsNot Nothing Then
  583. Base.MaxLength = value
  584. End If
  585. End Set
  586. End Property
  587.  
  588. Private _ReadOnly As Boolean
  589. Property [ReadOnly]() As Boolean
  590. Get
  591. Return _ReadOnly
  592. End Get
  593. Set(ByVal value As Boolean)
  594. _ReadOnly = value
  595. If Base IsNot Nothing Then
  596. Base.ReadOnly = value
  597. End If
  598. End Set
  599. End Property
  600.  
  601. Private _UseSystemPasswordChar As Boolean
  602. Property UseSystemPasswordChar() As Boolean
  603. Get
  604. Return _UseSystemPasswordChar
  605. End Get
  606. Set(ByVal value As Boolean)
  607. _UseSystemPasswordChar = value
  608. If Base IsNot Nothing Then
  609. Base.UseSystemPasswordChar = value
  610. End If
  611. End Set
  612. End Property
  613.  
  614. Private _Multiline As Boolean
  615. Property Multiline() As Boolean
  616. Get
  617. Return _Multiline
  618. End Get
  619. Set(ByVal value As Boolean)
  620. _Multiline = value
  621. If Base IsNot Nothing Then
  622. Base.Multiline = value
  623.  
  624. If value Then
  625. LockHeight = 0
  626. Base.Height = Height - 11
  627. Else
  628. LockHeight = Base.Height + 11
  629. End If
  630. End If
  631. End Set
  632. End Property
  633.  
  634.  
  635. Overrides Property Text As String
  636. Get
  637. Return MyBase.Text
  638. End Get
  639. Set(ByVal value As String)
  640. MyBase.Text = value
  641. If Base IsNot Nothing Then
  642. Base.Text = value
  643. End If
  644. End Set
  645. End Property
  646.  
  647. Overrides Property Font As Font
  648. Get
  649. Return MyBase.Font
  650. End Get
  651. Set(ByVal value As Font)
  652. MyBase.Font = value
  653. If Base IsNot Nothing Then
  654. Base.Font = value
  655. Base.Location = New Point(3, 5)
  656. Base.Width = Width - 6
  657.  
  658. If Not _Multiline Then
  659. LockHeight = Base.Height + 11
  660. End If
  661. End If
  662. End Set
  663. End Property
  664.  
  665.  
  666. Protected Overrides Sub OnCreation()
  667. If Not Controls.Contains(Base) Then
  668. Controls.Add(Base)
  669. End If
  670. End Sub
  671.  
  672. Private Base As TextBox
  673. Sub New()
  674. Base = New TextBox
  675.  
  676. Base.Font = Font
  677. Base.Text = Text
  678. Base.MaxLength = _MaxLength
  679. Base.Multiline = _Multiline
  680. Base.ReadOnly = _ReadOnly
  681. Base.UseSystemPasswordChar = _UseSystemPasswordChar
  682.  
  683. Base.BorderStyle = BorderStyle.None
  684.  
  685. Base.Location = New Point(5, 5)
  686. Base.Width = Width - 10
  687.  
  688. If _Multiline Then
  689. Base.Height = Height - 11
  690. Else
  691. LockHeight = Base.Height + 11
  692. End If
  693.  
  694. AddHandler Base.TextChanged, AddressOf OnBaseTextChanged
  695. AddHandler Base.KeyDown, AddressOf OnBaseKeyDown
  696.  
  697.  
  698. SetColor("Text", Color.White)
  699. SetColor("Back", 7, 7, 7)
  700. SetColor("Border1", Color.Black)
  701. SetColor("Border2", 20, 20, 20)
  702. End Sub
  703.  
  704. Private C1 As Color
  705. Private P1, P2 As Pen
  706.  
  707. Protected Overrides Sub ColorHook()
  708. C1 = GetColor("Back")
  709.  
  710. P1 = GetPen("Border1")
  711. P2 = GetPen("Border2")
  712.  
  713. Base.ForeColor = GetColor("Text")
  714. Base.BackColor = C1
  715. End Sub
  716.  
  717. Protected Overrides Sub PaintHook()
  718. G.Clear(C1)
  719.  
  720. DrawBorders(P1, 1)
  721. DrawBorders(P2)
  722. End Sub
  723.  
  724.  
  725. Private Sub OnBaseTextChanged(ByVal s As Object, ByVal e As EventArgs)
  726. Text = Base.Text
  727. End Sub
  728.  
  729. Private Sub OnBaseKeyDown(ByVal s As Object, ByVal e As KeyEventArgs)
  730. If e.Control AndAlso e.KeyCode = Keys.A Then
  731. Base.SelectAll()
  732. e.SuppressKeyPress = True
  733. End If
  734. End Sub
  735.  
  736. Protected Overrides Sub OnResize(ByVal e As EventArgs)
  737. Base.Location = New Point(5, 5)
  738. Base.Width = Width - 10
  739.  
  740. If _Multiline Then
  741. Base.Height = Height - 11
  742. End If
  743.  
  744.  
  745. MyBase.OnResize(e)
  746. End Sub
  747.  
  748. End Class
  749.  
  750. '------------------
  751. 'Creator: aeonhack
  752. 'Site: elitevs.net
  753. 'Created: 11/2/2011
  754. 'Changed: 11/2/2011
  755. 'Version: 1.2.0
  756. 'Theme Base: 1.5.3
  757. '------------------
  758. Class DeumosProgressBar
  759. Inherits ThemeControl153
  760.  
  761. Private _Minimum As Integer
  762. Property Minimum() As Integer
  763. Get
  764. Return _Minimum
  765. End Get
  766. Set(ByVal value As Integer)
  767. If value < 0 Then
  768. Throw New Exception("Property value is not valid.")
  769. End If
  770.  
  771. _Minimum = value
  772. If value > _Value Then _Value = value
  773. If value > _Maximum Then _Maximum = value
  774. Invalidate()
  775. End Set
  776. End Property
  777.  
  778. Private _Maximum As Integer = 100
  779. Property Maximum() As Integer
  780. Get
  781. Return _Maximum
  782. End Get
  783. Set(ByVal value As Integer)
  784. If value < 0 Then
  785. Throw New Exception("Property value is not valid.")
  786. End If
  787.  
  788. _Maximum = value
  789. If value < _Value Then _Value = value
  790. If value < _Minimum Then _Minimum = value
  791. Invalidate()
  792. End Set
  793. End Property
  794.  
  795. Private _Value As Integer
  796. Property Value() As Integer
  797. Get
  798. Return _Value
  799. End Get
  800. Set(ByVal value As Integer)
  801. If value > _Maximum OrElse value < _Minimum Then
  802. Throw New Exception("Property value is not valid.")
  803. End If
  804.  
  805. _Value = value
  806. Invalidate()
  807. End Set
  808. End Property
  809.  
  810. Private Sub Increment(ByVal amount As Integer)
  811. Value += amount
  812. End Sub
  813.  
  814. Sub New()
  815. SetColor("Frame", 18, 18, 18)
  816. SetColor("Border1", Color.Black)
  817. SetColor("Border2", Color.Black)
  818. SetColor("Gloss1", 30, Color.White)
  819. SetColor("Gloss2", 5, Color.White)
  820. SetColor("Back1", 2, 2, 2)
  821. SetColor("Back2", 8, 8, 8)
  822. SetColor("Progress1", 38, 38, 38)
  823. SetColor("Progress2", 52, 52, 52)
  824. SetColor("ProgressShine", 16, Color.White)
  825. SetColor("ProgressGloss1", 32, Color.White)
  826. SetColor("ProgressGloss2", 12, Color.White)
  827. End Sub
  828.  
  829. Private C1, C2, C3, C4, C5, C6, C7, C8, C9 As Color
  830. Private P1, P2, P3 As Pen
  831.  
  832. Protected Overrides Sub ColorHook()
  833. C1 = GetColor("Frame")
  834. C2 = GetColor("Gloss1")
  835. C3 = GetColor("Gloss2")
  836. C4 = GetColor("Back1")
  837. C5 = GetColor("Back2")
  838. C6 = GetColor("Progress1")
  839. C7 = GetColor("Progress2")
  840. C8 = GetColor("ProgressGloss1")
  841. C9 = GetColor("ProgressGloss2")
  842.  
  843. P1 = GetPen("Border1")
  844. P2 = GetPen("Border2")
  845. P3 = GetPen("ProgressShine")
  846. End Sub
  847.  
  848. Private R1 As Rectangle
  849. Private I1 As Integer
  850.  
  851. Protected Overrides Sub PaintHook()
  852. G.Clear(C1)
  853. DrawGradient(C2, C3, 0, 0, Width, Height \ 2)
  854.  
  855. DrawGradient(C4, C5, 2, 2, Width - 4, Height - 4)
  856. DrawBorders(P1, 2)
  857.  
  858. I1 = CInt((_Value - _Minimum) / (_Maximum - _Minimum) * (Width - 6))
  859.  
  860. If Not I1 = 0 Then
  861. R1 = New Rectangle(3, 3, I1, Height - 6)
  862.  
  863. DrawGradient(C6, C7, R1, 35.0F)
  864. DrawBorders(P3, R1)
  865.  
  866. DrawGradient(C8, C9, 3, 3, I1, Height \ 2 - 3)
  867. End If
  868.  
  869. DrawBorders(P2)
  870. DrawCorners(BackColor)
  871. End Sub
  872.  
  873. End Class
  874.  
  875. '------------------
  876. 'Creator: aeonhack
  877. 'Site: elitevs.net
  878. 'Created: 10/7/2011
  879. 'Changed: 10/7/2011
  880. 'Version: 1.2.0
  881. 'Theme Base: 1.5.3
  882. '------------------
  883. Class DeumosSeperator
  884. Inherits ThemeControl153
  885.  
  886.  
  887. Private _Orientation As Orientation
  888. Property Orientation() As Orientation
  889. Get
  890. Return _Orientation
  891. End Get
  892. Set(ByVal value As Orientation)
  893. _Orientation = value
  894.  
  895. If value = System.Windows.Forms.Orientation.Vertical Then
  896. LockHeight = 0
  897. LockWidth = 14
  898. Else
  899. LockHeight = 14
  900. LockWidth = 0
  901. End If
  902.  
  903. Invalidate()
  904. End Set
  905. End Property
  906.  
  907.  
  908. Sub New()
  909. LockHeight = 14
  910.  
  911. SetColor("Line1", Color.Black)
  912. SetColor("Line2", 22, 22, 22)
  913. End Sub
  914.  
  915. Private P1, P2 As Pen
  916.  
  917. Protected Overrides Sub ColorHook()
  918. P1 = GetPen("Line1")
  919. P2 = GetPen("Line2")
  920. End Sub
  921.  
  922. Protected Overrides Sub PaintHook()
  923. G.Clear(BackColor)
  924.  
  925. If _Orientation = System.Windows.Forms.Orientation.Vertical Then
  926. G.DrawLine(P1, 6, 0, 6, Height)
  927. G.DrawLine(P2, 7, 0, 7, Height)
  928. Else
  929. G.DrawLine(P1, 0, 6, Width, 6)
  930. G.DrawLine(P2, 0, 7, Width, 7)
  931. End If
  932.  
  933. End Sub
  934. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement