Advertisement
NMT_VadRe

Zerp v1.1.0

Jan 12th, 2020
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.18 KB | None | 0 0
  1. //Code by Knuthulhu
  2. //
  3. //Please don't hate on my code.
  4. //
  5. //I was very drunk when i wrote this
  6.  
  7.  
  8. using System;
  9. using System.Collections.Generic;
  10. using System.ComponentModel;
  11. using System.Data;
  12. using System.Diagnostics;
  13. using System.Drawing;
  14. using System.Linq;
  15. using System.Net;
  16. using System.Text;
  17. using System.Threading.Tasks;
  18. using System.Windows.Forms;
  19. using Newtonsoft.Json;
  20. using SourceQuery;
  21. using Design_Dashboard_Modern.Properties;
  22. using System.IO;
  23. using Microsoft.VisualBasic;
  24.  
  25. namespace Design_Dashboard_Modern
  26. {
  27. public partial class Form1 : Form
  28. {
  29. public Form1()
  30. {
  31. InitializeComponent();
  32. }
  33.  
  34. string bind_command;
  35. string bind_key;
  36.  
  37. string baseURL = "http://fastdl.friendlyplayers.com/siggen/darkrpbase/";
  38. string apiURL = "https://api.steamid.uk/convert.php?api=GET UR OWN API KEY";
  39.  
  40. private List<string> LATEST_VERSION_STRING = new List<string>();
  41. private string NGUTest = webclient.DownloadString("https://pastebin.com/raw/gh5DkDpG");
  42.  
  43. public static WebClient webclient = new WebClient();
  44.  
  45. public string SELECTED_PRINTER = "Normal Printer";
  46. public double overallTotalAmmount;
  47. public double SELECTED_BOOSTER_MULTIPLIER = 1;
  48. public double SELECTED_PRINTER_PROFIT = 35928;
  49. public double EARNINGS;
  50.  
  51. private void Salir_Click(object sender, EventArgs e)
  52. {
  53. Application.Exit();
  54. }
  55.  
  56. private void Minimizar_Click(object sender, EventArgs e)
  57. {
  58. WindowState = FormWindowState.Minimized;
  59. }
  60.  
  61. private void MenuSidebar_Click(object sender, EventArgs e)
  62. {
  63. if(Sidebar.Width == 270)
  64. {
  65. Sidebar.Visible = false;
  66. Sidebar.Width = 68;
  67. SidebarWrapper.Width = 90;
  68. LineaSidebar.Width = 52;
  69. AnimacionSidebar.Show(Sidebar);
  70. }
  71. else
  72. {
  73. Sidebar.Visible = false;
  74. Sidebar.Width = 270;
  75. SidebarWrapper.Width = 300;
  76. LineaSidebar.Width = 252;
  77. AnimacionSidebarBack.Show(Sidebar);
  78. }
  79. }
  80.  
  81. private void Temporizador_Tick(object sender, EventArgs e)
  82. {
  83. Temporizador.Stop();
  84.  
  85. }
  86.  
  87. private void bunifuFlatButton1_Click(object sender, EventArgs e)
  88. {
  89. label1.Text = "Dashboard";
  90. PanelDash.Show();
  91. PanelServers.Hide();
  92. PanelBinds.Hide();
  93. PanelAutoclicker.Hide();
  94. PanelRPCash.Hide();
  95. PanelCalculator.Hide();
  96. label24.Hide();
  97. PanelSettings.Hide();
  98. }
  99.  
  100. private void bunifuFlatButton2_Click(object sender, EventArgs e)
  101. {
  102. label1.Text = "Servers";
  103. PanelDash.Hide();
  104. PanelServers.Show();
  105. PanelBinds.Hide();
  106. PanelAutoclicker.Hide();
  107. PanelRPCash.Hide();
  108. PanelCalculator.Hide();
  109. label24.Hide();
  110. PanelSettings.Hide();
  111. }
  112.  
  113. private void pictureBox1_Click(object sender, EventArgs e)
  114. {
  115. Process.Start("https://zarpgaming.com/");
  116. }
  117.  
  118. private void label5_Click(object sender, EventArgs e)
  119. {
  120.  
  121.  
  122. }
  123.  
  124. private void bunifuFlatButton6_Click(object sender, EventArgs e)
  125. {
  126. Process.Start("steam://connect/darkrp.zarpgaming.com:27015");//DarkRP 1
  127. }
  128.  
  129. private void bunifuFlatButton7_Click(object sender, EventArgs e)
  130. {
  131. Process.Start("steam://connect/usa.zarpgaming.com:27015");//DarkRP USA
  132. }
  133.  
  134. private void bunifuFlatButton8_Click(object sender, EventArgs e)
  135. {
  136. Process.Start("steam://connect/play.zarpgaming.com:27035");//dr
  137. }
  138.  
  139. private void bunifuFlatButton9_Click(object sender, EventArgs e)
  140. {
  141. Process.Start("steam://connect/play.zarpgaming.com:27017");//ttt
  142. }
  143.  
  144. private void bunifuFlatButton10_Click(object sender, EventArgs e)
  145. {
  146. Process.Start("steam://connect/play.zarpgaming.com:27019");//bhop
  147. }
  148.  
  149. private void bunifuFlatButton11_Click(object sender, EventArgs e)
  150. {
  151. Process.Start("steam://connect/play.zarpgaming.com:27030");//surf
  152. }
  153.  
  154. private void bunifuFlatButton12_Click(object sender, EventArgs e)
  155. {
  156. Process.Start("steam://connect/play.zarpgaming.com:27040");//ph
  157. }
  158.  
  159. private void bunifuFlatButton3_Click(object sender, EventArgs e)
  160. {
  161. label1.Text = "Binds";
  162. PanelDash.Hide();
  163. PanelServers.Hide();
  164. PanelBinds.Show();
  165. PanelAutoclicker.Hide();
  166. PanelRPCash.Hide();
  167. PanelCalculator.Hide();
  168. label24.Hide();
  169. PanelSettings.Hide();
  170. }
  171.  
  172. private void bunifuFlatButton4_Click(object sender, EventArgs e)
  173. {
  174. label1.Text = "Autoclicker";
  175. PanelDash.Hide();
  176. PanelServers.Hide();
  177. PanelBinds.Hide();
  178. PanelAutoclicker.Show();
  179. PanelRPCash.Hide();
  180. PanelCalculator.Hide();
  181. label24.Hide();
  182. PanelSettings.Hide();
  183. }
  184.  
  185. private void bunifuFlatButton5_Click(object sender, EventArgs e)
  186. {
  187. PanelDash.Hide();
  188. PanelServers.Hide();
  189. PanelBinds.Hide();
  190. PanelAutoclicker.Hide();
  191. PanelRPCash.Show();
  192. PanelCalculator.Hide();
  193. label1.Text = "DarkRP Cash Lookup";
  194. label24.Hide();
  195. PanelSettings.Hide();
  196. }
  197.  
  198. private void Form1_Load(object sender, EventArgs e)
  199. {
  200. PanelServers.Location = new Point(16, 24);
  201. PanelDash.Location = new Point(16, 24);
  202. PanelBinds.Location = new Point(16, 24);
  203. PanelAutoclicker.Location = new Point(16, 24);
  204. PanelRPCash.Location = new Point(16, 24);
  205. PanelCalculator.Location = new Point(16, 24);
  206. PanelSettings.Location = new Point(16, 24);
  207. PanelDash.Show();
  208. PanelServers.Hide();
  209. PanelBinds.Hide();
  210. PanelAutoclicker.Hide();
  211. PanelRPCash.Hide();
  212. PanelCalculator.Hide();
  213. label24.Hide();
  214. PanelSettings.Hide();
  215.  
  216. if (Settings.Default.light_mode == true)
  217. {
  218. Theme_Light();
  219. }
  220.  
  221. try
  222. {
  223. LATEST_VERSION_STRING.Add(NGUTest);
  224. string str1 = NGUTest;
  225. lblLatestVer.Text = str1;
  226. }
  227. catch
  228. {
  229. lblLatestVer.Text = "Error - can't communicate with server";
  230. }
  231. }
  232.  
  233. private void DropdownKeys_onItemSelected(object sender, EventArgs e)
  234. {
  235. if (DropdownKeys.selectedIndex == 0)
  236. {
  237. bind_key = "A";
  238. }
  239. else if (DropdownKeys.selectedIndex == 1)
  240. {
  241. bind_key = "B";
  242. }
  243. else if (DropdownKeys.selectedIndex == 2)
  244. {
  245. bind_key = "C";
  246. }
  247. else if (DropdownKeys.selectedIndex == 3)
  248. {
  249. bind_key = "D";
  250. }
  251. else if (DropdownKeys.selectedIndex == 4)
  252. {
  253. bind_key = "E";
  254. }
  255. else if (DropdownKeys.selectedIndex == 5)
  256. {
  257. bind_key = "F";
  258. }
  259. else if (DropdownKeys.selectedIndex == 6)
  260. {
  261. bind_key = "G";
  262. }
  263. else if (DropdownKeys.selectedIndex == 7)
  264. {
  265. bind_key = "H";
  266. }
  267. else if (DropdownKeys.selectedIndex == 8)
  268. {
  269. bind_key = "I";
  270. }
  271. else if (DropdownKeys.selectedIndex == 9)
  272. {
  273. bind_key = "J";
  274. }
  275. else if (DropdownKeys.selectedIndex == 10)
  276. {
  277. bind_key = "K";
  278. }
  279. else if (DropdownKeys.selectedIndex == 11)
  280. {
  281. bind_key = "L";
  282. }
  283. else if (DropdownKeys.selectedIndex == 12)
  284. {
  285. bind_key = "M";
  286. }
  287. else if (DropdownKeys.selectedIndex == 13)
  288. {
  289. bind_key = "N";
  290. }
  291. else if (DropdownKeys.selectedIndex == 14)
  292. {
  293. bind_key = "O";
  294. }
  295. else if (DropdownKeys.selectedIndex == 15)
  296. {
  297. bind_key = "P";
  298. }
  299. else if (DropdownKeys.selectedIndex == 16)
  300. {
  301. bind_key = "Q";
  302. }
  303. else if (DropdownKeys.selectedIndex == 17)
  304. {
  305. bind_key = "R";
  306. }
  307. else if (DropdownKeys.selectedIndex == 18)
  308. {
  309. bind_key = "S";
  310. }
  311. else if (DropdownKeys.selectedIndex == 19)
  312. {
  313. bind_key = "T";
  314. }
  315. else if (DropdownKeys.selectedIndex == 20)
  316. {
  317. bind_key = "U";
  318. }
  319. else if (DropdownKeys.selectedIndex == 21)
  320. {
  321. bind_key = "V";
  322. }
  323. else if (DropdownKeys.selectedIndex == 22)
  324. {
  325. bind_key = "W";
  326. }
  327. else if (DropdownKeys.selectedIndex == 23)
  328. {
  329. bind_key = "X";
  330. }
  331. else if (DropdownKeys.selectedIndex == 24)
  332. {
  333. bind_key = "Y";
  334. }
  335. else if (DropdownKeys.selectedIndex == 25)
  336. {
  337. bind_key = "Z";
  338. }
  339. else if (DropdownKeys.selectedIndex == 26)
  340. {
  341. bind_key = "Å";
  342. }
  343. else if (DropdownKeys.selectedIndex == 27)
  344. {
  345. bind_key = "Ä";
  346. }
  347. else if (DropdownKeys.selectedIndex == 28)
  348. {
  349. bind_key = "Ö";
  350. }
  351. else if (DropdownKeys.selectedIndex == 29)
  352. {
  353. bind_key = "1";
  354. }
  355. else if (DropdownKeys.selectedIndex == 30)
  356. {
  357. bind_key = "2";
  358. }
  359. else if (DropdownKeys.selectedIndex == 31)
  360. {
  361. bind_key = "3";
  362. }
  363. else if (DropdownKeys.selectedIndex == 32)
  364. {
  365. bind_key = "4";
  366. }
  367. else if (DropdownKeys.selectedIndex == 33)
  368. {
  369. bind_key = "5";
  370. }
  371. else if (DropdownKeys.selectedIndex == 34)
  372. {
  373. bind_key = "6";
  374. }
  375. else if (DropdownKeys.selectedIndex == 35)
  376. {
  377. bind_key = "7";
  378. }
  379. else if (DropdownKeys.selectedIndex == 36)
  380. {
  381. bind_key = "8";
  382. }
  383. else if (DropdownKeys.selectedIndex == 37)
  384. {
  385. bind_key = "9";
  386. }
  387. else if (DropdownKeys.selectedIndex == 38)
  388. {
  389. bind_key = "0";
  390. }
  391. else if (DropdownKeys.selectedIndex == 39)
  392. {
  393. bind_key = "KP_END";
  394. }
  395. else if (DropdownKeys.selectedIndex == 40)
  396. {
  397. bind_key = "KP_DOWNARROW";
  398. }
  399. else if (DropdownKeys.selectedIndex == 41)
  400. {
  401. bind_key = "KP_PGDN";
  402. }
  403. else if (DropdownKeys.selectedIndex == 42)
  404. {
  405. bind_key = "KP_LEFTARROW";
  406. }
  407. else if (DropdownKeys.selectedIndex == 43)
  408. {
  409. bind_key = "KP_5";
  410. }
  411. else if (DropdownKeys.selectedIndex == 44)
  412. {
  413. bind_key = "KP_RIGHTARROW";
  414. }
  415. else if (DropdownKeys.selectedIndex == 45)
  416. {
  417. bind_key = "KP_HOME";
  418. }
  419. else if (DropdownKeys.selectedIndex == 46)
  420. {
  421. bind_key = "KP_UPARROW";
  422. }
  423. else if (DropdownKeys.selectedIndex == 47)
  424. {
  425. bind_key = "KP_PGUP";
  426. }
  427. else if (DropdownKeys.selectedIndex == 48)
  428. {
  429. bind_key = "KP_INS";
  430. }
  431. }
  432.  
  433. private void bunifuMaterialTextbox1_OnValueChanged(object sender, EventArgs e)
  434. {
  435. bind_command = bunifuMaterialTextbox1.Text;
  436. }
  437.  
  438. private void bunifuFlatButton19_Click(object sender, EventArgs e)
  439. {
  440. bunifuMetroTextbox1.Text = "bind " + bind_key + " \u0022" + "say " + bind_command + "\u0022";
  441. MessageBox.Show("Your bind has been generated, to use just paste it in the in-game console.\n\nCommand Has Automaticly been copied to clipboard", "Done!", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  442. Clipboard.SetText(bunifuMetroTextbox1.Text);
  443. }
  444.  
  445. private void bunifuFlatButton13_Click(object sender, EventArgs e)
  446. {
  447. Process.Start(Application.StartupPath + $"/NI64.exe");
  448. }
  449.  
  450. public string[] GetSteamID(string input)
  451. {
  452. WebClient wc = new WebClient();
  453. dynamic j = JsonConvert.DeserializeObject(wc.DownloadString(apiURL + $"&input={input}&format=json"));
  454. string[] ids = { j.converted.steamid, j.converted.steamid64 };
  455. return ids;
  456. }
  457.  
  458. public void SetInfo(string SteamID64)
  459. {
  460. pictureBox2.ImageLocation = baseURL + SteamID64 + ".png";
  461. //pictureBox2.SizeMode = PictureBoxSizeMode.AutoSize;
  462. textBox1.Text = baseURL + SteamID64 + ".png";
  463. textBox2.Text = "http://steamcommunity.com/profiles/" + SteamID64;
  464. }
  465.  
  466. private void bunifuFlatButton14_Click(object sender, EventArgs e)
  467. {
  468. textBox1.Text = bunifuMaterialTextbox2.Text;
  469. try
  470. {
  471. if (textBox1.ToString().Contains("STEAM_"))
  472. {
  473. string SteamID64 = GetSteamID(textBox1.ToString())[1];
  474. SetInfo(SteamID64);
  475. }
  476. else if (textBox1.ToString().StartsWith("http"))
  477. {
  478. string steam64string = textBox1.Text;
  479. string Steam64;
  480.  
  481. if (steam64string.StartsWith("http:")) { Steam64 = steam64string.Replace("http://steamcommunity.com/profiles/", ""); }
  482. else { Steam64 = steam64string.Replace("https://steamcommunity.com/profiles/", ""); }
  483.  
  484.  
  485. SetInfo(Steam64);
  486. }
  487. }
  488. catch (Exception)
  489. {
  490. MessageBox.Show("Make sure the input was a valid steamid\\profile link");
  491. return;
  492. }
  493. }
  494.  
  495. private void label21_Click(object sender, EventArgs e)
  496. {
  497.  
  498. }
  499.  
  500. private void bunifuFlatButton15_Click(object sender, EventArgs e)
  501. {
  502. label1.Text = "Printer Calculator";
  503. PanelCalculator.Show();
  504. PanelDash.Hide();
  505. PanelServers.Hide();
  506. PanelBinds.Hide();
  507. PanelAutoclicker.Hide();
  508. PanelRPCash.Hide();
  509. PanelSettings.Hide();
  510. label24.Show();
  511. }
  512.  
  513. private void bunifuFlatButton18_Click(object sender, EventArgs e)
  514. {
  515. MessageBox.Show("You would earn: " + overallTotalAmmount.ToString() + "$/hour", "", MessageBoxButtons.OK, MessageBoxIcon.Information);
  516. }
  517.  
  518. private void bunifuFlatButton20_Click(object sender, EventArgs e)
  519. {
  520. overallTotalAmmount = 0;
  521. dataGridView1.Rows.Clear();
  522. }
  523.  
  524. private void bunifuFlatButton16_Click(object sender, EventArgs e)
  525. {
  526. EARNINGS = SELECTED_PRINTER_PROFIT * SELECTED_BOOSTER_MULTIPLIER;
  527.  
  528. dataGridView1.Rows.Add(SELECTED_PRINTER, SELECTED_BOOSTER_MULTIPLIER.ToString(), EARNINGS.ToString());
  529. overallTotalAmmount += EARNINGS;
  530. }
  531.  
  532. private void bunifuFlatButton17_Click(object sender, EventArgs e)
  533. {
  534. if (dataGridView1.SelectedRows.Count > 0 && dataGridView1.SelectedRows[0].Index != dataGridView1.Rows.Count - 1)
  535. {
  536. dataGridView1.Rows.RemoveAt(dataGridView1.SelectedRows[0].Index);
  537. }
  538. }
  539.  
  540. private void bunifuDropdown1_onItemSelected_1(object sender, EventArgs e)
  541. {
  542. if (bunifuDropdown1.selectedIndex == 0)
  543. {
  544. SELECTED_PRINTER = "Topaz Printer";
  545. SELECTED_PRINTER_PROFIT = 18000;
  546. }
  547. else if (bunifuDropdown1.selectedIndex == 1)
  548. {
  549. SELECTED_PRINTER = "Amethyst Printer";
  550. SELECTED_PRINTER_PROFIT = 27000;
  551. }
  552. else if (bunifuDropdown1.selectedIndex == 2)
  553. {
  554. SELECTED_PRINTER = "Emerald Printer";
  555. SELECTED_PRINTER_PROFIT = 45000;
  556. }
  557. else if (bunifuDropdown1.selectedIndex == 3)
  558. {
  559. SELECTED_PRINTER = "Sapphire Printer";
  560. SELECTED_PRINTER_PROFIT = 135000;
  561. }
  562. else if (bunifuDropdown1.selectedIndex == 4)
  563. {
  564. SELECTED_PRINTER = "Normal Printer";
  565. SELECTED_PRINTER_PROFIT = 36000;
  566. }
  567. else if (bunifuDropdown1.selectedIndex == 5)
  568. {
  569. SELECTED_PRINTER = "Ruby Printer";
  570. SELECTED_PRINTER_PROFIT = 72000;
  571. }
  572. else if (bunifuDropdown1.selectedIndex == 6)
  573. {
  574. SELECTED_PRINTER = "Gold Printer";
  575. SELECTED_PRINTER_PROFIT = 144000;
  576. }
  577. else if (bunifuDropdown1.selectedIndex == 7)
  578. {
  579. SELECTED_PRINTER = "Nuclear Printer";
  580. SELECTED_PRINTER_PROFIT = 324000;
  581. }
  582. else if (bunifuDropdown1.selectedIndex == 8)
  583. {
  584. SELECTED_PRINTER = "All Shop Printers";
  585. SELECTED_PRINTER_PROFIT = 1063430;
  586. }
  587. else if (bunifuDropdown1.selectedIndex == 9)
  588. {
  589. SELECTED_PRINTER = "Diamond Printer";
  590. SELECTED_PRINTER_PROFIT = 720000;
  591. }
  592. else if (bunifuDropdown1.selectedIndex == 10)
  593. {
  594. SELECTED_PRINTER = "Black Diamond Printer";
  595. SELECTED_PRINTER_PROFIT = 1200000;
  596. }
  597. else if (bunifuDropdown1.selectedIndex == 11)
  598. {
  599. SELECTED_PRINTER = "GenCorp Printer";
  600. SELECTED_PRINTER_PROFIT = 1800000;
  601. }
  602. else if (bunifuDropdown1.selectedIndex == 12)
  603. {
  604. SELECTED_PRINTER = "Magik Printer";
  605. SELECTED_PRINTER_PROFIT = 2400000;
  606. }
  607. else if (bunifuDropdown1.selectedIndex == 13)
  608. {
  609. SELECTED_PRINTER = "Iridium Printer";
  610. SELECTED_PRINTER_PROFIT = 2250000;
  611. }
  612. else if (bunifuDropdown1.selectedIndex == 14)
  613. {
  614. SELECTED_PRINTER = "Festive Printer";
  615. SELECTED_PRINTER_PROFIT = 1800000;
  616. }
  617. else if (bunifuDropdown1.selectedIndex == 15)
  618. {
  619. SELECTED_PRINTER = "Golden Plated Printer";
  620. SELECTED_PRINTER_PROFIT = 27000000;
  621. }
  622. else if (bunifuDropdown1.selectedIndex == 16)
  623. {
  624. SELECTED_PRINTER = "Uranium Printer";
  625. SELECTED_PRINTER_PROFIT = 133;
  626. }
  627. }
  628.  
  629. private void bunifuDropdown2_onItemSelected(object sender, EventArgs e)
  630. {
  631. if (bunifuDropdown2.selectedIndex == 0)
  632. {
  633. SELECTED_BOOSTER_MULTIPLIER = 1;
  634. }
  635. else if (bunifuDropdown2.selectedIndex == 1)
  636. {
  637. SELECTED_BOOSTER_MULTIPLIER = 2;
  638. }
  639. else if (bunifuDropdown2.selectedIndex == 2)
  640. {
  641. SELECTED_BOOSTER_MULTIPLIER = 3;
  642. }
  643. else if (bunifuDropdown2.selectedIndex == 3)
  644. {
  645. SELECTED_BOOSTER_MULTIPLIER = 4;
  646. }
  647. else if (bunifuDropdown2.selectedIndex == 4)
  648. {
  649. SELECTED_BOOSTER_MULTIPLIER = 5;
  650. }
  651. }
  652.  
  653. private void bunifuFlatButton21_Click(object sender, EventArgs e)
  654. {
  655. label1.Text = "Settings";
  656. PanelCalculator.Hide();
  657. PanelDash.Hide();
  658. PanelServers.Hide();
  659. PanelBinds.Hide();
  660. PanelAutoclicker.Hide();
  661. PanelRPCash.Hide();
  662. label24.Hide();
  663. PanelSettings.Show();
  664. }
  665.  
  666. public void Theme_Dark()
  667. {
  668. PanelDash.BackColor = Color.FromArgb(39, 41, 61);
  669. PanelServers.BackColor = Color.FromArgb(39, 41, 61);
  670. PanelBinds.BackColor = Color.FromArgb(39, 41, 61);
  671. PanelAutoclicker.BackColor = Color.FromArgb(39, 41, 61);
  672. PanelRPCash.BackColor = Color.FromArgb(39, 41, 61);
  673. PanelCalculator.BackColor = Color.FromArgb(39, 41, 61);
  674. PanelSettings.BackColor = Color.FromArgb(39, 41, 61);
  675.  
  676. MenuTop.BackColor = Color.FromArgb(30, 30, 46);
  677. SidebarWrapper.BackColor = Color.FromArgb(30, 30, 46);
  678. Wrapper.BackColor = Color.FromArgb(30, 30, 46);
  679.  
  680. MenuSidebar.Image = Resources.Menu_Dark;
  681. Minimizar.Image = Resources.Mini_Dark;
  682. Salir.Image = Resources.Close_Dark;
  683. bunifuFlatButton1.Iconimage = Resources.Dash_Dark;
  684. bunifuFlatButton2.Iconimage = Resources.Server_Dark;
  685. bunifuFlatButton3.Iconimage = Resources.Bind_Dark;
  686. bunifuFlatButton4.Iconimage = Resources.Click_Dark;
  687. bunifuFlatButton5.Iconimage = Resources.RP_Dark;
  688. bunifuFlatButton15.Iconimage = Resources.Calc_Dark;
  689. bunifuFlatButton21.Iconimage = Resources.Setting_Dark;
  690. bunifuFlatButton6.Iconimage = Resources.RP_Dark;
  691. bunifuFlatButton7.Iconimage = Resources.RP_Dark;
  692. bunifuFlatButton8.Iconimage = Resources.DR_Dark;
  693. bunifuFlatButton9.Iconimage = Resources.TTT_Dark;
  694. bunifuFlatButton10.Iconimage = Resources.Bhop_Dark;
  695. bunifuFlatButton11.Iconimage = Resources.Surf_Dark;
  696. bunifuFlatButton12.Iconimage = Resources.PH_Dark;
  697. bunifuFlatButton19.Iconimage = Resources.Bind_Dark;
  698. bunifuFlatButton13.Iconimage = Resources.Click_Dark;
  699. bunifuFlatButton14.Iconimage = Resources.Cash_Dark;
  700. bunifuFlatButton24.Iconimage = Resources.Save_Dark;
  701. bunifuFlatButton25.Iconimage = Resources.Load_Dark;
  702. bunifuFlatButton16.Iconimage = Resources.Calc_Add_Dark;
  703. bunifuFlatButton17.Iconimage = Resources.Calc_Remove_Dark;
  704. bunifuFlatButton18.Iconimage = Resources.Calc_Dark;
  705. bunifuFlatButton20.Iconimage = Resources.Calc_Clear_Dark;
  706. bunifuFlatButton26.Iconimage = Resources.Bind_Dark;
  707.  
  708. label34.ForeColor = Color.LightGray;
  709. label1.ForeColor = Color.LightGray;
  710. label24.ForeColor = Color.LightGray;
  711. label14.ForeColor = Color.LightGray;
  712. label13.ForeColor = Color.LightGray;
  713. label7.ForeColor = Color.LightGray;
  714. label3.ForeColor = Color.LightGray;
  715. label11.ForeColor = Color.LightGray;
  716. label19.ForeColor = Color.LightGray;
  717. label21.ForeColor = Color.LightGray;
  718. label18.ForeColor = Color.LightGray;
  719. label17.ForeColor = Color.LightGray;
  720. label12.ForeColor = Color.LightGray;
  721. label8.ForeColor = Color.LightGray;
  722. label9.ForeColor = Color.LightGray;
  723. label30.ForeColor = Color.LightGray;
  724. label22.ForeColor = Color.LightGray;
  725. label20.ForeColor = Color.LightGray;
  726. lblrp1.ForeColor = Color.LightGray;
  727. lblrpusa.ForeColor = Color.LightGray;
  728. lbldr.ForeColor = Color.LightGray;
  729. lblttt.ForeColor = Color.LightGray;
  730. lblbhop.ForeColor = Color.LightGray;
  731. lblsurf.ForeColor = Color.LightGray;
  732. lblph.ForeColor = Color.LightGray;
  733. label5.ForeColor = Color.LightGray;
  734. label23.ForeColor = Color.LightGray;
  735.  
  736. bunifuFlatButton19.Textcolor = Color.LightGray;
  737. bunifuFlatButton22.Textcolor = Color.LightGray;
  738. bunifuFlatButton23.Textcolor = Color.LightGray;
  739. bunifuFlatButton13.Textcolor = Color.LightGray;
  740. bunifuFlatButton14.Textcolor = Color.LightGray;
  741. bunifuFlatButton16.Textcolor = Color.LightGray;
  742. bunifuFlatButton17.Textcolor = Color.LightGray;
  743. bunifuFlatButton18.Textcolor = Color.LightGray;
  744. bunifuFlatButton20.Textcolor = Color.LightGray;
  745. bunifuFlatButton6.Textcolor = Color.LightGray;
  746. bunifuFlatButton7.Textcolor = Color.LightGray;
  747. bunifuFlatButton8.Textcolor = Color.LightGray;
  748. bunifuFlatButton9.Textcolor = Color.LightGray;
  749. bunifuFlatButton10.Textcolor = Color.LightGray;
  750. bunifuFlatButton11.Textcolor = Color.LightGray;
  751. bunifuFlatButton12.Textcolor = Color.LightGray;
  752. bunifuFlatButton24.Textcolor = Color.LightGray;
  753. bunifuFlatButton25.Textcolor = Color.LightGray;
  754. bunifuFlatButton26.Textcolor = Color.LightGray;
  755.  
  756. bunifuFlatButton6.ButtonText = " DarkRP";
  757. bunifuFlatButton7.ButtonText = " DarkRP USA";
  758. bunifuFlatButton8.ButtonText = " Deathrun";
  759. bunifuFlatButton9.ButtonText = " TTT";
  760. bunifuFlatButton10.ButtonText = " Bhop";
  761. bunifuFlatButton11.ButtonText = " Surf";
  762. bunifuFlatButton12.ButtonText = " Prophunt";
  763.  
  764. DropdownKeys.ForeColor = Color.LightGray;
  765. bunifuDropdown1.ForeColor = Color.LightGray;
  766. bunifuDropdown2.ForeColor = Color.LightGray;
  767.  
  768. pictureBox2.BackColor = Color.FromArgb(39, 41, 61);
  769. }
  770.  
  771. public void Theme_Light()
  772. {
  773. PanelDash.BackColor = Color.FromArgb(255, 255, 255);
  774. PanelServers.BackColor = Color.FromArgb(255, 255, 255);
  775. PanelBinds.BackColor = Color.FromArgb(255, 255, 255);
  776. PanelAutoclicker.BackColor = Color.FromArgb(255, 255, 255);
  777. PanelRPCash.BackColor = Color.FromArgb(255, 255, 255);
  778. PanelCalculator.BackColor = Color.FromArgb(255, 255, 255);
  779. PanelSettings.BackColor = Color.FromArgb(255, 255, 255);
  780.  
  781. MenuTop.BackColor = Color.FromArgb(200, 200, 200);
  782. SidebarWrapper.BackColor = Color.FromArgb(200, 200, 200);
  783. Wrapper.BackColor = Color.FromArgb(200, 200, 200);
  784.  
  785. MenuSidebar.Image = Resources.Menu_Light;
  786. Minimizar.Image = Resources.Mini_Light;
  787. Salir.Image = Resources.Close_Light;
  788. bunifuFlatButton1.Iconimage = Resources.Dash_Light;
  789. bunifuFlatButton2.Iconimage = Resources.Server_Light;
  790. bunifuFlatButton3.Iconimage = Resources.Bind_Light;
  791. bunifuFlatButton4.Iconimage = Resources.Click_Light;
  792. bunifuFlatButton5.Iconimage = Resources.RP_Light;
  793. bunifuFlatButton15.Iconimage = Resources.Calc_Light;
  794. bunifuFlatButton21.Iconimage = Resources.Setting_Light;
  795. bunifuFlatButton6.Iconimage = Resources.RP_Light;
  796. bunifuFlatButton7.Iconimage = Resources.RP_Light;
  797. bunifuFlatButton8.Iconimage = Resources.DR_Light;
  798. bunifuFlatButton9.Iconimage = Resources.TTT_Light;
  799. bunifuFlatButton10.Iconimage = Resources.Bhop_Light;
  800. bunifuFlatButton11.Iconimage = Resources.Surf_Light;
  801. bunifuFlatButton12.Iconimage = Resources.PH_Light;
  802. bunifuFlatButton19.Iconimage = Resources.Bind_Light;
  803. bunifuFlatButton13.Iconimage = Resources.Click_Light;
  804. bunifuFlatButton14.Iconimage = Resources.Cash_Light;
  805. bunifuFlatButton24.Iconimage = Resources.Save_Light;
  806. bunifuFlatButton25.Iconimage = Resources.Load_Light;
  807. bunifuFlatButton16.Iconimage = Resources.Calc_Add_Light;
  808. bunifuFlatButton17.Iconimage = Resources.Calc_Remove_Light;
  809. bunifuFlatButton18.Iconimage = Resources.Calc_Light;
  810. bunifuFlatButton20.Iconimage = Resources.Calc_Clear_Light;
  811. bunifuFlatButton26.Iconimage = Resources.Bind_Light;
  812.  
  813. label34.ForeColor = Color.Black;
  814. label1.ForeColor = Color.Black;
  815. label24.ForeColor = Color.Black;
  816. label14.ForeColor = Color.Black;
  817. label13.ForeColor = Color.Black;
  818. label7.ForeColor = Color.Black;
  819. label3.ForeColor = Color.Black;
  820. label11.ForeColor = Color.Black;
  821. label19.ForeColor = Color.Black;
  822. label21.ForeColor = Color.Black;
  823. label18.ForeColor = Color.Black;
  824. label17.ForeColor = Color.Black;
  825. label12.ForeColor = Color.Black;
  826. label8.ForeColor = Color.Black;
  827. label9.ForeColor = Color.Black;
  828. label30.ForeColor = Color.Black;
  829. label22.ForeColor = Color.Black;
  830. label20.ForeColor = Color.Black;
  831. lblrp1.ForeColor = Color.Black;
  832. lblrpusa.ForeColor = Color.Black;
  833. lbldr.ForeColor = Color.Black;
  834. lblttt.ForeColor = Color.Black;
  835. lblbhop.ForeColor = Color.Black;
  836. lblsurf.ForeColor = Color.Black;
  837. lblph.ForeColor = Color.Black;
  838. label5.ForeColor = Color.Black;
  839. label23.ForeColor = Color.Black;
  840.  
  841. bunifuFlatButton19.Textcolor = Color.Black;
  842. bunifuFlatButton22.Textcolor = Color.Black;
  843. bunifuFlatButton23.Textcolor = Color.Black;
  844. bunifuFlatButton13.Textcolor = Color.Black;
  845. bunifuFlatButton14.Textcolor = Color.Black;
  846. bunifuFlatButton16.Textcolor = Color.Black;
  847. bunifuFlatButton17.Textcolor = Color.Black;
  848. bunifuFlatButton18.Textcolor = Color.Black;
  849. bunifuFlatButton20.Textcolor = Color.Black;
  850. bunifuFlatButton6.Textcolor = Color.Black;
  851. bunifuFlatButton7.Textcolor = Color.Black;
  852. bunifuFlatButton8.Textcolor = Color.Black;
  853. bunifuFlatButton9.Textcolor = Color.Black;
  854. bunifuFlatButton10.Textcolor = Color.Black;
  855. bunifuFlatButton11.Textcolor = Color.Black;
  856. bunifuFlatButton12.Textcolor = Color.Black;
  857. bunifuFlatButton24.Textcolor = Color.Black;
  858. bunifuFlatButton25.Textcolor = Color.Black;
  859. bunifuFlatButton26.Textcolor = Color.Black;
  860.  
  861. bunifuFlatButton6.ButtonText = " DarkRP";
  862. bunifuFlatButton7.ButtonText = " DarkRP USA";
  863. bunifuFlatButton8.ButtonText = " Deathrun";
  864. bunifuFlatButton9.ButtonText = " TTT";
  865. bunifuFlatButton10.ButtonText = " Bhop";
  866. bunifuFlatButton11.ButtonText = " Surf";
  867. bunifuFlatButton12.ButtonText = " Prophunt";
  868.  
  869. DropdownKeys.ForeColor = Color.Black;
  870. bunifuDropdown1.ForeColor = Color.Black;
  871. bunifuDropdown2.ForeColor = Color.Black;
  872.  
  873. pictureBox2.BackColor = Color.FromArgb(255, 255, 255);
  874. }
  875.  
  876. private void bunifuFlatButton22_Click(object sender, EventArgs e)
  877. {
  878. Theme_Dark();
  879. Settings.Default.light_mode = false;
  880. Settings.Default.Save();
  881. }
  882.  
  883. private void bunifuFlatButton23_Click(object sender, EventArgs e)
  884. {
  885. Theme_Light();
  886. Settings.Default.light_mode = true;
  887. Settings.Default.Save();
  888. }
  889.  
  890. private void bunifuFlatButton24_Click(object sender, EventArgs e)
  891. {
  892. string defaultResponse = "Your Config";
  893. string input = Interaction.InputBox("Enter your Config name below", "Enter Name", defaultResponse, -1, -1);
  894. if (input.Length == 0)
  895. {
  896. MessageBox.Show("Input can't be empty!!", "Error");
  897. }
  898. else
  899. {
  900. MessageBox.Show("Will save printer config with the name: " + input);
  901.  
  902. string file = Application.StartupPath + "/" + input + "_calcsave.bin";
  903. using (BinaryWriter bw = new BinaryWriter(File.Open(file, FileMode.Create)))
  904. {
  905. bw.Write(dataGridView1.Columns.Count);
  906. bw.Write(dataGridView1.Rows.Count);
  907. foreach (DataGridViewRow dgvR in dataGridView1.Rows)
  908. {
  909. for (int j = 0; j < dataGridView1.Columns.Count; ++j)
  910. {
  911. object val = dgvR.Cells[j].Value;
  912. if (val == null)
  913. {
  914. bw.Write(false);
  915. bw.Write(false);
  916. }
  917. else
  918. {
  919. bw.Write(true);
  920. bw.Write(val.ToString());
  921. }
  922. }
  923. }
  924. }
  925. }
  926. }
  927.  
  928. private void bunifuFlatButton25_Click(object sender, EventArgs e)
  929. {
  930. try
  931. {
  932. string defaultResponse = "Your Config";
  933. string input = Interaction.InputBox("Enter your Config name below", "Enter Name", defaultResponse, -1, -1);
  934. if (input.Length == 0)
  935. {
  936. MessageBox.Show("Input can't be empty!!", "Error");
  937. }
  938. else
  939. {
  940. MessageBox.Show("Will load printer config with the name: " + input);
  941.  
  942. dataGridView1.Rows.Clear();
  943. string file = Application.StartupPath + "/" + input + "_calcsave.bin";
  944. using (BinaryReader bw = new BinaryReader(File.Open(file, FileMode.Open)))
  945. {
  946. int n = bw.ReadInt32();
  947. int m = bw.ReadInt32();
  948. for (int i = 0; i < m; ++i)
  949. {
  950. dataGridView1.Rows.Add();
  951. for (int j = 0; j < n; ++j)
  952. {
  953. if (bw.ReadBoolean())
  954. {
  955. dataGridView1.Rows[i].Cells[j].Value = bw.ReadString();
  956. }
  957. else bw.ReadBoolean();
  958. }
  959. }
  960. }
  961. }
  962. }
  963. catch
  964. {
  965. MessageBox.Show("Config does not exist!!!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
  966. }
  967. }
  968.  
  969. private void bunifuFlatButton26_Click(object sender, EventArgs e)
  970. {
  971. advanced_binds bins = new advanced_binds();
  972. bins.Show();
  973. Hide();
  974. }
  975. }
  976. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement