roketto-launch/NewForm.cs

136 lines
5.0 KiB
C#
Raw Normal View History

2024-08-06 20:27:08 +00:00
using System.Windows.Forms;
using RokettoLaunch.Models;
using RyzStudio.Windows.Forms;
using RyzStudio.Windows.ThemedForms;
namespace RokettoLaunch
{
public class NewForm : Form
{
private System.Windows.Forms.Label label1;
private ThNumericBox numericBox1;
private ThNumericBox numericBox2;
private RyzStudio.Windows.ThemedForms.Composite.DialogFooter dialogFooter1;
private Label label2;
public NewForm()
{
InitializeComponent();
UISetup.Dialog(this);
numericBox1.Minimum = 4;
numericBox1.Maximum = 24;
numericBox1.Value = 8;
numericBox2.Minimum = 1;
numericBox2.Maximum = 8;
numericBox2.Value = 1;
}
private void InitializeComponent()
{
label1 = new Label();
numericBox1 = new ThNumericBox();
numericBox2 = new ThNumericBox();
label2 = new Label();
dialogFooter1 = new RyzStudio.Windows.ThemedForms.Composite.DialogFooter();
SuspendLayout();
//
// label1
//
label1.AutoSize = true;
label1.BackColor = System.Drawing.Color.Transparent;
label1.ForeColor = System.Drawing.SystemColors.ControlText;
label1.Location = new System.Drawing.Point(10, 20);
label1.Margin = new Padding(0);
label1.Name = "label1";
label1.Padding = new Padding(0, 9, 0, 0);
label1.Size = new System.Drawing.Size(76, 24);
label1.TabIndex = 153;
label1.Text = "Tiles Per Row";
label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// numericBox1
//
numericBox1.Anchor = AnchorStyles.Top | AnchorStyles.Right;
numericBox1.BackColor = System.Drawing.Color.Transparent;
numericBox1.EnableReactiveVisual = true;
numericBox1.Font = new System.Drawing.Font("Segoe UI", 9F);
numericBox1.Location = new System.Drawing.Point(285, 20);
numericBox1.Maximum = 100;
numericBox1.Minimum = 1;
numericBox1.Name = "numericBox1";
numericBox1.Size = new System.Drawing.Size(84, 32);
numericBox1.TabIndex = 189;
numericBox1.TabStop = false;
numericBox1.Value = 1;
//
// numericBox2
//
numericBox2.Anchor = AnchorStyles.Top | AnchorStyles.Right;
numericBox2.BackColor = System.Drawing.Color.Transparent;
numericBox2.EnableReactiveVisual = true;
numericBox2.Font = new System.Drawing.Font("Segoe UI", 9F);
numericBox2.Location = new System.Drawing.Point(285, 63);
numericBox2.Maximum = 100;
numericBox2.Minimum = 1;
numericBox2.Name = "numericBox2";
numericBox2.Size = new System.Drawing.Size(84, 32);
numericBox2.TabIndex = 191;
numericBox2.TabStop = false;
numericBox2.Value = 1;
//
// label2
//
label2.AutoSize = true;
label2.BackColor = System.Drawing.Color.Transparent;
label2.ForeColor = System.Drawing.SystemColors.ControlText;
label2.Location = new System.Drawing.Point(10, 63);
label2.Margin = new Padding(0);
label2.Name = "label2";
label2.Padding = new Padding(0, 9, 0, 0);
label2.Size = new System.Drawing.Size(106, 24);
label2.TabIndex = 190;
label2.Text = "Number of Groups";
label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// dialogFooter1
//
dialogFooter1.BackColor = System.Drawing.Color.FromArgb(240, 240, 240);
dialogFooter1.Button1Text = "&OK";
dialogFooter1.Dialog = this;
dialogFooter1.Dock = DockStyle.Bottom;
dialogFooter1.Location = new System.Drawing.Point(0, 337);
dialogFooter1.Name = "dialogFooter1";
dialogFooter1.Size = new System.Drawing.Size(384, 84);
//
// NewForm
//
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
AutoScaleMode = AutoScaleMode.Font;
BackColor = System.Drawing.Color.White;
ClientSize = new System.Drawing.Size(384, 421);
Controls.Add(dialogFooter1);
Controls.Add(numericBox2);
Controls.Add(label2);
Controls.Add(numericBox1);
Controls.Add(label1);
MinimumSize = new System.Drawing.Size(400, 200);
Name = "NewForm";
Text = "New";
ResumeLayout(false);
PerformLayout();
}
public NewFormModel Result
{
get => new NewFormModel()
{
ColumnCount = numericBox1.Value,
GroupCount = numericBox2.Value
};
}
}
}