Advertisement
Astekk

Drone Theme c#

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