Files
flowframes/CodeLegacy/Forms/SplashForm.cs

33 lines
946 B
C#
Raw Normal View History

2024-10-16 11:09:44 +02:00
using System.Drawing;
using System.Windows.Forms;
namespace Flowframes.Forms
{
public partial class SplashForm : Form
{
2024-10-16 11:09:44 +02:00
public enum TextSize { Small, Medium, Large }
private static readonly string[] fontPresets = { "Yu Gothic UI, 14pt", "Yu Gothic UI, 18pt", "Yu Gothic UI, 21.75pt" };
2024-10-16 10:26:05 +02:00
2024-10-16 11:09:44 +02:00
public SplashForm(string status = "", bool topMost = true, TextSize textSize = TextSize.Large)
{
InitializeComponent();
2024-10-16 10:26:05 +02:00
SetStatus(status);
2024-10-16 11:09:44 +02:00
TopMost = topMost;
statusLabel.Font = (Font)new FontConverter().ConvertFromInvariantString(fontPresets[(int)textSize]);
}
2024-09-28 21:33:36 +02:00
private void SplashForm_Load(object sender, System.EventArgs e)
{
if (!Program.CmdMode)
{
Opacity = 1f;
}
}
2024-10-16 10:26:05 +02:00
public void SetStatus(string status)
{
statusLabel.Text = status;
}
}
}