mirror of
https://github.com/n00mkrad/flowframes.git
synced 2025-12-16 16:37:48 +01:00
38 lines
1.0 KiB
C#
38 lines
1.0 KiB
C#
using System.Drawing;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Flowframes.Forms
|
|
{
|
|
public partial class SplashForm : Form
|
|
{
|
|
public enum TextSize { Small, Medium, Large }
|
|
private static readonly string[] fontPresets = { "Yu Gothic UI, 14pt", "Yu Gothic UI, 18pt", "Yu Gothic UI, 21.75pt" };
|
|
|
|
public SplashForm(string status = "", bool topMost = true, TextSize textSize = TextSize.Large, bool show = true)
|
|
{
|
|
InitializeComponent();
|
|
SetStatus(status);
|
|
TopMost = topMost;
|
|
statusLabel.Font = (Font)new FontConverter().ConvertFromInvariantString(fontPresets[(int)textSize]);
|
|
|
|
if (show)
|
|
{
|
|
Show();
|
|
}
|
|
}
|
|
|
|
private void SplashForm_Load(object sender, System.EventArgs e)
|
|
{
|
|
if (!Program.CmdMode)
|
|
{
|
|
Opacity = 1f;
|
|
}
|
|
}
|
|
|
|
public void SetStatus(string status)
|
|
{
|
|
statusLabel.Text = status;
|
|
}
|
|
}
|
|
}
|