From b8bdfa30c606301ec92d9b1fefd9c5e5bf420330 Mon Sep 17 00:00:00 2001 From: niksedk Date: Sun, 9 Jan 2011 10:42:38 +0000 Subject: [PATCH] Minor cleanup git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@234 99eadd0c-20b8-1223-b5c4-2a2b2df33de2 --- src/Forms/Main.Designer.cs | 16 +++++----- src/Forms/Main.cs | 36 ++++------------------- src/Forms/VideoPlayerUnDocked.Designer.cs | 2 +- src/Forms/VideoPlayerUnDocked.cs | 18 +++--------- 4 files changed, 18 insertions(+), 54 deletions(-) diff --git a/src/Forms/Main.Designer.cs b/src/Forms/Main.Designer.cs index 8623d1ea4..7a523e84a 100644 --- a/src/Forms/Main.Designer.cs +++ b/src/Forms/Main.Designer.cs @@ -1898,7 +1898,7 @@ this.toolStripButtonWaveFormPlay.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonWaveFormPlay.Image"))); this.toolStripButtonWaveFormPlay.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripButtonWaveFormPlay.Name = "toolStripButtonWaveFormPlay"; - this.toolStripButtonWaveFormPlay.Size = new System.Drawing.Size(23, 30); + this.toolStripButtonWaveFormPlay.Size = new System.Drawing.Size(23, 22); this.toolStripButtonWaveFormPlay.Text = "toolStripButton1"; this.toolStripButtonWaveFormPlay.Visible = false; this.toolStripButtonWaveFormPlay.Click += new System.EventHandler(this.toolStripButtonWaveFormPlay_Click); @@ -1911,7 +1911,7 @@ this.toolStripButtonLockCenter.Name = "toolStripButtonLockCenter"; this.toolStripButtonLockCenter.Size = new System.Drawing.Size(23, 22); this.toolStripButtonLockCenter.Text = "Center"; - this.toolStripButtonLockCenter.Click += new System.EventHandler(this.toolStripButtonLockCenter_Click_1); + this.toolStripButtonLockCenter.Click += new System.EventHandler(this.toolStripButtonLockCenter_Click); // // AudioWaveForm // @@ -2101,7 +2101,7 @@ this.buttonStop.TabIndex = 5; this.buttonStop.Text = "Pa&use"; this.buttonStop.UseVisualStyleBackColor = true; - this.buttonStop.Click += new System.EventHandler(this.buttonStop_Click_1); + this.buttonStop.Click += new System.EventHandler(this.buttonStop_Click); // // groupBoxAutoRepeat // @@ -2164,7 +2164,7 @@ this.buttonPlayPrevious.TabIndex = 2; this.buttonPlayPrevious.Text = "<< Prevoius"; this.buttonPlayPrevious.UseVisualStyleBackColor = true; - this.buttonPlayPrevious.Click += new System.EventHandler(this.buttonPlayPrevious_Click_1); + this.buttonPlayPrevious.Click += new System.EventHandler(this.buttonPlayPrevious_Click); // // buttonPlayCurrent // @@ -2186,7 +2186,7 @@ this.buttonPlayNext.TabIndex = 4; this.buttonPlayNext.Text = "Next >>"; this.buttonPlayNext.UseVisualStyleBackColor = true; - this.buttonPlayNext.Click += new System.EventHandler(this.buttonPlayNext_Click_1); + this.buttonPlayNext.Click += new System.EventHandler(this.buttonPlayNext_Click); // // tabPageCreate // @@ -2861,7 +2861,7 @@ // labelTextLineTotal // this.labelTextLineTotal.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.labelTextLineTotal.Location = new System.Drawing.Point(625, 86); + this.labelTextLineTotal.Location = new System.Drawing.Point(625, 84); this.labelTextLineTotal.Name = "labelTextLineTotal"; this.labelTextLineTotal.Size = new System.Drawing.Size(177, 18); this.labelTextLineTotal.TabIndex = 21; @@ -3068,7 +3068,7 @@ this.tabPage2.Location = new System.Drawing.Point(4, 22); this.tabPage2.Name = "tabPage2"; this.tabPage2.Padding = new System.Windows.Forms.Padding(3); - this.tabPage2.Size = new System.Drawing.Size(937, 248); + this.tabPage2.Size = new System.Drawing.Size(937, 254); this.tabPage2.TabIndex = 1; this.tabPage2.Text = "Source view"; this.tabPage2.UseVisualStyleBackColor = true; @@ -3085,7 +3085,7 @@ this.textBoxSource.Multiline = true; this.textBoxSource.Name = "textBoxSource"; this.textBoxSource.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.textBoxSource.Size = new System.Drawing.Size(932, 251); + this.textBoxSource.Size = new System.Drawing.Size(932, 257); this.textBoxSource.TabIndex = 12; this.textBoxSource.WordWrap = false; this.textBoxSource.Click += new System.EventHandler(this.TextBoxSourceClick); diff --git a/src/Forms/Main.cs b/src/Forms/Main.cs index e57e35ecc..2aa234cd1 100644 --- a/src/Forms/Main.cs +++ b/src/Forms/Main.cs @@ -6189,16 +6189,6 @@ namespace Nikse.SubtitleEdit.Forms } } - private void buttonPlayCurrent_Click(object sender, EventArgs e) - { - PlayCurrent(); - } - - private void buttonPlayPrevious_Click(object sender, EventArgs e) - { - PlayPrevious(); - } - private void PlayPart(Paragraph paragraph) { if (mediaPlayer != null && mediaPlayer.VideoPlayer != null) @@ -6394,21 +6384,6 @@ namespace Nikse.SubtitleEdit.Forms GotoSubPositionAndPause(); } - private void buttonStop_Click(object sender, EventArgs e) - { - timerAutoContinue.Stop(); - - if (mediaPlayer != null) - mediaPlayer.Pause(); - - labelStatus.Text = string.Empty; - } - - private void buttonPlayNext_Click(object sender, EventArgs e) - { - Next(); - } - private void buttonOpenVideo_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(openFileDialog1.InitialDirectory) && !string.IsNullOrEmpty(_fileName)) @@ -6675,7 +6650,7 @@ namespace Nikse.SubtitleEdit.Forms private void buttonGoogleIt_Click(object sender, EventArgs e) { - System.Diagnostics.Process.Start("http://www.google.dk/#q=" + HttpUtility.UrlEncode(textBoxSearchWord.Text)); + System.Diagnostics.Process.Start("http://www.google.com/#q=" + HttpUtility.UrlEncode(textBoxSearchWord.Text)); } private void buttonGoogleTranslateIt_Click(object sender, EventArgs e) @@ -6689,17 +6664,17 @@ namespace Nikse.SubtitleEdit.Forms PlayCurrent(); } - private void buttonPlayNext_Click_1(object sender, EventArgs e) + private void buttonPlayNext_Click(object sender, EventArgs e) { Next(); } - private void buttonPlayPrevious_Click_1(object sender, EventArgs e) + private void buttonPlayPrevious_Click(object sender, EventArgs e) { PlayPrevious(); } - private void buttonStop_Click_1(object sender, EventArgs e) + private void buttonStop_Click(object sender, EventArgs e) { _endSeconds = -1; timerAutoContinue.Stop(); @@ -7190,7 +7165,7 @@ namespace Nikse.SubtitleEdit.Forms mediaPlayer.Play(); } - private void toolStripButtonLockCenter_Click_1(object sender, EventArgs e) + private void toolStripButtonLockCenter_Click(object sender, EventArgs e) { toolStripButtonLockCenter.Checked = !toolStripButtonLockCenter.Checked; AudioWaveForm.Locked = toolStripButtonLockCenter.Checked; @@ -8121,7 +8096,6 @@ namespace Nikse.SubtitleEdit.Forms Subtitle subtitle = new Subtitle(); SubtitleFormat format = subtitle.LoadSubtitle(openFileDialog1.FileName, out encoding, encoding); - if (format != null) { SaveSubtitleListviewIndexes(); diff --git a/src/Forms/VideoPlayerUnDocked.Designer.cs b/src/Forms/VideoPlayerUnDocked.Designer.cs index a69324d6e..1b032e86c 100644 --- a/src/Forms/VideoPlayerUnDocked.Designer.cs +++ b/src/Forms/VideoPlayerUnDocked.Designer.cs @@ -51,7 +51,7 @@ this.Name = "VideoPlayerUnDocked"; this.Text = "VideoPlayerUnDocked"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.VideoPlayerUnDocked_FormClosing); - this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.VideoPlayerUnDocked_KeyDown_1); + this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.VideoPlayerUnDocked_KeyDown); this.ResumeLayout(false); } diff --git a/src/Forms/VideoPlayerUnDocked.cs b/src/Forms/VideoPlayerUnDocked.cs index 2bcc3001e..f67731ee9 100644 --- a/src/Forms/VideoPlayerUnDocked.cs +++ b/src/Forms/VideoPlayerUnDocked.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; -using System.Windows.Forms; +using System.Windows.Forms; using Nikse.SubtitleEdit.Logic; namespace Nikse.SubtitleEdit.Forms @@ -32,11 +26,6 @@ namespace Nikse.SubtitleEdit.Forms Text = title; } - void VideoPlayerContainer_MouseWheel(object sender, MouseEventArgs e) - { - MessageBox.Show("Test"); - } - private void VideoPlayerUnDocked_FormClosing(object sender, FormClosingEventArgs e) { if (e.CloseReason == CloseReason.UserClosing && panelContainer.Controls.Count > 0) @@ -49,7 +38,7 @@ namespace Nikse.SubtitleEdit.Forms _positionsAndSizes.SavePositionAndSize(this); } - private void VideoPlayerUnDocked_KeyDown_1(object sender, KeyEventArgs e) + private void VideoPlayerUnDocked_KeyDown(object sender, KeyEventArgs e) { if (e.Modifiers == Keys.Alt && e.KeyCode == Keys.Enter) { @@ -61,8 +50,9 @@ namespace Nikse.SubtitleEdit.Forms } else { - _mainForm.Main_KeyDown(sender, e); + _mainForm.Main_KeyDown(sender, e); } } + } }