From 8bef79e44fdce28428a9757110f2307ec86431d9 Mon Sep 17 00:00:00 2001 From: NotImplementedLife Date: Tue, 18 Jul 2023 09:24:47 +0300 Subject: [PATCH] added option to choose delay before song --- MainForm.Designer.cs | 22 ++++++++++++++++--- MainForm.cs | 2 +- .../PublishProfiles/FolderProfile.pubxml.user | 2 +- 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/MainForm.Designer.cs b/MainForm.Designer.cs index e99ed9b..9e9fd51 100644 --- a/MainForm.Designer.cs +++ b/MainForm.Designer.cs @@ -83,6 +83,7 @@ this.TJASelector = new TaikoSoundEditor.PathSelector(); this.AudioFileSelector = new TaikoSoundEditor.PathSelector(); this.label10 = new System.Windows.Forms.Label(); + this.AddSilenceBox = new System.Windows.Forms.CheckBox(); this.TabControl.SuspendLayout(); this.tabPage1.SuspendLayout(); this.panel1.SuspendLayout(); @@ -626,6 +627,7 @@ // this.groupBox10.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.groupBox10.Controls.Add(this.AddSilenceBox); this.groupBox10.Controls.Add(this.FeedbackBox); this.groupBox10.Controls.Add(this.CreateBackButton); this.groupBox10.Controls.Add(this.CreateOkButton); @@ -646,7 +648,7 @@ // this.FeedbackBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.FeedbackBox.Location = new System.Drawing.Point(6, 134); + this.FeedbackBox.Location = new System.Drawing.Point(6, 154); this.FeedbackBox.Multiline = true; this.FeedbackBox.Name = "FeedbackBox"; this.FeedbackBox.Size = new System.Drawing.Size(356, 75); @@ -655,7 +657,7 @@ // CreateBackButton // this.CreateBackButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.CreateBackButton.Location = new System.Drawing.Point(205, 102); + this.CreateBackButton.Location = new System.Drawing.Point(205, 122); this.CreateBackButton.Name = "CreateBackButton"; this.CreateBackButton.Size = new System.Drawing.Size(75, 23); this.CreateBackButton.TabIndex = 17; @@ -666,7 +668,7 @@ // CreateOkButton // this.CreateOkButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.CreateOkButton.Location = new System.Drawing.Point(286, 102); + this.CreateOkButton.Location = new System.Drawing.Point(286, 122); this.CreateOkButton.Name = "CreateOkButton"; this.CreateOkButton.Size = new System.Drawing.Size(75, 23); this.CreateOkButton.TabIndex = 16; @@ -739,6 +741,19 @@ this.label10.TabIndex = 8; this.label10.Text = "Audio file"; // + // AddSilenceBox + // + this.AddSilenceBox.AutoSize = true; + this.AddSilenceBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.AddSilenceBox.Checked = true; + this.AddSilenceBox.CheckState = System.Windows.Forms.CheckState.Checked; + this.AddSilenceBox.Location = new System.Drawing.Point(6, 102); + this.AddSilenceBox.Name = "AddSilenceBox"; + this.AddSilenceBox.Size = new System.Drawing.Size(143, 19); + this.AddSilenceBox.TabIndex = 19; + this.AddSilenceBox.Text = "Delay before song (3s)"; + this.AddSilenceBox.UseVisualStyleBackColor = true; + // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); @@ -835,5 +850,6 @@ private Button ExportSoundFoldersButton; private Button ExportDatatableButton; private CheckBox ExportOpenOnFinished; + private CheckBox AddSilenceBox; } } \ No newline at end of file diff --git a/MainForm.cs b/MainForm.cs index 8d39b68..be3472f 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -221,7 +221,7 @@ namespace TaikoSoundEditor File.WriteAllText("tja.txt", tja.ToString()); - var seconds = (int)Math.Ceiling(tja.Headers.Offset + 3); + var seconds = AddSilenceBox.Checked ? (int)Math.Ceiling(tja.Headers.Offset + 3) : 0; if (seconds < 0) seconds = 0; diff --git a/Properties/PublishProfiles/FolderProfile.pubxml.user b/Properties/PublishProfiles/FolderProfile.pubxml.user index 9edfe89..d133892 100644 --- a/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. --> - True|2023-07-17T08:28:41.9554245Z;True|2023-07-17T11:15:26.2194507+03:00; + True|2023-07-17T14:57:08.1469738Z;True|2023-07-17T11:28:41.9554245+03:00;True|2023-07-17T11:15:26.2194507+03:00; \ No newline at end of file