From 9bf4b77ee06fc5089fd906f5ed55824b850a9734 Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Sun, 2 Apr 2023 11:25:59 +0200 Subject: [PATCH] Update 'SetBulkSpeed' member variable name --- .../Animation/SetBulkSpeed.Designer.cs | 184 +++++++++--------- .../Animation/SetBulkSpeed.cs | 11 +- PCK-Studio/Forms/Editor/AnimationEditor.cs | 4 +- 3 files changed, 100 insertions(+), 99 deletions(-) diff --git a/PCK-Studio/Forms/Additional-Popups/Animation/SetBulkSpeed.Designer.cs b/PCK-Studio/Forms/Additional-Popups/Animation/SetBulkSpeed.Designer.cs index f38ca1c0..e7a23f35 100644 --- a/PCK-Studio/Forms/Additional-Popups/Animation/SetBulkSpeed.Designer.cs +++ b/PCK-Studio/Forms/Additional-Popups/Animation/SetBulkSpeed.Designer.cs @@ -29,108 +29,108 @@ namespace PckStudio.Forms.Additional_Popups.Animation /// private void InitializeComponent() { - this.button1 = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.button2 = new System.Windows.Forms.Button(); - this.TimeUpDown = new System.Windows.Forms.NumericUpDown(); - ((System.ComponentModel.ISupportInitialize)(this.TimeUpDown)).BeginInit(); - this.SuspendLayout(); - // - // button1 - // - this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button1.ForeColor = System.Drawing.Color.White; - this.button1.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.button1.Location = new System.Drawing.Point(55, 63); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(75, 23); - this.button1.TabIndex = 7; - this.button1.Text = "Save"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_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."; - // - // button2 - // - this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button2.ForeColor = System.Drawing.Color.White; - this.button2.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.button2.Location = new System.Drawing.Point(135, 63); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(75, 23); - this.button2.TabIndex = 13; - this.button2.Text = "Cancel"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_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.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[] { 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.button2); - this.Controls.Add(this.label3); - this.Controls.Add(this.label1); - this.Controls.Add(this.button1); - 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.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(); } #endregion - private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button saveButton; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label3; - private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button cancelButton; private System.Windows.Forms.NumericUpDown TimeUpDown; } } \ No newline at end of file diff --git a/PCK-Studio/Forms/Additional-Popups/Animation/SetBulkSpeed.cs b/PCK-Studio/Forms/Additional-Popups/Animation/SetBulkSpeed.cs index 3d0590fd..af34f4b6 100644 --- a/PCK-Studio/Forms/Additional-Popups/Animation/SetBulkSpeed.cs +++ b/PCK-Studio/Forms/Additional-Popups/Animation/SetBulkSpeed.cs @@ -6,19 +6,20 @@ namespace PckStudio.Forms.Additional_Popups.Animation { public partial class SetBulkSpeed : MetroForm { - public int time => (int)TimeUpDown.Value; - public SetBulkSpeed(TreeView treeView) + public int Ticks => (int)TimeUpDown.Value; + + public SetBulkSpeed() { InitializeComponent(); } - private void button1_Click(object sender, EventArgs e) + private void saveButton_Click(object sender, EventArgs e) { - if (time < 0) return; + if (Ticks < 0) return; DialogResult = DialogResult.OK; } - private void button2_Click(object sender, EventArgs e) + private void cancelButton_Click(object sender, EventArgs e) { DialogResult = DialogResult.Cancel; } diff --git a/PCK-Studio/Forms/Editor/AnimationEditor.cs b/PCK-Studio/Forms/Editor/AnimationEditor.cs index c8f3c303..b678c7d2 100644 --- a/PCK-Studio/Forms/Editor/AnimationEditor.cs +++ b/PCK-Studio/Forms/Editor/AnimationEditor.cs @@ -264,10 +264,10 @@ namespace PckStudio.Forms.Editor private void bulkAnimationSpeedToolStripMenuItem_Click(object sender, EventArgs e) { - SetBulkSpeed diag = new SetBulkSpeed(frameTreeView); + SetBulkSpeed diag = new SetBulkSpeed(); if (diag.ShowDialog(this) == DialogResult.OK) { - currentAnimation.GetFrames().ForEach(frame => frame.Ticks = diag.time); + currentAnimation.GetFrames().ForEach(frame => frame.Ticks = diag.Ticks); LoadAnimationTreeView(); } diag.Dispose();