namespace ZA.CoreService.ESBCertificateManager.Setup; internal static class SettingsUi { public static readonly Color Background = Color.FromArgb(10, 18, 34); public static readonly Color Sidebar = Color.FromArgb(7, 23, 45); public static readonly Color Card = Color.FromArgb(16, 38, 65); public static readonly Color CardHover = Color.FromArgb(23, 55, 94); public static readonly Color Border = Color.FromArgb(36, 74, 117); public static readonly Color Text = Color.FromArgb(241, 245, 249); public static readonly Color Muted = Color.FromArgb(169, 184, 200); public static readonly Color Gold = Color.FromArgb(208, 171, 57); public static readonly Color Blue = Color.FromArgb(0, 110, 182); public static readonly Color Green = Color.FromArgb(60, 203, 127); public static readonly Color Red = Color.FromArgb(239, 106, 106); public static Button CreatePrimaryButton(string text) { Button button = new() { Text = text, BackColor = Gold, ForeColor = Color.FromArgb(30, 25, 10), FlatStyle = FlatStyle.Flat, Font = new Font("Segoe UI Semibold", 9f, FontStyle.Bold), Cursor = Cursors.Hand, Height = 38 }; button.FlatAppearance.BorderSize = 0; button.FlatAppearance.MouseOverBackColor = Color.FromArgb(226, 196, 93); return button; } public static Button CreateGhostButton(string text) { Button button = new() { Text = text, BackColor = Card, ForeColor = Text, FlatStyle = FlatStyle.Flat, Font = new Font("Segoe UI Semibold", 9f, FontStyle.Bold), Cursor = Cursors.Hand, Height = 38 }; button.FlatAppearance.BorderColor = Border; button.FlatAppearance.BorderSize = 1; button.FlatAppearance.MouseOverBackColor = CardHover; return button; } public static TextBox CreateTextBox() { return new TextBox { BackColor = Color.FromArgb(12, 28, 48), ForeColor = Text, BorderStyle = BorderStyle.FixedSingle, Font = new Font("Segoe UI", 10f), Height = 30 }; } public static ComboBox CreateComboBox() { return new ComboBox { BackColor = Color.FromArgb(12, 28, 48), ForeColor = Text, FlatStyle = FlatStyle.Flat, DropDownStyle = ComboBoxStyle.DropDownList, Font = new Font("Segoe UI", 10f), Height = 30 }; } public static Label CreateFieldLabel(string text) { return new Label { Text = text, AutoSize = true, ForeColor = Muted, Font = new Font("Segoe UI Semibold", 8.5f, FontStyle.Bold) }; } public static Panel CreateCard() { return new Panel { BackColor = Card, Padding = new Padding(18) }; } public static ListView CreateListView() { ListView list = new() { View = View.Details, FullRowSelect = true, MultiSelect = false, HeaderStyle = ColumnHeaderStyle.Nonclickable, BorderStyle = BorderStyle.FixedSingle, BackColor = Color.FromArgb(12, 28, 48), ForeColor = Text, Font = new Font("Segoe UI", 9.5f), HideSelection = false }; return list; } public static void PaintCardBorder( object? sender, PaintEventArgs e) { if (sender is not Control control) { return; } using Pen pen = new(Border, 1); Rectangle bounds = control.ClientRectangle; bounds.Width -= 1; bounds.Height -= 1; e.Graphics.DrawRectangle(pen, bounds); } }