Min. value is now 1. Removed pointless check.

This commit is contained in:
MattNL
2023-06-02 15:27:19 -04:00
parent a05fbd63d5
commit e8cd6fd5db
2 changed files with 87 additions and 92 deletions

View File

@@ -29,107 +29,103 @@ namespace PckStudio.Forms.Additional_Popups.Animation
/// </summary>
private void InitializeComponent()
{
this.saveButton = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.cancelButton = new System.Windows.Forms.Button();
this.TimeUpDown = new System.Windows.Forms.NumericUpDown();
((System.ComponentModel.ISupportInitialize)(this.TimeUpDown)).BeginInit();
this.SuspendLayout();
//
// saveButton
//
this.saveButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.saveButton.ForeColor = System.Drawing.Color.White;
this.saveButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.saveButton.Location = new System.Drawing.Point(55, 63);
this.saveButton.Name = "saveButton";
this.saveButton.Size = new System.Drawing.Size(75, 23);
this.saveButton.TabIndex = 7;
this.saveButton.Text = "Save";
this.saveButton.UseVisualStyleBackColor = true;
this.saveButton.Click += new System.EventHandler(this.saveButton_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.ForeColor = System.Drawing.Color.White;
this.label1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.label1.Location = new System.Drawing.Point(9, 35);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(79, 13);
this.label1.TabIndex = 10;
this.label1.Text = "Animation Time";
//
// label3
//
this.label3.AutoSize = true;
this.label3.ForeColor = System.Drawing.Color.White;
this.label3.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.label3.Location = new System.Drawing.Point(47, 13);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(174, 13);
this.label3.TabIndex = 12;
this.label3.Text = "Frame Time must be greater than 0.";
//
// cancelButton
//
this.cancelButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cancelButton.ForeColor = System.Drawing.Color.White;
this.cancelButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.cancelButton.Location = new System.Drawing.Point(135, 63);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(75, 23);
this.cancelButton.TabIndex = 13;
this.cancelButton.Text = "Cancel";
this.cancelButton.UseVisualStyleBackColor = true;
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
//
// TimeUpDown
//
this.TimeUpDown.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
this.TimeUpDown.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TimeUpDown.ForeColor = System.Drawing.SystemColors.Window;
this.TimeUpDown.Location = new System.Drawing.Point(94, 33);
this.TimeUpDown.Maximum = new decimal(new int[] {
this.saveButton = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.cancelButton = new System.Windows.Forms.Button();
this.TimeUpDown = new System.Windows.Forms.NumericUpDown();
((System.ComponentModel.ISupportInitialize)(this.TimeUpDown)).BeginInit();
this.SuspendLayout();
//
// saveButton
//
this.saveButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.saveButton.ForeColor = System.Drawing.Color.White;
this.saveButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.saveButton.Location = new System.Drawing.Point(55, 63);
this.saveButton.Name = "saveButton";
this.saveButton.Size = new System.Drawing.Size(75, 23);
this.saveButton.TabIndex = 7;
this.saveButton.Text = "Save";
this.saveButton.UseVisualStyleBackColor = true;
this.saveButton.Click += new System.EventHandler(this.saveButton_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.ForeColor = System.Drawing.Color.White;
this.label1.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.label1.Location = new System.Drawing.Point(9, 29);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(104, 13);
this.label1.TabIndex = 10;
this.label1.Text = "Ticks for each frame";
//
// cancelButton
//
this.cancelButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cancelButton.ForeColor = System.Drawing.Color.White;
this.cancelButton.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.cancelButton.Location = new System.Drawing.Point(135, 63);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(75, 23);
this.cancelButton.TabIndex = 13;
this.cancelButton.Text = "Cancel";
this.cancelButton.UseVisualStyleBackColor = true;
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
//
// TimeUpDown
//
this.TimeUpDown.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(17)))), ((int)(((byte)(17)))), ((int)(((byte)(17)))));
this.TimeUpDown.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.TimeUpDown.ForeColor = System.Drawing.SystemColors.Window;
this.TimeUpDown.Location = new System.Drawing.Point(119, 27);
this.TimeUpDown.Maximum = new decimal(new int[] {
10000,
0,
0,
0});
this.TimeUpDown.Name = "TimeUpDown";
this.TimeUpDown.Size = new System.Drawing.Size(162, 20);
this.TimeUpDown.TabIndex = 15;
this.TimeUpDown.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// SetBulkSpeed
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(264, 94);
this.ControlBox = false;
this.Controls.Add(this.cancelButton);
this.Controls.Add(this.label3);
this.Controls.Add(this.label1);
this.Controls.Add(this.saveButton);
this.Controls.Add(this.TimeUpDown);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(266, 96);
this.Name = "SetBulkSpeed";
this.Resizable = false;
this.Style = MetroFramework.MetroColorStyle.Silver;
this.Theme = MetroFramework.MetroThemeStyle.Dark;
((System.ComponentModel.ISupportInitialize)(this.TimeUpDown)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
this.TimeUpDown.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.TimeUpDown.Name = "TimeUpDown";
this.TimeUpDown.Size = new System.Drawing.Size(137, 20);
this.TimeUpDown.TabIndex = 15;
this.TimeUpDown.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.TimeUpDown.Value = new decimal(new int[] {
1,
0,
0,
0});
//
// SetBulkSpeed
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(264, 94);
this.ControlBox = false;
this.Controls.Add(this.cancelButton);
this.Controls.Add(this.label1);
this.Controls.Add(this.saveButton);
this.Controls.Add(this.TimeUpDown);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(266, 96);
this.Name = "SetBulkSpeed";
this.Resizable = false;
this.Style = MetroFramework.MetroColorStyle.Silver;
this.Theme = MetroFramework.MetroThemeStyle.Dark;
((System.ComponentModel.ISupportInitialize)(this.TimeUpDown)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button saveButton;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.NumericUpDown TimeUpDown;
}

View File

@@ -15,7 +15,6 @@ namespace PckStudio.Forms.Additional_Popups.Animation
private void saveButton_Click(object sender, EventArgs e)
{
if (Ticks < 0) return;
DialogResult = DialogResult.OK;
}