Form1.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. namespace zadanie2
  11. {
  12. public partial class Form1 : Form
  13. {
  14. public Form1()
  15. {
  16. InitializeComponent();
  17. }
  18. private void button1_Click(object sender, EventArgs e)
  19. {
  20. string firstName = textBox1.Text;
  21. string lastName = textBox2.Text;
  22. string password = textBox3.Text;
  23. User user = new User();
  24. user.FirstName = firstName;
  25. user.LastName = lastName;
  26. user.Password = password;
  27. bool isRegistered = RegisterUser(user);
  28. if (isRegistered)
  29. {
  30. MessageBox.Show("Вы успешно зарегестрировались");
  31. ClearForm();
  32. }
  33. else
  34. {
  35. MessageBox.Show("Не удалось зарегестрироваться, попробуйте позже");
  36. }
  37. }
  38. private bool RegisterUser(User user)
  39. {
  40. throw new NotImplementedException();
  41. }
  42. private void ClearForm()
  43. {
  44. throw new NotImplementedException();
  45. }
  46. }
  47. }