Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.32 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace WindowsFormsApplication3
  12. {
  13. public partial class Form1 : Form
  14. {
  15. char a, b, t;
  16. string username = "gogo" , password = "qwer";
  17. int ctr = 0, dd = 0;
  18. public Form1()
  19. {
  20. InitializeComponent();
  21. }
  22.  
  23. private void Form1_Load(object sender, EventArgs e)
  24. {
  25.  
  26. }
  27.  
  28. private void textBox1_TextChanged(object sender, EventArgs e)
  29. {
  30.  
  31. }
  32.  
  33. private void textBox2_TextChanged(object sender, EventArgs e)
  34. {
  35.  
  36. }
  37.  
  38. private void textBox3_TextChanged(object sender, EventArgs e)
  39. {
  40.  
  41. }
  42.  
  43. private void textBox4_TextChanged(object sender, EventArgs e)
  44. {
  45.  
  46. }
  47.  
  48. private void button1_Click(object sender, EventArgs e)
  49. {
  50.  
  51. b = Convert.ToChar(textBox1.Text);
  52. a = Convert.ToChar(textBox2.Text);
  53. t = Convert.ToChar(textBox3.Text);
  54.  
  55. textBox4.Text = b + " " + a + " " + t;
  56. }
  57.  
  58. private void label3_Click(object sender, EventArgs e)
  59. {
  60.  
  61. }
  62. int sk = 0;
  63. private void button2_Click(object sender, EventArgs e)
  64. {
  65. username = Convert.ToString(textBox5.Text);
  66. password = Convert.ToString(textBox6.Text);
  67.  
  68. // MessageBox.Show(username + " " + password);
  69. if (sk < 3)
  70. {
  71. if (username == "gogo" && password == "qwer")
  72. {
  73. MessageBox.Show("teisingai");
  74. sk = 0;
  75. }
  76. else
  77. {
  78. MessageBox.Show("Neteisingai");
  79. sk++;
  80. }
  81.  
  82. }
  83. else
  84. {
  85. MessageBox.Show("Jus esate uzblokuotas");
  86. }
  87. }
  88.  
  89.  
  90. private void textBox5_TextChanged(object sender, EventArgs e)
  91. {
  92.  
  93. }
  94.  
  95. private void textBox6_TextChanged(object sender, EventArgs e)
  96. {
  97.  
  98. }
  99.  
  100. private void textBox7_TextChanged(object sender, EventArgs e)
  101. {
  102.  
  103. }
  104.  
  105. private void textBox8_TextChanged(object sender, EventArgs e)
  106. {
  107.  
  108. }
  109.  
  110. private void textBox9_TextChanged(object sender, EventArgs e)
  111. {
  112.  
  113. }
  114.  
  115. private void button3_Click(object sender, EventArgs e)
  116. {
  117. double a, c;
  118. char b;
  119. a = Convert.ToDouble(textBox7.Text);
  120. b = Convert.ToChar(textBox8.Text);
  121. c = Convert.ToDouble(textBox9.Text);
  122.  
  123. if(b == '+'){
  124. textBox10.Text = Convert.ToString(a + c);
  125. }
  126. else if(b == '-'){
  127. textBox10.Text = Convert.ToString(a - c);
  128. }
  129. else if(b == '*'){
  130. textBox10.Text = Convert.ToString(a * c);
  131. }
  132. else if(b == '/'){
  133. textBox10.Text = Convert.ToString(a / c);
  134. }
  135.  
  136.  
  137. }
  138.  
  139. private void textBox10_TextChanged(object sender, EventArgs e)
  140. {
  141.  
  142. }
  143.  
  144. private void textBox11_TextChanged(object sender, EventArgs e)
  145. {
  146.  
  147. }
  148.  
  149. private void button4_Click(object sender, EventArgs e)
  150. {
  151. double a, b = 3.14;
  152. a = Convert.ToDouble(textBox11.Text);
  153. textBox12.Text = Convert.ToString(2 * b * a);
  154. }
  155.  
  156. private void textBox12_TextChanged(object sender, EventArgs e)
  157. {
  158.  
  159. }
  160.  
  161. private void textBox13_TextChanged(object sender, EventArgs e)
  162. {
  163.  
  164. }
  165.  
  166. private void button5_Click(object sender, EventArgs e)
  167. {
  168. char a;
  169. a = Convert.ToChar(textBox13.Text);
  170. if (char.IsLower(a))
  171. {
  172. MessageBox.Show("mazoji");
  173. }
  174. else
  175. {
  176. MessageBox.Show("didzioji");
  177. }
  178. }
  179.  
  180. private void textBox14_TextChanged(object sender, EventArgs e)
  181. {
  182.  
  183. }
  184. }
  185. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement