Files
Tritone/HorseRacingPredictor/HorseRacingPredictor/App.xaml.cs
T
Alby96 0d3769db79 Aggiunta download CSV supplementari e restyling impostazioni
- Introdotto supporto per download dati supplementari Calcio (statistiche giocatori, squadre, marcatori, assist, cartellini, rose, allenatori, trasferimenti) con esportazione CSV separati
- Nuova classe SupplementaryDataExporter e client API dedicati per ogni endpoint
- UI impostazioni completamente rinnovata: selezione dinamica endpoint/supplementari, sorgente dati (API/CSV), parametri avanzati
- Migliorata dashboard con stat card, header e sidebar moderni
- Gestione errori globali migliorata
- Refactoring: rimosso codice VirtualFootball/WebView2, unificato caricamento CSV, gestione timezone con ComboBox IANA
- Aggiornato .gitignore e aggiunto template appsettings per sicurezza/configurazione
2026-04-14 18:07:31 +02:00

39 lines
1.3 KiB
C#

using System;
using System.Windows;
using System.Windows.Threading;
namespace HorseRacingPredictor
{
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
DispatcherUnhandledException += App_DispatcherUnhandledException;
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
base.OnStartup(e);
}
private void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
{
MessageBox.Show(
$"Errore non gestito:\n\n{e.Exception.GetType().Name}: {e.Exception.Message}\n\n{e.Exception.StackTrace}",
"Errore applicazione",
MessageBoxButton.OK,
MessageBoxImage.Error);
e.Handled = true;
}
private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
if (e.ExceptionObject is Exception ex)
{
MessageBox.Show(
$"Errore fatale:\n\n{ex.GetType().Name}: {ex.Message}\n\n{ex.StackTrace}",
"Errore fatale",
MessageBoxButton.OK,
MessageBoxImage.Error);
}
}
}
}