FormAutorize.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Drawing.Drawing2D;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. using System.Windows.Forms;
  11. using System.Windows.Forms.Design;
  12. namespace ImpulseVision
  13. {
  14. public partial class FormAutorize : Form
  15. {
  16. public FormAutorize()
  17. {
  18. InitializeComponent();
  19. }
  20. private void BtnLogin_Click(object sender, EventArgs e)
  21. {
  22. this.Hide();
  23. FormMain FMain = new FormMain();
  24. FMain.ShowDialog();
  25. }
  26. private void FormAutorize_FormClosing(object sender, FormClosingEventArgs e)
  27. {
  28. }
  29. private void FormAutorize_Load(object sender, EventArgs e)
  30. {
  31. FormStart FStart = new FormStart();
  32. FStart.ShowDialog();
  33. }
  34. /// <summary>
  35. /// рисование градиентной заливки на форме
  36. /// </summary>
  37. private void FormAutorize_Paint(object sender, PaintEventArgs e)
  38. {
  39. Point PtStart = new Point(0, 0);
  40. Point PtEnd = new Point(Width, Height);
  41. Color ColFirst = ColorTranslator.FromHtml("#0F2834");
  42. Color ColThird = ColorTranslator.FromHtml("#496870");
  43. LinearGradientBrush LGB = new LinearGradientBrush(PtStart, PtEnd, ColFirst, ColThird);
  44. Pen MyPen = new Pen(LGB);
  45. Rectangle Rect = new Rectangle(PtStart,new Size(PtEnd));
  46. //e.Graphics.DrawRectangle(MyPen, 0, 0, Width, Height);
  47. e.Graphics.FillRectangle(LGB, Rect);
  48. }
  49. private void FormAutorize_Resize(object sender, EventArgs e)
  50. {
  51. Invalidate();
  52. }
  53. }
  54. }