-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProgram.cs
More file actions
42 lines (38 loc) · 1.44 KB
/
Program.cs
File metadata and controls
42 lines (38 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using SALC.Views;
using SALC.BLL;
using SALC.DAL;
namespace SALC
{
/// <summary>
/// Clase principal que contiene el punto de entrada de la aplicación.
/// Inicializa la configuración de Windows Forms y la pantalla de login.
/// </summary>
internal static class Program
{
/// <summary>
/// Punto de entrada principal de la aplicación.
/// Configura Windows Forms, inicializa los servicios necesarios y muestra la pantalla de login.
/// </summary>
/// <param name="args">Argumentos de línea de comandos</param>
[STAThread]
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
// Crear la vista de login
var login = new FrmLogin();
// Configurar servicios mediante inyección de dependencias manual
var usuariosRepo = new UsuarioRepositorio();
var hasher = new DefaultPasswordHasher();
var auth = new AutenticacionService(usuariosRepo, hasher);
var presenter = new SALC.Presenters.LoginPresenter(login, auth);
// Ejecutar la aplicación con el login como formulario principal
Application.Run(login);
}
}
}