Autorization(FirstWindows).cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 proba
  11. {
  12. public partial class Autorization : Form
  13. {
  14. public Autorization()
  15. {
  16. InitializeComponent();
  17. }
  18. private void knopka_vhod(object sender, EventArgs e)
  19. {
  20. this.Hide();
  21. PosleVHODA posleVHODA = new PosleVHODA();
  22. posleVHODA.Show();
  23. }
  24. Point lastpoint;//класс для координат
  25. private void panel1_MouseMove(object sender, MouseEventArgs e) // метод для того, чтобы двигали окно при нажатии на ЛКМ
  26. {
  27. if (e.Button == MouseButtons.Left)
  28. {
  29. this.Left += e.X - lastpoint.X;
  30. this.Top += e.Y - lastpoint.Y;
  31. }
  32. }
  33. private void panel1_MouseDown(object sender, MouseEventArgs e)
  34. {
  35. lastpoint = new Point(e.X, e.Y);
  36. }
  37. private void Autorization_Load(object sender, EventArgs e)
  38. {
  39. this.Size = new Size(758, 449);
  40. this.MaximumSize = new Size(758, 449);
  41. this.MinimumSize = new Size(758, 449);
  42. }
  43. private void button4_Click(object sender, EventArgs e)
  44. {
  45. this.Hide();
  46. PosleRegistracii posleRegistracii = new PosleRegistracii();
  47. posleRegistracii.Show();
  48. }
  49. public void global_FormClosed(object sender, EventArgs e)
  50. {
  51. Application.Exit();
  52. }
  53. }
  54. }