using System.Windows; using AGEHAB.RelatorioSeadIpasgo.Application.UseCases; using AGEHAB.RelatorioSeadIpasgo.Domain.Services; using AGEHAB.RelatorioSeadIpasgo.Infrastructure.Database; using AGEHAB.RelatorioSeadIpasgo.Infrastructure.Excel; using AGEHAB.RelatorioSeadIpasgo.Infrastructure.Zip; using AGEHAB.RelatorioSeadIpasgo.Presentation; using AGEHAB.RelatorioSeadIpasgo.Presentation.Services; using AGEHAB.RelatorioSeadIpasgo.Presentation.ViewModels; namespace AGEHAB.RelatorioSeadIpasgo; public partial class App : System.Windows.Application { protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); const string connectionString = "Server=10.6.57.33; initial catalog=ERP_RH_AGEHAB; User Id=usr_pld; Password=Consulta01; MultipleActiveResultSets=true; TrustServerCertificate=True"; var repository = new RelatorioRepository(connectionString); var filtroIpasgoService = new FiltroIpasgoService(); var excelWriter = new ExcelRelatorioWriter(); var zipWriter = new IpasgoZipWriter(); var carregarCompetenciasUseCase = new CarregarCompetenciasUseCase(repository); var gerarRelatorioUseCase = new GerarRelatorioUseCase(repository, filtroIpasgoService, excelWriter, zipWriter); var dialogService = new UserDialogService(); var viewModel = new MainViewModel(carregarCompetenciasUseCase, gerarRelatorioUseCase, dialogService); var window = new MainWindow(viewModel); window.Show(); } }