mirror of
https://github.com/n00mkrad/flowframes.git
synced 2026-09-01 19:51:28 +02:00
Make SplashForm more flexible, cleanup
This commit is contained in:
@@ -43,10 +43,6 @@ namespace Flowframes
|
||||
|
||||
var optsSet = new OptionSet
|
||||
{
|
||||
// {
|
||||
// "c|console", "Show console",
|
||||
// v => ShowConsole = v != null
|
||||
// },
|
||||
{
|
||||
"np|no_python", "Disable Python implementations",
|
||||
v => DisablePython = v != null
|
||||
|
||||
@@ -52,7 +52,8 @@ namespace Flowframes.Forms.Main
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
new SplashForm().Show();
|
||||
var splash = new SplashForm("Starting Flowframes...");
|
||||
splash.Show();
|
||||
|
||||
if (Program.CmdMode)
|
||||
{
|
||||
|
||||
30
CodeLegacy/Forms/SplashForm.Designer.cs
generated
30
CodeLegacy/Forms/SplashForm.Designer.cs
generated
@@ -28,22 +28,22 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.loadingTextLabel = new System.Windows.Forms.Label();
|
||||
this.statusLabel = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// loadingTextLabel
|
||||
// statusLabel
|
||||
//
|
||||
this.loadingTextLabel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.loadingTextLabel.Font = new System.Drawing.Font("Yu Gothic UI", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.loadingTextLabel.ForeColor = System.Drawing.Color.White;
|
||||
this.loadingTextLabel.Location = new System.Drawing.Point(0, 0);
|
||||
this.loadingTextLabel.Margin = new System.Windows.Forms.Padding(3, 0, 3, 10);
|
||||
this.loadingTextLabel.Name = "loadingTextLabel";
|
||||
this.loadingTextLabel.Size = new System.Drawing.Size(480, 220);
|
||||
this.loadingTextLabel.TabIndex = 2;
|
||||
this.loadingTextLabel.Text = "Starting Flowframes...";
|
||||
this.loadingTextLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.loadingTextLabel.UseWaitCursor = true;
|
||||
this.statusLabel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.statusLabel.Font = new System.Drawing.Font("Yu Gothic UI", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.statusLabel.ForeColor = System.Drawing.Color.White;
|
||||
this.statusLabel.Location = new System.Drawing.Point(0, 0);
|
||||
this.statusLabel.Margin = new System.Windows.Forms.Padding(3, 0, 3, 10);
|
||||
this.statusLabel.Name = "statusLabel";
|
||||
this.statusLabel.Size = new System.Drawing.Size(480, 220);
|
||||
this.statusLabel.TabIndex = 2;
|
||||
this.statusLabel.Text = "Starting Flowframes...";
|
||||
this.statusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.statusLabel.UseWaitCursor = true;
|
||||
//
|
||||
// SplashForm
|
||||
//
|
||||
@@ -51,7 +51,7 @@
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
|
||||
this.ClientSize = new System.Drawing.Size(480, 220);
|
||||
this.Controls.Add(this.loadingTextLabel);
|
||||
this.Controls.Add(this.statusLabel);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.MaximizeBox = false;
|
||||
this.MaximumSize = new System.Drawing.Size(480, 220);
|
||||
@@ -72,6 +72,6 @@
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label loadingTextLabel;
|
||||
public System.Windows.Forms.Label statusLabel;
|
||||
}
|
||||
}
|
||||
@@ -4,9 +4,13 @@ namespace Flowframes.Forms
|
||||
{
|
||||
public partial class SplashForm : Form
|
||||
{
|
||||
public SplashForm()
|
||||
public static SplashForm Inst;
|
||||
|
||||
public SplashForm(string status = "")
|
||||
{
|
||||
Inst = this;
|
||||
InitializeComponent();
|
||||
SetStatus(status);
|
||||
}
|
||||
|
||||
private void SplashForm_Load(object sender, System.EventArgs e)
|
||||
@@ -16,5 +20,10 @@ namespace Flowframes.Forms
|
||||
Opacity = 1f;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetStatus(string status)
|
||||
{
|
||||
statusLabel.Text = status;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Flowframes.Os
|
||||
|
||||
string name = device.GetProperties().DeviceName;
|
||||
VkDevices.Add(new VkDevice { Id = idx, Name = name, ComputeQueueCount = compQueues });
|
||||
Logger.Log($"[VK] Found Vulkan device: {VkDevices.Last()} ({compQueues} Compute Queues)", true);
|
||||
Logger.Log($"[VK] Found Vulkan device: {VkDevices.Last()}", true);
|
||||
}
|
||||
|
||||
// Clean up Vulkan resources
|
||||
|
||||
Reference in New Issue
Block a user