From: Bellai Ádám Date: Tue, 24 Oct 2017 08:28:02 +0000 (+0000) Subject: git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube... X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=f574946497a12938730436ad1524f12a50422de3;p=mediacube.git git-tfs-id: [tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C30663 --- diff --git a/client/AudioRecorder/FileNameForm.Designer.cs b/client/AudioRecorder/FileNameForm.Designer.cs index 17894608..77d31916 100644 --- a/client/AudioRecorder/FileNameForm.Designer.cs +++ b/client/AudioRecorder/FileNameForm.Designer.cs @@ -26,6 +26,7 @@ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FileNameForm)); this.octopusIDSelector1 = new OctopusClient.OctopusIDSelector(); this.buttonCancel = new System.Windows.Forms.Button(); + this.buttonRendben = new System.Windows.Forms.Button(); this.SuspendLayout(); // // octopusIDSelector1 @@ -44,21 +45,34 @@ // this.buttonCancel.Anchor = System.Windows.Forms.AnchorStyles.Right; this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.buttonCancel.Location = new System.Drawing.Point(195, 355); + this.buttonCancel.Location = new System.Drawing.Point(118, 356); this.buttonCancel.Name = "buttonCancel"; this.buttonCancel.Size = new System.Drawing.Size(75, 23); this.buttonCancel.TabIndex = 6; this.buttonCancel.Text = "Mégse"; this.buttonCancel.UseVisualStyleBackColor = true; // + // buttonRendben + // + this.buttonRendben.Enabled = false; + this.buttonRendben.Location = new System.Drawing.Point(195, 356); + this.buttonRendben.Name = "buttonRendben"; + this.buttonRendben.Size = new System.Drawing.Size(75, 23); + this.buttonRendben.TabIndex = 7; + this.buttonRendben.Text = "Rendben"; + this.buttonRendben.UseVisualStyleBackColor = true; + this.buttonRendben.Click += new System.EventHandler(this.buttonRendben_Click); + // // FileNameForm // + this.AcceptButton = this.buttonRendben; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.White; this.CancelButton = this.buttonCancel; this.ClientSize = new System.Drawing.Size(276, 383); this.ControlBox = false; + this.Controls.Add(this.buttonRendben); this.Controls.Add(this.buttonCancel); this.Controls.Add(this.octopusIDSelector1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; @@ -76,5 +90,6 @@ #endregion private OctopusClient.OctopusIDSelector octopusIDSelector1; private System.Windows.Forms.Button buttonCancel; + private System.Windows.Forms.Button buttonRendben; } } \ No newline at end of file diff --git a/client/AudioRecorder/FileNameForm.cs b/client/AudioRecorder/FileNameForm.cs index 155b1392..377da3bb 100644 --- a/client/AudioRecorder/FileNameForm.cs +++ b/client/AudioRecorder/FileNameForm.cs @@ -8,6 +8,8 @@ namespace AudioRecorder { private String result; private IMainForm mainForm; private ISettings settings; + private String id; + public FileNameForm(IMainForm mainForm, ISettings settings) { InitializeComponent(); this.settings = settings; @@ -17,11 +19,8 @@ namespace AudioRecorder { } private void IdChangedEvent(String id) { - result = String.Format("{0}.wav", id); - if (!result.EndsWith(".wav")) - result = String.Format("{0}{1}", result, StringResources.DOT_WAV); - mainForm.recordFireEvent(result, id); - Dispose(); + this.id = id; + buttonRendben.Enabled = !String.IsNullOrEmpty(id); } private void FileNameForm_Load(object sender, EventArgs e) @@ -33,5 +32,13 @@ namespace AudioRecorder { { Dispose(); } + + private void buttonRendben_Click(object sender, EventArgs e) { + result = String.Format("{0}.wav", id); + if (!result.EndsWith(".wav")) + result = String.Format("{0}{1}", result, StringResources.DOT_WAV); + mainForm.recordFireEvent(result, id); + Dispose(); + } } }