Advertisement
Guest User

Untitled

a guest
Feb 20th, 2020
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.12 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Drawing;
  4. using System.Windows.Forms;
  5. using System.Linq;
  6. using System.Text;
  7. using System.IO;
  8.  
  9.  
  10. namespace Project
  11. {
  12. /// <summary>
  13. /// Description of MainForm.
  14. /// </summary>
  15. public partial class MainForm : Form
  16. {
  17. double gug;
  18. double gug1;
  19. double gug2;
  20. double gug3;
  21. double gug4;
  22. double gug5;
  23. double gug6;
  24. double gug7;
  25. double gug8;
  26. double gug9;
  27. double gug10;
  28. double gug11;
  29. double gug12;
  30.  
  31. List<int> russian = new List<int>();
  32. List<int> litra = new List<int>();
  33. List<int> math = new List<int>();
  34. List<int> geometry = new List<int>();
  35. List<int> history = new List<int>();
  36. List<int> obsh = new List<int>();
  37. List<int> english = new List<int>();
  38. List<int> info = new List<int>();
  39. List<int> geography = new List<int>();
  40. List<int> biology = new List<int>();
  41. List<int> physics = new List<int>();
  42. List<int> avia = new List<int>();
  43.  
  44. double a = 0;
  45. double b = 0;
  46.  
  47.  
  48.  
  49.  
  50. int j = 0;
  51. string ki;
  52. string g;
  53. string p = @"C:\\new_file.txt";
  54. string yu = @"C:\\new_file2.txt";
  55. string ty = @"C:\\new_file3.txt";
  56. string fg = @"C:\\new_file4.txt";
  57. string op = @"C:\\new_file5.txt";
  58. string ert = @"C:\\new_file6.txt";
  59. string qwe = @"C:\\new_file7.txt";
  60. string vb = @"C:\\new_file8.txt";
  61. string bn = @"C:\\new_file9.txt";
  62. string nm = @"C:\\new_file10.txt";
  63. string mn = @"C:\\new_file11.txt";
  64. string nb = @"C:\\new_file12.txt";
  65. public MainForm()
  66. {
  67. //
  68. // The InitializeComponent() call is required for Windows Forms designer support.
  69. //
  70. InitializeComponent();
  71.  
  72. //
  73. // TODO: Add constructor code after the InitializeComponent() call.
  74. //
  75. }
  76. void Button1Click(object sender, EventArgs e)
  77. {
  78.  
  79. a = 0; b = 0; j = 0;
  80. for(int i = 0;i < russian.Count;i++)
  81. {
  82. a = a + russian[i];
  83. }
  84. j = System.Convert.ToInt32(russian.Count);
  85. b=a/j;
  86. if(System.Convert.ToString(b) != "NaN")
  87. {
  88. label43.Text = System.Convert.ToString(b);
  89. }
  90. else
  91. {
  92. label43.Text = "0";
  93. }
  94. for(int i = 0;b<=(System.Convert.ToDouble(comboBox24.SelectedItem)-0.3);i++){
  95. a=a+5;
  96. j++;
  97. b=a/j;
  98. gug1=i;
  99. }
  100.  
  101.  
  102.  
  103. label42.Text = System.Convert.ToString(gug1);
  104.  
  105.  
  106. a = 0;
  107. b = 0;
  108. j = 0;
  109.  
  110. for(int i = 0;i < litra.Count;i++)
  111. {
  112. a = a + litra[i];
  113. }
  114. j = System.Convert.ToInt32(litra.Count);
  115. b=a/j;
  116. if(System.Convert.ToString(b) != "NaN")
  117. {
  118. label44.Text = System.Convert.ToString(b);
  119. }
  120. else
  121. {
  122. label44.Text = "0";
  123. }
  124.  
  125.  
  126. for(int i = 0;b<=(System.Convert.ToDouble(comboBox23.SelectedItem)-0.3);i++){
  127. a=a+5;
  128. j++;
  129. b=a/j;
  130. gug=i;
  131. }
  132.  
  133.  
  134.  
  135. label41.Text = System.Convert.ToString(gug);
  136.  
  137.  
  138.  
  139.  
  140.  
  141. a = 0;
  142. b = 0;
  143. j = 0;
  144.  
  145. for(int i = 0;i < math.Count;i++)
  146. {
  147. a = a + math[i];
  148. }
  149.  
  150. j = System.Convert.ToInt32(math.Count);
  151. b=a/j;
  152. if(System.Convert.ToString(b) != "NaN")
  153. {
  154. label45.Text = System.Convert.ToString(b);
  155. }
  156. else
  157. {
  158. label45.Text = "0";
  159.  
  160. }
  161. for(int i = 0;b<=(System.Convert.ToDouble(comboBox22.SelectedItem)-0.3);i++){
  162. a=a+5;
  163. j++;
  164. b=a/j;
  165. gug2=i;
  166. }
  167.  
  168.  
  169.  
  170. label40.Text = System.Convert.ToString(gug2);
  171. a = 0;
  172. b = 0;
  173. j = 0;
  174.  
  175. for(int i = 0;i < geometry.Count;i++)
  176. {
  177. a = a + geometry[i];
  178. }
  179. j = System.Convert.ToInt32(geometry.Count);
  180. b=a/j;
  181. if(System.Convert.ToString(b) != "NaN")
  182. {
  183. label46.Text = System.Convert.ToString(b);
  184. }
  185. else
  186. {
  187. label46.Text = "0";
  188. }
  189. for(int i = 0;b<=(System.Convert.ToDouble(comboBox21.SelectedItem)-0.3);i++){
  190. a=a+5;
  191. j++;
  192. b=a/j;
  193. gug3=i;
  194. }
  195.  
  196.  
  197.  
  198. label39.Text = System.Convert.ToString(gug3);
  199.  
  200. a = 0;
  201. b = 0;
  202. j = 0;
  203.  
  204. for(int i = 0;i < history.Count;i++)
  205. {
  206. a = a + history[i];
  207. }
  208.  
  209. j = System.Convert.ToInt32(history.Count);
  210. b=a/j;
  211. if(System.Convert.ToString(b) != "NaN")
  212. {
  213. label47.Text = System.Convert.ToString(b);
  214. }
  215. else
  216. {
  217. label47.Text = "0";
  218. }
  219. for(int i = 0;b<=(System.Convert.ToDouble(comboBox19.SelectedItem)-0.3);i++){
  220. a=a+5;
  221. j++;
  222. b=a/j;
  223. gug4=i;
  224. }
  225.  
  226.  
  227.  
  228. label38.Text = System.Convert.ToString(gug4);
  229. a = 0;
  230. b = 0;
  231. j = 0;
  232.  
  233. for(int i = 0;i < obsh.Count;i++)
  234. {
  235. a = a + obsh[i];
  236. }
  237.  
  238. j = System.Convert.ToInt32(obsh.Count);
  239. b=a/j;
  240. if(System.Convert.ToString(b) != "NaN")
  241. {
  242. label48.Text = System.Convert.ToString(b);
  243. }
  244. else
  245. {
  246. label48.Text = "0";
  247. }
  248. for(int i = 0;b<=(System.Convert.ToDouble(comboBox20.SelectedItem)-0.3);i++){
  249. a=a+5;
  250. j++;
  251. b=a/j;
  252. gug5=i;
  253. }
  254.  
  255.  
  256.  
  257. label37.Text = System.Convert.ToString(gug5);
  258. a = 0;
  259. b = 0;
  260. j = 0;
  261.  
  262. for(int i = 0;i < english.Count;i++)
  263. {
  264. a = a + english[i];
  265. }
  266.  
  267. j = System.Convert.ToInt32(english.Count);
  268. b=a/j;
  269. if(System.Convert.ToString(b) != "NaN")
  270. {
  271. label49.Text = System.Convert.ToString(b);
  272. }
  273. else
  274. {
  275. label49.Text = "0";
  276. }
  277. for(int i = 0;b<=(System.Convert.ToDouble(comboBox18.SelectedItem)-0.3);i++){
  278. a=a+5;
  279. j++;
  280. b=a/j;
  281. gug6=i;
  282. }
  283.  
  284.  
  285.  
  286. label36.Text = System.Convert.ToString(gug6);
  287. a = 0;
  288. b = 0;
  289. j = 0;
  290.  
  291. for(int i = 0;i < info.Count;i++)
  292. {
  293. a = a + info[i];
  294. }
  295.  
  296. j = System.Convert.ToInt32(info.Count);
  297. b=a/j;
  298. if(System.Convert.ToString(b) != "NaN")
  299. {
  300. label50.Text = System.Convert.ToString(b);
  301. }
  302. else
  303. {
  304. label50.Text = "0";
  305. }
  306. for(int i = 0;b<=(System.Convert.ToDouble(comboBox17.SelectedItem)-0.3);i++){
  307. a=a+5;
  308. j++;
  309. b=a/j;
  310. gug7=i;
  311. }
  312.  
  313.  
  314.  
  315. label35.Text = System.Convert.ToString(gug7);
  316. a = 0;
  317. b = 0;
  318. j = 0;
  319.  
  320. for(int i = 0;i < geography.Count;i++)
  321. {
  322. a = a + geography[i];
  323. }
  324.  
  325. j = System.Convert.ToInt32(geography.Count);
  326. b=a/j;
  327. if(System.Convert.ToString(b) != "NaN")
  328. {
  329. label51.Text = System.Convert.ToString(b);
  330. }
  331. else
  332. {
  333. label51.Text = "0";
  334. }
  335. for(int i = 0;b<=(System.Convert.ToDouble(comboBox16.SelectedItem)-0.3);i++){
  336. a=a+5;
  337. j++;
  338. b=a/j;
  339. gug8=i;
  340. }
  341.  
  342.  
  343.  
  344. label34.Text = System.Convert.ToString(gug8);
  345. a = 0;
  346. b = 0;
  347. j = 0;
  348.  
  349. for(int i = 0;i < biology.Count;i++)
  350. {
  351. a = a + biology[i];
  352. }
  353.  
  354. j = System.Convert.ToInt32(biology.Count);
  355. b=a/j;
  356. if(System.Convert.ToString(b) != "NaN")
  357. {
  358. label52.Text = System.Convert.ToString(b);
  359. }
  360. else
  361. {
  362. label52.Text = "0";
  363. }
  364. for(int i = 0;b<=(System.Convert.ToDouble(comboBox15.SelectedItem)-0.3);i++){
  365. a=a+5;
  366. j++;
  367. b=a/j;
  368. gug9=i;
  369. }
  370.  
  371.  
  372.  
  373. label33.Text = System.Convert.ToString(gug9);
  374. a = 0;
  375. b = 0;
  376. j = 0;
  377.  
  378. for(int i = 0;i < physics.Count;i++)
  379. {
  380. a = a + physics[i];
  381. }
  382.  
  383. j = System.Convert.ToInt32(physics.Count);
  384. b=a/j;
  385. if(System.Convert.ToString(b) != "NaN")
  386. {
  387. label53.Text = System.Convert.ToString(b);
  388. }
  389. else
  390. {
  391. label53.Text = "0";
  392. }
  393. for(int i = 0;b<=(System.Convert.ToDouble(comboBox14.SelectedItem)-0.3);i++){
  394. a=a+5;
  395. j++;
  396. b=a/j;
  397. gug10=i;
  398. }
  399.  
  400.  
  401.  
  402. label32.Text = System.Convert.ToString(gug10);
  403. a = 0;
  404. b = 0;
  405. j = 0;
  406.  
  407. for(int i = 0;i < avia.Count;i++)
  408. {
  409. a = a + avia[i];
  410. }
  411.  
  412. j = System.Convert.ToInt32(avia.Count);
  413. b=a/j;
  414. if(System.Convert.ToString(b) != "NaN")
  415. {
  416. label54.Text = System.Convert.ToString(b);
  417. }
  418. else
  419. {
  420. label54.Text = "0";
  421. }
  422. for(int i = 0;b<=(System.Convert.ToDouble(comboBox13.SelectedItem)-0.3);i++){
  423. a=a+5;
  424. j++;
  425. b=a/j;
  426. gug11=i;
  427. }
  428.  
  429.  
  430.  
  431. label31.Text = System.Convert.ToString(gug11);
  432.  
  433. }
  434. void Button4Click(object sender, EventArgs e)
  435. {
  436. ki = label30.Text;
  437.  
  438. if(ki[0] == 'Д')
  439. {
  440. label30.Text = "";
  441. label30.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  442. label30.ForeColor = Color.Black;
  443. }
  444. label30.Text = label30.Text + System.Convert.ToString(comboBox1.SelectedItem) + ' ';
  445. russian.Add(System.Convert.ToInt32(comboBox1.SelectedItem));
  446. g = System.Convert.ToString(comboBox1.SelectedItem);
  447. File.AppendAllText(p,g);
  448.  
  449. }
  450. void TextBox4TextChanged(object sender, EventArgs e)
  451. {
  452.  
  453. }
  454. void TextBox1TextChanged(object sender, EventArgs e)
  455. {
  456.  
  457. }
  458. void Button2Click(object sender, EventArgs e)
  459. {
  460. string str = File.ReadAllText(p);
  461. ki = label30.Text;
  462. if(str != "")
  463. {
  464. if(ki[0] == 'Д')
  465. {
  466. label30.Text = "";
  467. label30.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  468. label30.ForeColor = Color.Black;
  469. }
  470. }
  471. for(int i = 0;i < str.Length;i++)
  472. {
  473. label30.Text = label30.Text + str[i] + ' ';
  474. russian.Add(System.Convert.ToInt32(System.Convert.ToString(str[i])));
  475. }
  476. string str2 = File.ReadAllText(yu);
  477. string str3 = File.ReadAllText(ty);
  478. string str4 = File.ReadAllText(fg);
  479. string str5 = File.ReadAllText(op);
  480. string str6 = File.ReadAllText(ert);
  481. string str7 = File.ReadAllText(qwe);
  482. string str8 = File.ReadAllText(vb);
  483. string str9 = File.ReadAllText(bn);
  484. string str10 = File.ReadAllText(nm);
  485. string str11 = File.ReadAllText(mn);
  486. string str12 = File.ReadAllText(nb);
  487. ki = label29.Text;
  488. if(str2 != "")
  489. {
  490. if(ki[0] == 'Д')
  491. {
  492. label29.Text = "";
  493. label29.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  494. label29.ForeColor = Color.Black;
  495. }
  496. }
  497. for(int i = 0;i < str2.Length;i++)
  498. {
  499. label29.Text = label29.Text + str2[i] + ' ';
  500. litra.Add(System.Convert.ToInt32(System.Convert.ToString(str2[i])));
  501. }
  502. ki = label28.Text;
  503. if(str3 != "")
  504. {
  505. if(ki[0] == 'Д')
  506. {
  507. label28.Text = "";
  508. label28.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  509. label28.ForeColor = Color.Black;
  510. }
  511. }
  512. for(int i = 0;i < str3.Length;i++)
  513. {
  514. label28.Text = label28.Text + str3[i] + ' ';
  515. math.Add(System.Convert.ToInt32(System.Convert.ToString(str3[i])));
  516. }
  517. ki = label27.Text;
  518. if(str4 != "")
  519. {
  520. if(ki[0] == 'Д')
  521. {
  522. label27.Text = "";
  523. label27.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  524. label27.ForeColor = Color.Black;
  525. }
  526. }
  527. for(int i = 0;i < str4.Length;i++)
  528. {
  529. label27.Text = label27.Text + str4[i] + ' ';
  530. geometry.Add(System.Convert.ToInt32(System.Convert.ToString(str4[i])));
  531. }
  532. ki = label26.Text;
  533. if(str5 != "")
  534. {
  535. if(ki[0] == 'Д')
  536. {
  537. label26.Text = "";
  538. label26.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  539. label26.ForeColor = Color.Black;
  540. }
  541. }
  542. for(int i = 0;i < str5.Length;i++)
  543. {
  544. label26.Text = label26.Text + str5[i] + ' ';
  545. history.Add(System.Convert.ToInt32(System.Convert.ToString(str5[i])));
  546. }
  547. ki = label25.Text;
  548. if(str6 != "")
  549. {
  550. if(ki[0] == 'Д')
  551. {
  552. label25.Text = "";
  553. label25.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  554. label25.ForeColor = Color.Black;
  555. }
  556. }
  557. for(int i = 0;i < str6.Length;i++)
  558. {
  559. label25.Text = label25.Text + str6[i] + ' ';
  560. obsh.Add(System.Convert.ToInt32(System.Convert.ToString(str6[i])));
  561. }
  562. ki = label24.Text;
  563. if(str7 != "")
  564. {
  565. if(ki[0] == 'Д')
  566. {
  567. label24.Text = "";
  568. label24.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  569. label24.ForeColor = Color.Black;
  570. }
  571. }
  572. for(int i = 0;i < str7.Length;i++)
  573. {
  574. label24.Text = label24.Text + str7[i] + ' ';
  575. english.Add(System.Convert.ToInt32(System.Convert.ToString(str7[i])));
  576. }
  577. ki = label23.Text;
  578. if(str8 != "")
  579. {
  580. if(ki[0] == 'Д')
  581. {
  582. label23.Text = "";
  583. label23.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  584. label23.ForeColor = Color.Black;
  585. }
  586. }
  587. for(int i = 0;i < str8.Length;i++)
  588. {
  589. label23.Text = label23.Text + str8[i] + ' ';
  590. info.Add(System.Convert.ToInt32(System.Convert.ToString(str8[i])));
  591. }
  592. ki = label22.Text;
  593. if(str9 != "")
  594. {
  595. if(ki[0] == 'Д')
  596. {
  597. label22.Text = "";
  598. label22.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  599. label22.ForeColor = Color.Black;
  600. }
  601. }
  602. for(int i = 0;i < str9.Length;i++)
  603. {
  604. label22.Text = label22.Text + str9[i] + ' ';
  605. geography.Add(System.Convert.ToInt32(System.Convert.ToString(str9[i])));
  606. }
  607. ki = label21.Text;
  608. if(str10 != "")
  609. {
  610. if(ki[0] == 'Д')
  611. {
  612. label21.Text = "";
  613. label21.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  614. label21.ForeColor = Color.Black;
  615. }
  616. }
  617. for(int i = 0;i < str10.Length;i++)
  618. {
  619. label21.Text = label21.Text + str10[i] + ' ';
  620. biology.Add(System.Convert.ToInt32(System.Convert.ToString(str10[i])));
  621. }
  622. ki = label20.Text;
  623. if(str11 != "")
  624. {
  625. if(ki[0] == 'Д')
  626. {
  627. label20.Text = "";
  628. label20.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  629. label20.ForeColor = Color.Black;
  630. }
  631. }
  632. for(int i = 0;i < str11.Length;i++)
  633. {
  634. label20.Text = label20.Text + str11[i] + ' ';
  635. physics.Add(System.Convert.ToInt32(System.Convert.ToString(str11[i])));
  636. }
  637. ki = label19.Text;
  638. if(str12 != "")
  639. {
  640. if(ki[0] == 'Д')
  641. {
  642. label19.Text = "";
  643. label19.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  644. label19.ForeColor = Color.Black;
  645. }
  646. }
  647. for(int i = 0;i < str12.Length;i++)
  648. {
  649. label19.Text = label19.Text + str12[i] + ' ';
  650. avia.Add(System.Convert.ToInt32(System.Convert.ToString(str12[i])));
  651. }
  652. button3.Visible = false;
  653. }
  654. void Button3Click(object sender, EventArgs e)
  655. {
  656. File.WriteAllText(@"C:\\new_file.txt", string.Empty);
  657. File.WriteAllText(@"C:\\new_file2.txt", string.Empty);
  658. File.WriteAllText(@"C:\\new_file3.txt", string.Empty);
  659. File.WriteAllText(@"C:\\new_file4.txt", string.Empty);
  660. File.WriteAllText(@"C:\\new_file5.txt", string.Empty);
  661. File.WriteAllText(@"C:\\new_file6.txt", string.Empty);
  662. File.WriteAllText(@"C:\\new_file7.txt", string.Empty);
  663. File.WriteAllText(@"C:\\new_file8.txt", string.Empty);
  664. File.WriteAllText(@"C:\\new_file9.txt", string.Empty);
  665. File.WriteAllText(@"C:\\new_file10.txt", string.Empty);
  666. File.WriteAllText(@"C:\\new_file11.txt", string.Empty);
  667. File.WriteAllText(@"C:\\new_file12.txt", string.Empty);
  668. }
  669. void Label10Click(object sender, EventArgs e)
  670. {
  671.  
  672. }
  673. void Label12Click(object sender, EventArgs e)
  674. {
  675.  
  676. }
  677. void MainFormLoad(object sender, EventArgs e)
  678. {
  679. if(!System.IO.File.Exists(@"C:\\new_file.txt"))
  680. {
  681. File.Create(@"C:\\new_file.txt").Close();
  682. }
  683. if(!System.IO.File.Exists(@"C:\\new_file2.txt"))
  684. {
  685. File.Create(@"C:\\new_file2.txt").Close();
  686. }
  687. if(!System.IO.File.Exists(@"C:\\new_file3.txt"))
  688. {
  689. File.Create(@"C:\\new_file3.txt").Close();
  690. }
  691. if(!System.IO.File.Exists(@"C:\\new_file4.txt"))
  692. {
  693. File.Create(@"C:\\new_file4.txt").Close();
  694. }
  695. if(!System.IO.File.Exists(@"C:\\new_file5.txt"))
  696. {
  697. File.Create(@"C:\\new_file5.txt").Close();
  698. }
  699. if(!System.IO.File.Exists(@"C:\\new_file6.txt"))
  700. {
  701. File.Create(@"C:\\new_file6.txt").Close();
  702. }
  703. if(!System.IO.File.Exists(@"C:\\new_file7.txt"))
  704. {
  705. File.Create(@"C:\\new_file7.txt").Close();
  706. }
  707. if(!System.IO.File.Exists(@"C:\\new_file8.txt"))
  708. {
  709. File.Create(@"C:\\new_file8.txt").Close();
  710. }
  711. if(!System.IO.File.Exists(@"C:\\new_file9.txt"))
  712. {
  713. File.Create(@"C:\\new_file9.txt").Close();
  714. }
  715. if(!System.IO.File.Exists(@"C:\\new_file10.txt"))
  716. {
  717. File.Create(@"C:\\new_file10.txt").Close();
  718. }
  719. if(!System.IO.File.Exists(@"C:\\new_file11.txt"))
  720. {
  721. File.Create(@"C:\\new_file11.txt").Close();
  722. }
  723. if(!System.IO.File.Exists(@"C:\\new_file12.txt"))
  724. {
  725. File.Create(@"C:\\new_file12.txt").Close();
  726. }
  727. }
  728. void Button5Click(object sender, EventArgs e)
  729. {
  730. ki = label29.Text;
  731. if(comboBox2.SelectedItem != null)
  732. {
  733. if(ki[0] == 'Д')
  734. {
  735. label29.Text = "";
  736. label29.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  737. label29.ForeColor = Color.Black;
  738. }
  739. label29.Text = label29.Text + System.Convert.ToString(comboBox2.SelectedItem) + ' ';
  740. litra.Add(System.Convert.ToInt32(comboBox2.SelectedItem));
  741. g = System.Convert.ToString(comboBox2.SelectedItem);
  742. File.AppendAllText(yu,g);
  743. }
  744. }
  745. void Button6Click(object sender, EventArgs e)
  746. {
  747. ki = label28.Text;
  748. if(comboBox3.SelectedItem != null)
  749. {
  750. if(ki[0] == 'Д')
  751. {
  752. label28.Text = "";
  753. label28.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  754. label28.ForeColor = Color.Black;
  755. }
  756. label28.Text = label28.Text + System.Convert.ToString(comboBox3.SelectedItem) + ' ';
  757. math.Add(System.Convert.ToInt32(comboBox3.SelectedItem));
  758. g = System.Convert.ToString(comboBox3.SelectedItem);
  759. File.AppendAllText(ty,g);
  760. }
  761. }
  762. void Button7Click(object sender, EventArgs e)
  763. {
  764. ki = label27.Text;
  765. if(comboBox4.SelectedItem != null)
  766. {
  767. if(ki[0] == 'Д')
  768. {
  769. label27.Text = "";
  770. label27.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  771. label27.ForeColor = Color.Black;
  772. }
  773. label27.Text = label27.Text + System.Convert.ToString(comboBox4.SelectedItem) + ' ';
  774. geometry.Add(System.Convert.ToInt32(comboBox4.SelectedItem));
  775. g = System.Convert.ToString(comboBox4.SelectedItem);
  776. File.AppendAllText(fg,g);
  777. }
  778. }
  779. void Button9Click(object sender, EventArgs e)
  780. {
  781. ki = label26.Text;
  782. if(comboBox5.SelectedItem != null)
  783. {
  784. if(ki[0] == 'Д')
  785. {
  786. label26.Text = "";
  787. label26.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  788. label26.ForeColor = Color.Black;
  789. }
  790. label26.Text = label26.Text + System.Convert.ToString(comboBox5.SelectedItem) + ' ';
  791. history.Add(System.Convert.ToInt32(comboBox5.SelectedItem));
  792. g = System.Convert.ToString(comboBox5.SelectedItem);
  793. File.AppendAllText(op,g);
  794. }}
  795. void Button8Click(object sender, EventArgs e)
  796. {
  797. ki = label25.Text;
  798. if(comboBox6.SelectedItem != null)
  799. {
  800. if(ki[0] == 'Д')
  801. {
  802. label25.Text = "";
  803. label25.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  804. label25.ForeColor = Color.Black;
  805. }
  806. label25.Text = label25.Text + System.Convert.ToString(comboBox6.SelectedItem) + ' ';
  807. obsh.Add(System.Convert.ToInt32(comboBox6.SelectedItem));
  808. g = System.Convert.ToString(comboBox6.SelectedItem);
  809. File.AppendAllText(ert,g);
  810. }}
  811. void Button11Click(object sender, EventArgs e)
  812. {
  813. ki = label24.Text;
  814. if(comboBox7.SelectedItem != null)
  815. {
  816. if(ki[0] == 'Д')
  817. {
  818. label24.Text = "";
  819. label24.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  820. label24.ForeColor = Color.Black;
  821. }
  822. label24.Text = label24.Text + System.Convert.ToString(comboBox7.SelectedItem) + ' ';
  823. english.Add(System.Convert.ToInt32(comboBox7.SelectedItem));
  824. g = System.Convert.ToString(comboBox7.SelectedItem);
  825. File.AppendAllText(qwe,g);
  826. }}
  827. void Button10Click(object sender, EventArgs e)
  828. {
  829. ki = label23.Text;
  830. if(comboBox8.SelectedItem != null)
  831. {
  832. if(ki[0] == 'Д')
  833. {
  834. label23.Text = "";
  835. label23.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  836. label23.ForeColor = Color.Black;
  837. }
  838. label23.Text = label23.Text + System.Convert.ToString(comboBox8.SelectedItem) + ' ';
  839. info.Add(System.Convert.ToInt32(comboBox8.SelectedItem));
  840. g = System.Convert.ToString(comboBox8.SelectedItem);
  841. File.AppendAllText(vb,g);
  842. }}
  843. void Button19Click(object sender, EventArgs e)
  844. {
  845. ki = label22.Text;
  846. if(comboBox9.SelectedItem != null)
  847. {
  848. if(ki[0] == 'Д')
  849. {
  850. label22.Text = "";
  851. label22.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  852. label22.ForeColor = Color.Black;
  853. }
  854. label22.Text = label22.Text + System.Convert.ToString(comboBox9.SelectedItem) + ' ';
  855. geography.Add(System.Convert.ToInt32(comboBox9.SelectedItem));
  856. g = System.Convert.ToString(comboBox9.SelectedItem);
  857. File.AppendAllText(bn,g);
  858. }
  859. }
  860. void Button18Click(object sender, EventArgs e)
  861. {
  862. ki = label21.Text;
  863. if(comboBox10.SelectedItem != null)
  864. {
  865. if(ki[0] == 'Д')
  866. {
  867. label21.Text = "";
  868. label21.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  869. label21.ForeColor = Color.Black;
  870. }
  871. label21.Text = label21.Text + System.Convert.ToString(comboBox10.SelectedItem) + ' ';
  872. biology.Add(System.Convert.ToInt32(comboBox10.SelectedItem));
  873. g = System.Convert.ToString(comboBox10.SelectedItem);
  874. File.AppendAllText(nm,g);
  875. }
  876. }
  877. void Button16Click(object sender, EventArgs e)
  878. {
  879. ki = label20.Text;
  880. if(comboBox11.SelectedItem != null)
  881. {
  882. if(ki[0] == 'Д')
  883. {
  884. label20.Text = "";
  885. label20.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  886. label20.ForeColor = Color.Black;
  887. }
  888. label20.Text = label20.Text + System.Convert.ToString(comboBox11.SelectedItem) + ' ';
  889. physics.Add(System.Convert.ToInt32(comboBox11.SelectedItem));
  890. g = System.Convert.ToString(comboBox11.SelectedItem);
  891. File.AppendAllText(mn,g);
  892. }
  893. }
  894. void Label41Click(object sender, EventArgs e)
  895. {
  896.  
  897. }
  898. void Button17Click(object sender, EventArgs e)
  899. {
  900. ki = label19.Text;
  901. if(comboBox12.SelectedItem != null)
  902. {
  903. if(ki[0] == 'Д')
  904. {
  905. label19.Text = "";
  906. label19.Font = new Font("Microsoft Sans Serif", 9F, FontStyle.Regular);
  907. label19.ForeColor = Color.Black;
  908. }
  909. label19.Text = label19.Text + System.Convert.ToString(comboBox12.SelectedItem) + ' ';
  910. avia.Add(System.Convert.ToInt32(comboBox12.SelectedItem));
  911. g = System.Convert.ToString(comboBox12.SelectedItem);
  912. File.AppendAllText(nb,g);
  913. }
  914. }
  915. void Label17Click(object sender, EventArgs e)
  916. {
  917.  
  918. }
  919. void ComboBox13SelectedIndexChanged(object sender, EventArgs e)
  920. {
  921. // TODO: Implement ComboBox13SelectedIndexChanged
  922. }
  923. void Label5Click(object sender, EventArgs e)
  924. {
  925. // TODO: Implement Label5Click
  926. }}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement