Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 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.Windows.Forms;
  9.  
  10.  
  11. namespace WindowsFormsApplication1
  12. {
  13. public partial class Form1 : Form
  14. {
  15. public Form1()
  16. {
  17. InitializeComponent();
  18. }
  19.  
  20. private void button1_Click(object sender, EventArgs e)
  21. {
  22. private void textBox1_TextChanged(object sender, EventArgs e)
  23. {
  24. if (textBox1.TextLength>0)
  25. label1.Text = textBox1.Text;
  26. else
  27. MessageBox.Show("wprowadz tekst");
  28.  
  29. }
  30.  
  31. private void textBox2_TextChanged(object sender, EventArgs e)
  32. {
  33. if (button3_Click.x==true)
  34. {
  35. int a;
  36. int c;
  37.  
  38. Int32.TryParse(textBox1.Text,out c);
  39. if (c!=0)
  40. {
  41. a = Int32.Parse(textBox1.Text);
  42. if (textBox1.Lines.Length < (a - 1))
  43. {
  44. string b;
  45. //b = textBox2.Lines[a];
  46. MessageBox.Show(textBox2.Lines[a]);
  47.  
  48.  
  49. }
  50. }
  51. }
  52. else
  53. MessageBox.Show("input error");
  54.  
  55. }
  56.  
  57. private void button3_Click(object sender, EventArgs e)
  58. {
  59. bool x;
  60. x = true;
  61. }
  62. }
  63. }
  64.  
  65. button1.Text = "tekst";
  66. Close();
  67. }
  68.  
  69. private void button2_Click(object sender, EventArgs e)
  70. {
  71. button1.Text = "inna nazwa";
  72. }
  73.  
  74. private void label1_Click(object sender, EventArgs e)
  75. {
  76.  
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement