Program.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Data;
  4. using System.Data.SqlClient;
  5. using System.Linq;
  6. using System.Threading.Tasks;
  7. using System.Windows.Forms;
  8. namespace Демо
  9. {
  10. static class Program
  11. {
  12. public static Form mainf { get; set; }
  13. /// <summary>
  14. /// Главная точка входа для приложения.
  15. /// </summary>
  16. [STAThread]
  17. static void Main()
  18. {
  19. Application.EnableVisualStyles();
  20. Application.SetCompatibleTextRenderingDefault(false);
  21. mainf = new Авторизация();
  22. while (mainf != null)
  23. {
  24. Application.Run(mainf);
  25. }
  26. Application.Exit();
  27. }
  28. public static void conn(out SqlConnection cn)
  29. {
  30. string ConnStr = "Data Source=(local);Initial Catalog=\"Школа языков\";Integrated Security=True";
  31. cn = new SqlConnection(ConnStr);
  32. cn.Open();
  33. }
  34. internal static class Role
  35. {
  36. public static string email { get; set; }
  37. public static int id { get; set; }
  38. public static DataTable table { get; set; }
  39. }
  40. }
  41. }