- Introdotti nuovi controlli moderni (es. ModernButton, ModernDataGridView). - Aggiunto il tema scuro con colori, font e spaziature uniformi. - Aggiornati `Main.Designer.cs` e `Main.cs` per utilizzare i nuovi controlli. - Rimossi controlli e metodi obsoleti (es. ProgressDialog). - Migliorati layout, dimensioni e testi per una migliore usabilità. - Aggiunti metodi helper per configurazioni rapide nei controlli. - Implementato design modulare per una maggiore manutenibilità.
79 lines
2.3 KiB
C#
79 lines
2.3 KiB
C#
using System.Drawing;
|
|
using System.Windows.Forms;
|
|
|
|
namespace BettingPredictor.UI.Controls
|
|
{
|
|
/// <summary>
|
|
/// Label moderna con tema scuro e testo ben visibile
|
|
/// </summary>
|
|
public class ModernLabel : Label
|
|
{
|
|
public ModernLabel()
|
|
{
|
|
// Configurazione base per visibilità su sfondo scuro
|
|
ForeColor = ModernTheme.Colors.TextSecondary;
|
|
Font = ModernTheme.Fonts.RegularFont;
|
|
BackColor = Color.Transparent;
|
|
AutoSize = true;
|
|
|
|
// Abilita anti-aliasing per testo più leggibile
|
|
SetStyle(ControlStyles.OptimizedDoubleBuffer |
|
|
ControlStyles.AllPaintingInWmPaint, true);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Imposta lo stile del label come titolo
|
|
/// </summary>
|
|
public void SetAsTitleLabel()
|
|
{
|
|
Font = ModernTheme.Fonts.TitleFont;
|
|
ForeColor = ModernTheme.Colors.TextPrimary;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Imposta lo stile del label come sottotitolo
|
|
/// </summary>
|
|
public void SetAsSubtitleLabel()
|
|
{
|
|
Font = ModernTheme.Fonts.SubtitleFont;
|
|
ForeColor = ModernTheme.Colors.TextPrimary;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Imposta lo stile del label come testo di stato
|
|
/// </summary>
|
|
public void SetAsStatusLabel()
|
|
{
|
|
Font = ModernTheme.Fonts.RegularFont;
|
|
ForeColor = ModernTheme.Colors.TextSecondary;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Imposta lo stile del label come testo di successo
|
|
/// </summary>
|
|
public void SetAsSuccessLabel()
|
|
{
|
|
Font = ModernTheme.Fonts.RegularFont;
|
|
ForeColor = ModernTheme.Colors.AccentSuccess;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Imposta lo stile del label come testo di errore
|
|
/// </summary>
|
|
public void SetAsErrorLabel()
|
|
{
|
|
Font = ModernTheme.Fonts.RegularFont;
|
|
ForeColor = ModernTheme.Colors.AccentError;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Imposta lo stile del label come testo di warning
|
|
/// </summary>
|
|
public void SetAsWarningLabel()
|
|
{
|
|
Font = ModernTheme.Fonts.RegularFont;
|
|
ForeColor = ModernTheme.Colors.AccentWarning;
|
|
}
|
|
}
|
|
}
|