diff options
author | sr55 <[email protected]> | 2010-05-18 15:19:42 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2010-05-18 15:19:42 +0000 |
commit | 89d4a3ba2ecf35c4bde144ec6f35b348fca77fd0 (patch) | |
tree | 758b43966887760fde1bc93ad5bcdc25fabf0ea7 /win/C# | |
parent | 4d4e532ec7c7add12aa7aef01474d017675ddd17 (diff) |
WinGui:
- Switch the Audio Panel over to a DataGridView for more flexibility in possible upcoming changes.
- Few UI tweaks to other panels to make look / behave similarly.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3299 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#')
-rw-r--r-- | win/C#/Controls/AudioPanel.Designer.cs | 187 | ||||
-rw-r--r-- | win/C#/Controls/AudioPanel.cs | 186 | ||||
-rw-r--r-- | win/C#/Controls/AudioPanel.resx | 21 | ||||
-rw-r--r-- | win/C#/Functions/QueryGenerator.cs | 32 | ||||
-rw-r--r-- | win/C#/frmMain.Designer.cs | 356 | ||||
-rw-r--r-- | win/C#/frmMain.resx | 6 |
6 files changed, 431 insertions, 357 deletions
diff --git a/win/C#/Controls/AudioPanel.Designer.cs b/win/C#/Controls/AudioPanel.Designer.cs index 42d3858a9..5c6462883 100644 --- a/win/C#/Controls/AudioPanel.Designer.cs +++ b/win/C#/Controls/AudioPanel.Designer.cs @@ -35,14 +35,6 @@ namespace Handbrake.Controls private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
- this.lv_audioList = new System.Windows.Forms.ListView();
- this.col_id = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.col_Source = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.col_codec = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.col_mixdown = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.col_samplerate = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.col_bitrate = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.col_drc = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.audioMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.audioList_moveup = new System.Windows.Forms.ToolStripMenuItem();
this.audioList_movedown = new System.Windows.Forms.ToolStripMenuItem();
@@ -66,69 +58,20 @@ namespace Handbrake.Controls this.drp_audioSample = new System.Windows.Forms.ComboBox();
this.AudioTrackGroup = new System.Windows.Forms.GroupBox();
this.AudioMenuRowHeightHack = new System.Windows.Forms.ImageList(this.components);
+ this.audioList = new System.Windows.Forms.DataGridView();
+ this.Track = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Source = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.AudioCodec = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Mixdown = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Samplerate = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.Bitrate = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.DRC = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.audioMenu.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tb_drc)).BeginInit();
this.AudioTrackGroup.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.audioList)).BeginInit();
this.SuspendLayout();
//
- // lv_audioList
- //
- this.lv_audioList.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
- this.col_id,
- this.col_Source,
- this.col_codec,
- this.col_mixdown,
- this.col_samplerate,
- this.col_bitrate,
- this.col_drc});
- this.lv_audioList.ContextMenuStrip = this.audioMenu;
- this.lv_audioList.FullRowSelect = true;
- this.lv_audioList.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
- this.lv_audioList.HideSelection = false;
- this.lv_audioList.Location = new System.Drawing.Point(16, 150);
- this.lv_audioList.MultiSelect = false;
- this.lv_audioList.Name = "lv_audioList";
- this.lv_audioList.Size = new System.Drawing.Size(689, 140);
- this.lv_audioList.TabIndex = 65;
- this.lv_audioList.UseCompatibleStateImageBehavior = false;
- this.lv_audioList.View = System.Windows.Forms.View.Details;
- this.lv_audioList.SelectedIndexChanged += new System.EventHandler(this.lv_audioList_SelectedIndexChanged);
- //
- // col_id
- //
- this.col_id.Text = "Track";
- this.col_id.Width = 47;
- //
- // col_Source
- //
- this.col_Source.Text = "Source";
- this.col_Source.Width = 170;
- //
- // col_codec
- //
- this.col_codec.Text = "Audio Codec";
- this.col_codec.Width = 88;
- //
- // col_mixdown
- //
- this.col_mixdown.Text = "Mixdown";
- this.col_mixdown.Width = 127;
- //
- // col_samplerate
- //
- this.col_samplerate.Text = "Samplerate (kHz)";
- this.col_samplerate.Width = 101;
- //
- // col_bitrate
- //
- this.col_bitrate.Text = "Bitrate (Kbps)";
- this.col_bitrate.Width = 95;
- //
- // col_drc
- //
- this.col_drc.Text = "DRC";
- this.col_drc.Width = 57;
- //
// audioMenu
//
this.audioMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -386,7 +329,7 @@ namespace Handbrake.Controls this.AudioTrackGroup.Controls.Add(this.lbl_bitrate);
this.AudioTrackGroup.Location = new System.Drawing.Point(16, 67);
this.AudioTrackGroup.Name = "AudioTrackGroup";
- this.AudioTrackGroup.Size = new System.Drawing.Size(689, 77);
+ this.AudioTrackGroup.Size = new System.Drawing.Size(685, 77);
this.AudioTrackGroup.TabIndex = 66;
this.AudioTrackGroup.TabStop = false;
this.AudioTrackGroup.Text = "Selected Track: New Track";
@@ -397,13 +340,104 @@ namespace Handbrake.Controls this.AudioMenuRowHeightHack.ImageSize = new System.Drawing.Size(1, 18);
this.AudioMenuRowHeightHack.TransparentColor = System.Drawing.Color.Transparent;
//
+ // audioList
+ //
+ this.audioList.AllowUserToAddRows = false;
+ this.audioList.AllowUserToResizeColumns = false;
+ this.audioList.BackgroundColor = System.Drawing.Color.White;
+ this.audioList.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
+ this.audioList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
+ this.audioList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
+ this.Track,
+ this.Source,
+ this.AudioCodec,
+ this.Mixdown,
+ this.Samplerate,
+ this.Bitrate,
+ this.DRC});
+ this.audioList.ContextMenuStrip = this.audioMenu;
+ this.audioList.GridColor = System.Drawing.Color.White;
+ this.audioList.Location = new System.Drawing.Point(16, 150);
+ this.audioList.Name = "audioList";
+ this.audioList.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
+ this.audioList.RowHeadersVisible = false;
+ this.audioList.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders;
+ this.audioList.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
+ this.audioList.ShowCellErrors = false;
+ this.audioList.ShowCellToolTips = false;
+ this.audioList.ShowEditingIcon = false;
+ this.audioList.ShowRowErrors = false;
+ this.audioList.Size = new System.Drawing.Size(685, 140);
+ this.audioList.TabIndex = 67;
+ this.audioList.SelectionChanged += new System.EventHandler(this.audioList_SelectionChanged);
+ //
+ // Track
+ //
+ this.Track.FillWeight = 304.2808F;
+ this.Track.HeaderText = "Track";
+ this.Track.Name = "Track";
+ this.Track.ReadOnly = true;
+ this.Track.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+ this.Track.Width = 50;
+ //
+ // Source
+ //
+ this.Source.FillWeight = 49.69727F;
+ this.Source.HeaderText = "Source";
+ this.Source.Name = "Source";
+ this.Source.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+ this.Source.Width = 150;
+ //
+ // AudioCodec
+ //
+ this.AudioCodec.HeaderText = "Audio Codec";
+ this.AudioCodec.Name = "AudioCodec";
+ this.AudioCodec.ReadOnly = true;
+ this.AudioCodec.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+ //
+ // Mixdown
+ //
+ this.Mixdown.FillWeight = 49.69727F;
+ this.Mixdown.HeaderText = "Mixdown";
+ this.Mixdown.Name = "Mixdown";
+ this.Mixdown.ReadOnly = true;
+ this.Mixdown.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+ this.Mixdown.Width = 150;
+ //
+ // Samplerate
+ //
+ this.Samplerate.FillWeight = 49.69727F;
+ this.Samplerate.HeaderText = "Samplerate";
+ this.Samplerate.Name = "Samplerate";
+ this.Samplerate.ReadOnly = true;
+ this.Samplerate.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+ this.Samplerate.Width = 75;
+ //
+ // Bitrate
+ //
+ this.Bitrate.FillWeight = 49.69727F;
+ this.Bitrate.HeaderText = "Bitrate";
+ this.Bitrate.Name = "Bitrate";
+ this.Bitrate.ReadOnly = true;
+ this.Bitrate.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+ this.Bitrate.Width = 75;
+ //
+ // DRC
+ //
+ this.DRC.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+ this.DRC.FillWeight = 96.36334F;
+ this.DRC.HeaderText = "DRC";
+ this.DRC.Name = "DRC";
+ this.DRC.ReadOnly = true;
+ this.DRC.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+ //
// AudioPanel
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.BackColor = System.Drawing.Color.Transparent;
+ this.Controls.Add(this.audioList);
this.Controls.Add(this.label68);
this.Controls.Add(this.btn_addAudioTrack);
- this.Controls.Add(this.lv_audioList);
this.Controls.Add(this.AudioTrackGroup);
this.Controls.Add(this.btn_RemoveAudioTrack);
this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@@ -413,6 +447,7 @@ namespace Handbrake.Controls ((System.ComponentModel.ISupportInitialize)(this.tb_drc)).EndInit();
this.AudioTrackGroup.ResumeLayout(false);
this.AudioTrackGroup.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.audioList)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -420,13 +455,6 @@ namespace Handbrake.Controls #endregion
- internal System.Windows.Forms.ListView lv_audioList;
- private System.Windows.Forms.ColumnHeader col_Source;
- private System.Windows.Forms.ColumnHeader col_codec;
- private System.Windows.Forms.ColumnHeader col_mixdown;
- private System.Windows.Forms.ColumnHeader col_samplerate;
- private System.Windows.Forms.ColumnHeader col_bitrate;
- private System.Windows.Forms.ColumnHeader col_drc;
private System.Windows.Forms.Button btn_RemoveAudioTrack;
private System.Windows.Forms.Button btn_addAudioTrack;
internal System.Windows.Forms.Label lbl_drc;
@@ -442,7 +470,6 @@ namespace Handbrake.Controls internal System.Windows.Forms.ComboBox drp_audioMix;
internal System.Windows.Forms.ComboBox drp_audioTrack;
internal System.Windows.Forms.ComboBox drp_audioSample;
- private System.Windows.Forms.ColumnHeader col_id;
private System.Windows.Forms.GroupBox AudioTrackGroup;
private System.Windows.Forms.ImageList AudioMenuRowHeightHack;
private System.Windows.Forms.ContextMenuStrip audioMenu;
@@ -451,5 +478,13 @@ namespace Handbrake.Controls private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripMenuItem audioList_remove;
internal System.Windows.Forms.ComboBox drp_audioBitrate;
+ private System.Windows.Forms.DataGridView audioList;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Track;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Source;
+ private System.Windows.Forms.DataGridViewTextBoxColumn AudioCodec;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Mixdown;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Samplerate;
+ private System.Windows.Forms.DataGridViewTextBoxColumn Bitrate;
+ private System.Windows.Forms.DataGridViewTextBoxColumn DRC;
}
}
diff --git a/win/C#/Controls/AudioPanel.cs b/win/C#/Controls/AudioPanel.cs index 9a4938bb1..915910573 100644 --- a/win/C#/Controls/AudioPanel.cs +++ b/win/C#/Controls/AudioPanel.cs @@ -39,9 +39,9 @@ namespace Handbrake.Controls /// Get the audio panel
/// </summary>
/// <returns>A listview containing the audio tracks</returns>
- public ListView GetAudioPanel()
+ public DataGridView GetAudioPanel()
{
- return lv_audioList;
+ return audioList;
}
/// <summary>
@@ -79,10 +79,10 @@ namespace Handbrake.Controls }
// Make sure the table is updated with new audio codecs
- foreach (ListViewItem row in lv_audioList.Items)
+ foreach (DataGridViewRow row in audioList.Rows)
{
- if (!drp_audioEncoder.Items.Contains(row.SubItems[2].Text))
- row.SubItems[2].Text = drp_audioEncoder.Items[0].ToString();
+ if (!drp_audioEncoder.Items.Contains(row.Cells[2].Value))
+ row.Cells[2].Value = drp_audioEncoder.Items[0].ToString();
}
}
@@ -92,7 +92,7 @@ namespace Handbrake.Controls /// <returns>True if m4v is required</returns>
public bool RequiresM4V()
{
- return lv_audioList.Items.Cast<ListViewItem>().Any(item => item.SubItems[2].Text.Contains("AC3"));
+ return this.audioList.Rows.Cast<DataGridViewRow>().Any(row => row.Cells[2].Value.ToString().Contains("AC3"));
}
/// <summary>
@@ -108,14 +108,15 @@ namespace Handbrake.Controls foreach (AudioTrack track in audioTracks)
{
- ListViewItem newTrack = new ListViewItem(GetNewID().ToString());
-
- newTrack.SubItems.Add("Automatic");
- newTrack.SubItems.Add(track.Encoder);
- newTrack.SubItems.Add(track.MixDown);
- newTrack.SubItems.Add(track.SampleRate);
- newTrack.SubItems.Add(track.Encoder.Contains("AC3") ? "Auto" : track.Bitrate);
- newTrack.SubItems.Add(track.DRC);
+ DataGridViewRow newTrack = new DataGridViewRow();
+ newTrack.CreateCells(audioList);
+ newTrack.Cells[0].Value = GetNewID().ToString();
+ newTrack.Cells[1].Value = "Automatic";
+ newTrack.Cells[2].Value = track.Encoder;
+ newTrack.Cells[3].Value = track.MixDown;
+ newTrack.Cells[4].Value = track.SampleRate;
+ newTrack.Cells[5].Value = track.Encoder.Contains("AC3") ? "Auto" : track.Bitrate;
+ newTrack.Cells[6].Value = track.DRC;
AddTrackForPreset(newTrack);
}
}
@@ -129,30 +130,40 @@ namespace Handbrake.Controls {
if (selectedTitle.AudioTracks.Count == 0)
{
- lv_audioList.Items.Clear();
+ audioList.Rows.Clear();
drp_audioTrack.Items.Clear();
drp_audioTrack.Items.Add("None Found");
drp_audioTrack.SelectedIndex = 0;
return;
}
+ // The Source Information for the title will have changed, so set all the tracks to Automatic.
+ foreach (DataGridViewRow row in this.audioList.Rows)
+ {
+ row.Cells[1].Value = "Automatic";
+ }
+
+ // Setup the Audio track source dropdown with the new audio tracks.
drp_audioTrack.Items.Clear();
drp_audioTrack.Items.Add("Automatic");
drp_audioTrack.Items.AddRange(selectedTitle.AudioTracks.ToArray());
- if (lv_audioList.Items.Count == 0 && preset != null)
+ // Re-add any audio tracks that the preset has.
+ if (audioList.Rows.Count == 0 && preset != null)
{
QueryParser parsed = QueryParser.Parse(preset.Query);
foreach (AudioTrack audioTrack in parsed.AudioInformation)
{
- ListViewItem newTrack = new ListViewItem(GetNewID().ToString());
- newTrack.SubItems.Add(audioTrack.Track);
- newTrack.SubItems.Add(audioTrack.Encoder);
- newTrack.SubItems.Add(audioTrack.MixDown);
- newTrack.SubItems.Add(audioTrack.SampleRate);
- newTrack.SubItems.Add(audioTrack.Bitrate);
- newTrack.SubItems.Add(audioTrack.DRC);
- lv_audioList.Items.Add(newTrack);
+ DataGridViewRow newTrack = new DataGridViewRow();
+ newTrack.CreateCells(audioList);
+ newTrack.Cells[0].Value = GetNewID().ToString();
+ newTrack.Cells[1].Value = (audioTrack.Track);
+ newTrack.Cells[2].Value = (audioTrack.Encoder);
+ newTrack.Cells[3].Value = (audioTrack.MixDown);
+ newTrack.Cells[4].Value = (audioTrack.SampleRate);
+ newTrack.Cells[5].Value = (audioTrack.Bitrate);
+ newTrack.Cells[6].Value = (audioTrack.DRC);
+ audioList.Rows.Add(newTrack);
}
}
@@ -176,14 +187,14 @@ namespace Handbrake.Controls }
if (drp_audioTrack.SelectedItem != null)
- foreach (ListViewItem item in lv_audioList.Items)
- item.SubItems[1].Text = drp_audioTrack.SelectedItem.ToString();
+ foreach (DataGridViewRow item in audioList.Rows)
+ item.Cells[1].Value = drp_audioTrack.SelectedItem.ToString();
else
{
drp_audioTrack.SelectedIndex = 0;
if (drp_audioTrack.SelectedItem != null)
- foreach (ListViewItem item in lv_audioList.Items)
- item.SubItems[1].Text = drp_audioTrack.SelectedItem.ToString();
+ foreach (DataGridViewRow item in audioList.Rows)
+ item.Cells[1].Value = drp_audioTrack.SelectedItem.ToString();
}
}
else
@@ -210,8 +221,8 @@ namespace Handbrake.Controls switch (ctl.Name)
{
case "drp_audioTrack":
- if (lv_audioList.Items.Count != 0 && lv_audioList.SelectedIndices.Count != 0)
- lv_audioList.Items[lv_audioList.SelectedIndices[0]].SubItems[1].Text = drp_audioTrack.Text;
+ if (audioList.Rows.Count != 0 && audioList.SelectedRows.Count != 0)
+ audioList.SelectedRows[0].Cells[1].Value = drp_audioTrack.Text;
break;
case "drp_audioEncoder":
SetMixDown();
@@ -236,23 +247,23 @@ namespace Handbrake.Controls }
// Update an item in the Audio list if required.
- if (lv_audioList.Items.Count != 0 && lv_audioList.SelectedIndices.Count != 0)
- lv_audioList.Items[lv_audioList.SelectedIndices[0]].SubItems[2].Text = drp_audioEncoder.Text;
+ if (audioList.Rows.Count != 0 && audioList.SelectedRows.Count != 0)
+ audioList.SelectedRows[0].Cells[2].Value = drp_audioEncoder.Text;
break;
case "drp_audioMix":
SetBitrate();
- if (lv_audioList.Items.Count != 0 && lv_audioList.SelectedIndices.Count != 0)
- lv_audioList.Items[lv_audioList.SelectedIndices[0]].SubItems[3].Text = drp_audioMix.Text;
+ if (audioList.Rows.Count != 0 && audioList.SelectedRows.Count != 0)
+ audioList.SelectedRows[0].Cells[3].Value = drp_audioMix.Text;
break;
case "drp_audioSample":
- if (lv_audioList.Items.Count != 0 && lv_audioList.SelectedIndices.Count != 0)
- lv_audioList.Items[lv_audioList.SelectedIndices[0]].SubItems[4].Text = drp_audioSample.Text;
+ if (audioList.Rows.Count != 0 && audioList.SelectedRows.Count != 0)
+ audioList.SelectedRows[0].Cells[4].Value = drp_audioSample.Text;
break;
case "drp_audioBitrate":
// Update an item in the Audio list if required.
- if (lv_audioList.Items.Count != 0 && lv_audioList.SelectedIndices.Count != 0)
- lv_audioList.Items[lv_audioList.SelectedIndices[0]].SubItems[5].Text = drp_audioBitrate.Text;
+ if (audioList.Rows.Count != 0 && audioList.SelectedRows.Count != 0)
+ audioList.SelectedRows[0].Cells[5].Value = drp_audioBitrate.Text;
break;
case "tb_drc":
double value;
@@ -263,15 +274,15 @@ namespace Handbrake.Controls lbl_drc.Text = value.ToString();
// Update an item in the Audio list if required.
- if (lv_audioList.Items.Count != 0 && lv_audioList.SelectedIndices.Count != 0)
+ if (audioList.Rows.Count != 0 && audioList.SelectedRows.Count != 0)
{
- lv_audioList.Items[lv_audioList.SelectedIndices[0]].SubItems[6].Text = value.ToString();
- lv_audioList.Select();
+ audioList.SelectedRows[0].Cells[6].Value = value.ToString();
+ audioList.Select();
}
break;
}
- lv_audioList.Select();
+ audioList.Select();
}
/// <summary>
@@ -283,27 +294,26 @@ namespace Handbrake.Controls /// <param name="e">
/// The e.
/// </param>
- private void lv_audioList_SelectedIndexChanged(object sender, EventArgs e)
+ private void audioList_SelectionChanged(object sender, EventArgs e)
{
// Set the dropdown controls based on the selected item in the Audio List.
- if (lv_audioList.Items.Count != 0 && lv_audioList.SelectedIndices.Count != 0)
+ if (audioList.Rows.Count != 0 && audioList.SelectedRows.Count != 0)
{
- drp_audioTrack.SelectedItem = lv_audioList.Items[lv_audioList.SelectedIndices[0]].SubItems[1].Text;
- drp_audioEncoder.SelectedItem = lv_audioList.Items[lv_audioList.SelectedIndices[0]].SubItems[2].Text;
- drp_audioMix.SelectedItem = lv_audioList.Items[lv_audioList.SelectedIndices[0]].SubItems[3].Text;
- drp_audioSample.SelectedItem = lv_audioList.Items[lv_audioList.SelectedIndices[0]].SubItems[4].Text;
- drp_audioBitrate.SelectedItem = lv_audioList.Items[lv_audioList.SelectedIndices[0]].SubItems[5].Text;
+ drp_audioTrack.SelectedItem = audioList.SelectedRows[0].Cells[1].Value;
+ drp_audioEncoder.SelectedItem = audioList.SelectedRows[0].Cells[2].Value;
+ drp_audioMix.SelectedItem = audioList.SelectedRows[0].Cells[3].Value;
+ drp_audioSample.SelectedItem = audioList.SelectedRows[0].Cells[4].Value;
+ drp_audioBitrate.SelectedItem = audioList.SelectedRows[0].Cells[5].Value;
double drcValue;
int drcCalculated;
- double.TryParse(lv_audioList.Items[lv_audioList.SelectedIndices[0]].SubItems[6].Text, out drcValue);
+ double.TryParse(audioList.SelectedRows[0].Cells[6].Value.ToString(), out drcValue);
if (drcValue != 0)
drcValue = ((drcValue * 10) + 1) - 10;
int.TryParse(drcValue.ToString(), out drcCalculated);
tb_drc.Value = drcCalculated;
- lbl_drc.Text = lv_audioList.Items[lv_audioList.SelectedIndices[0]].SubItems[6].Text;
+ lbl_drc.Text = audioList.SelectedRows[0].Cells[6].Value.ToString();
- AudioTrackGroup.Text = "Selected Track: " +
- lv_audioList.Items[lv_audioList.SelectedIndices[0]].SubItems[0].Text;
+ AudioTrackGroup.Text = "Selected Track: " + audioList.SelectedRows[0].Cells[0].Value;
}
else
AudioTrackGroup.Text = "Selected Track: None (Click \"Add Track\" to add)";
@@ -337,22 +347,25 @@ namespace Handbrake.Controls value = ((tb_drc.Value - 1) / 10.0) + 1;
// Create a new row for the Audio list based on the currently selected items in the dropdown.
- ListViewItem newTrack = new ListViewItem(GetNewID().ToString());
- newTrack.SubItems.Add(drp_audioTrack.Text);
- newTrack.SubItems.Add(drp_audioEncoder.Text);
- newTrack.SubItems.Add(drp_audioMix.Text);
- newTrack.SubItems.Add(drp_audioSample.Text);
- newTrack.SubItems.Add(drp_audioBitrate.Text);
- newTrack.SubItems.Add(value.ToString());
- lv_audioList.Items.Add(newTrack);
+ DataGridViewRow newTrack = new DataGridViewRow();
+ newTrack.CreateCells(audioList);
+ newTrack.Cells[0].Value = GetNewID().ToString();
+ newTrack.Cells[1].Value = drp_audioTrack.Text;
+ newTrack.Cells[2].Value = drp_audioEncoder.Text;
+ newTrack.Cells[3].Value = drp_audioMix.Text;
+ newTrack.Cells[4].Value = drp_audioSample.Text;
+ newTrack.Cells[5].Value = drp_audioBitrate.Text;
+ newTrack.Cells[6].Value = value.ToString();
+ audioList.Rows.Add(newTrack);
// The Audio List has changed to raise the event.
if (this.AudioListChanged != null)
this.AudioListChanged(this, new EventArgs());
// Select the newly added track and select the control
- lv_audioList.Items[lv_audioList.Items.Count - 1].Selected = true;
- lv_audioList.Select();
+ audioList.ClearSelection();
+ audioList.Rows[audioList.Rows.Count - 1].Selected = true;
+ audioList.Select();
}
/// <summary>
@@ -413,7 +426,7 @@ namespace Handbrake.Controls RemoveTrack();
}
- // Public Functions
+ // Private Functions
/// <summary>
/// Add track for preset
@@ -421,9 +434,9 @@ namespace Handbrake.Controls /// <param name="item">
/// The item.
/// </param>
- private void AddTrackForPreset(ListViewItem item)
+ private void AddTrackForPreset(DataGridViewRow item)
{
- lv_audioList.Items.Add(item);
+ audioList.Rows.Add(item);
if (this.AudioListChanged != null)
this.AudioListChanged(this, new EventArgs());
}
@@ -433,7 +446,7 @@ namespace Handbrake.Controls /// </summary>
private void ClearAudioList()
{
- lv_audioList.Items.Clear();
+ audioList.Rows.Clear();
if (this.AudioListChanged != null)
this.AudioListChanged(this, new EventArgs());
}
@@ -446,7 +459,7 @@ namespace Handbrake.Controls /// </returns>
private int GetNewID()
{
- return lv_audioList.Items.Count + 1;
+ return audioList.Rows.Count + 1;
}
/// <summary>
@@ -455,26 +468,27 @@ namespace Handbrake.Controls private void RemoveTrack()
{
// Remove the Item and reselect the control if the following conditions are met.
- if (lv_audioList.SelectedItems.Count != 0)
+ if (audioList.SelectedRows.Count != 0)
{
// The Audio List is about to change so raise the event.
if (this.AudioListChanged != null)
this.AudioListChanged(this, new EventArgs());
// Record the current selected index.
- int currentPosition = lv_audioList.SelectedIndices[0];
+ int currentPosition = audioList.SelectedRows[0].Index;
- lv_audioList.Items.RemoveAt(lv_audioList.SelectedIndices[0]);
+ audioList.Rows.Remove(audioList.SelectedRows[0]);
// Now reslect the correct item and give focus to the audio list.
- if (lv_audioList.Items.Count != 0)
+ if (audioList.Rows.Count != 0)
{
- if (currentPosition <= (lv_audioList.Items.Count - 1))
- lv_audioList.Items[currentPosition].Selected = true;
- else if (currentPosition > (lv_audioList.Items.Count - 1))
- lv_audioList.Items[lv_audioList.Items.Count - 1].Selected = true;
+ audioList.ClearSelection();
+ if (currentPosition <= (audioList.Rows.Count - 1))
+ audioList.Rows[currentPosition].Selected = true;
+ else if (currentPosition > (audioList.Rows.Count - 1))
+ audioList.Rows[audioList.Rows.Count - 1].Selected = true;
- lv_audioList.Select();
+ audioList.Select();
}
// Regenerate the ID numers
ReGenerateListIDs();
@@ -489,20 +503,20 @@ namespace Handbrake.Controls /// </param>
private void MoveTrack(bool up)
{
- if (lv_audioList.SelectedIndices.Count == 0) return;
+ if (audioList.SelectedRows.Count == 0) return;
- ListViewItem item = lv_audioList.SelectedItems[0];
+ DataGridViewRow item = audioList.SelectedRows[0];
int index = item.Index;
if (up) index--;
else index++;
-
- if (index < lv_audioList.Items.Count || (lv_audioList.Items.Count > index && index >= 0))
+
+ if (index < audioList.Rows.Count || (audioList.Rows.Count > index && index >= 0))
{
- lv_audioList.Items.Remove(item);
- lv_audioList.Items.Insert(index, item);
+ audioList.Rows.Remove(item);
+ audioList.Rows.Insert(index, item);
+ audioList.ClearSelection();
item.Selected = true;
- lv_audioList.Focus();
}
}
@@ -512,9 +526,9 @@ namespace Handbrake.Controls private void ReGenerateListIDs()
{
int i = 1;
- foreach (ListViewItem item in lv_audioList.Items)
+ foreach (DataGridViewRow item in audioList.Rows)
{
- item.SubItems[0].Text = i.ToString();
+ item.Cells[0].Value = i.ToString();
i++;
}
}
diff --git a/win/C#/Controls/AudioPanel.resx b/win/C#/Controls/AudioPanel.resx index 07fd5e25d..1a227342d 100644 --- a/win/C#/Controls/AudioPanel.resx +++ b/win/C#/Controls/AudioPanel.resx @@ -123,4 +123,25 @@ <metadata name="AudioMenuRowHeightHack.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>35, 17</value>
</metadata>
+ <metadata name="Track.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>True</value>
+ </metadata>
+ <metadata name="Source.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>True</value>
+ </metadata>
+ <metadata name="AudioCodec.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>True</value>
+ </metadata>
+ <metadata name="Mixdown.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>True</value>
+ </metadata>
+ <metadata name="Samplerate.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>True</value>
+ </metadata>
+ <metadata name="Bitrate.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>True</value>
+ </metadata>
+ <metadata name="DRC.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>True</value>
+ </metadata>
</root>
\ No newline at end of file diff --git a/win/C#/Functions/QueryGenerator.cs b/win/C#/Functions/QueryGenerator.cs index d9aaf079c..2edfc9e30 100644 --- a/win/C#/Functions/QueryGenerator.cs +++ b/win/C#/Functions/QueryGenerator.cs @@ -252,7 +252,7 @@ namespace Handbrake.Functions #region Audio Settings Tab
- ListView audioTracks = mainWindow.AudioSettings.GetAudioPanel();
+ DataGridView audioTracks = mainWindow.AudioSettings.GetAudioPanel();
List<string> tracks = new List<string>();
List<string> codecs = new List<string>();
List<string> mixdowns = new List<string>();
@@ -261,40 +261,40 @@ namespace Handbrake.Functions List<string> drcs = new List<string>();
// No Audio
- if (audioTracks.Items.Count == 0)
+ if (audioTracks.Rows.Count == 0)
query += " -a none ";
// Gather information about each audio track and store them in the declared lists.
- foreach (ListViewItem row in audioTracks.Items)
+ foreach (DataGridViewRow row in audioTracks.Rows)
{
// Audio Track (-a)
- if (row.SubItems[1].Text == "Automatic")
+ if (row.Cells[1].Value.ToString() == "Automatic")
tracks.Add("1");
- else if (row.Text != "None")
+ else if (row.Cells[1].Value.ToString() != "None")
{
- string[] tempSub = row.SubItems[1].Text.Split(' ');
+ string[] tempSub = row.Cells[1].Value.ToString().Split(' ');
tracks.Add(tempSub[0]);
}
// Audio Codec (-E)
- if (row.SubItems[2].Text != String.Empty)
- codecs.Add(GetAudioEncoder(row.SubItems[2].Text));
+ if (row.Cells[2].Value.ToString() != String.Empty)
+ codecs.Add(GetAudioEncoder(row.Cells[2].Value.ToString()));
// Audio Mixdown (-6)
- if (row.SubItems[3].Text != String.Empty)
- mixdowns.Add(GetMixDown(row.SubItems[3].Text));
+ if (row.Cells[3].Value.ToString() != String.Empty)
+ mixdowns.Add(GetMixDown(row.Cells[3].Value.ToString()));
// Sample Rate (-R)
- if (row.SubItems[4].Text != String.Empty)
- samplerates.Add(row.SubItems[4].Text);
+ if (row.Cells[4].Value.ToString() != String.Empty)
+ samplerates.Add(row.Cells[4].Value.ToString());
// Audio Bitrate (-B)
- if (row.SubItems[5].Text != String.Empty)
- bitrates.Add(row.SubItems[5].Text.Replace("Auto", "auto"));
+ if (row.Cells[5].Value.ToString() != String.Empty)
+ bitrates.Add(row.Cells[5].Value.ToString().Replace("Auto", "auto"));
// DRC (-D)
- if (row.SubItems[6].Text != String.Empty)
- drcs.Add(row.SubItems[6].Text);
+ if (row.Cells[6].Value.ToString() != String.Empty)
+ drcs.Add(row.Cells[6].Value.ToString());
}
// Audio Track (-a)
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs index 5bad68dff..a8069e35a 100644 --- a/win/C#/frmMain.Designer.cs +++ b/win/C#/frmMain.Designer.cs @@ -55,8 +55,6 @@ namespace Handbrake this.check_optimiseMP4 = new System.Windows.Forms.CheckBox();
this.check_iPodAtom = new System.Windows.Forms.CheckBox();
this.data_chpt = new System.Windows.Forms.DataGridView();
- this.number = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ChaptersMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.mnu_resetChapters = new System.Windows.Forms.ToolStripMenuItem();
this.btn_addPreset = new System.Windows.Forms.Button();
@@ -77,7 +75,10 @@ namespace Handbrake this.mnu_exit = new System.Windows.Forms.ToolStripMenuItem();
this.mnu_open3 = new System.Windows.Forms.ToolStripMenuItem();
this.ToolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.mnu_encode = new System.Windows.Forms.ToolStripMenuItem();
+ this.mnu_encodeLog = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
+ this.mnu_options = new System.Windows.Forms.ToolStripMenuItem();
this.PresetsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.mnu_presetReset = new System.Windows.Forms.ToolStripMenuItem();
this.mnu_delete_preset = new System.Windows.Forms.ToolStripMenuItem();
@@ -86,9 +87,11 @@ namespace Handbrake this.mnu_importMacPreset = new System.Windows.Forms.ToolStripMenuItem();
this.mnu_SelectDefault = new System.Windows.Forms.ToolStripMenuItem();
this.HelpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.mnu_user_guide = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.mnu_UpdateCheck = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
+ this.mnu_about = new System.Windows.Forms.ToolStripMenuItem();
this.frmMainMenu = new System.Windows.Forms.MenuStrip();
this.label5 = new System.Windows.Forms.Label();
this.Label47 = new System.Windows.Forms.Label();
@@ -135,8 +138,17 @@ namespace Handbrake this.pmnu_saveChanges = new System.Windows.Forms.ToolStripMenuItem();
this.pmnu_delete = new System.Windows.Forms.ToolStripMenuItem();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
+ this.btn_source = new System.Windows.Forms.ToolStripDropDownButton();
+ this.btn_file_source = new System.Windows.Forms.ToolStripMenuItem();
+ this.btn_dvd_source = new System.Windows.Forms.ToolStripMenuItem();
+ this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
+ this.btn_start = new System.Windows.Forms.ToolStripButton();
+ this.btn_add2Queue = new System.Windows.Forms.ToolStripButton();
+ this.btn_showQueue = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
+ this.tb_preview = new System.Windows.Forms.ToolStripButton();
+ this.btn_ActivityWindow = new System.Windows.Forms.ToolStripButton();
this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
this.StatusStrip = new System.Windows.Forms.StatusStrip();
this.lbl_encode = new System.Windows.Forms.ToolStripStatusLabel();
@@ -159,20 +171,8 @@ namespace Handbrake this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.openPreset = new System.Windows.Forms.OpenFileDialog();
this.File_ChapterImport = new System.Windows.Forms.OpenFileDialog();
- this.btn_source = new System.Windows.Forms.ToolStripDropDownButton();
- this.btn_file_source = new System.Windows.Forms.ToolStripMenuItem();
- this.btn_dvd_source = new System.Windows.Forms.ToolStripMenuItem();
- this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
- this.btn_start = new System.Windows.Forms.ToolStripButton();
- this.btn_add2Queue = new System.Windows.Forms.ToolStripButton();
- this.btn_showQueue = new System.Windows.Forms.ToolStripButton();
- this.tb_preview = new System.Windows.Forms.ToolStripButton();
- this.btn_ActivityWindow = new System.Windows.Forms.ToolStripButton();
- this.mnu_encode = new System.Windows.Forms.ToolStripMenuItem();
- this.mnu_encodeLog = new System.Windows.Forms.ToolStripMenuItem();
- this.mnu_options = new System.Windows.Forms.ToolStripMenuItem();
- this.mnu_user_guide = new System.Windows.Forms.ToolStripMenuItem();
- this.mnu_about = new System.Windows.Forms.ToolStripMenuItem();
+ this.number = new System.Windows.Forms.DataGridViewTextBoxColumn();
+ this.name = new System.Windows.Forms.DataGridViewTextBoxColumn();
notifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
notifyIconMenu.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).BeginInit();
@@ -207,13 +207,13 @@ namespace Handbrake this.btn_restore});
notifyIconMenu.Name = "notifyIconMenu";
notifyIconMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
- notifyIconMenu.Size = new System.Drawing.Size(153, 48);
+ notifyIconMenu.Size = new System.Drawing.Size(114, 26);
//
// btn_restore
//
this.btn_restore.Image = global::Handbrake.Properties.Resources.Restore;
this.btn_restore.Name = "btn_restore";
- this.btn_restore.Size = new System.Drawing.Size(152, 22);
+ this.btn_restore.Size = new System.Drawing.Size(113, 22);
this.btn_restore.Text = "Restore";
this.btn_restore.Click += new System.EventHandler(this.btn_restore_Click);
//
@@ -276,7 +276,7 @@ namespace Handbrake this.check_turbo.Enabled = false;
this.check_turbo.Location = new System.Drawing.Point(146, 123);
this.check_turbo.Name = "check_turbo";
- this.check_turbo.Size = new System.Drawing.Size(101, 17);
+ this.check_turbo.Size = new System.Drawing.Size(99, 17);
this.check_turbo.TabIndex = 7;
this.check_turbo.Text = "Turbo first Pass";
this.ToolTip.SetToolTip(this.check_turbo, "Makes the first pass of a 2 pass encode faster.");
@@ -383,7 +383,9 @@ namespace Handbrake this.data_chpt.AllowUserToAddRows = false;
this.data_chpt.AllowUserToDeleteRows = false;
this.data_chpt.AllowUserToResizeRows = false;
- this.data_chpt.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.data_chpt.BackgroundColor = System.Drawing.Color.White;
+ this.data_chpt.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;
+ this.data_chpt.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.data_chpt.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.number,
this.name});
@@ -396,24 +398,6 @@ namespace Handbrake this.data_chpt.TabIndex = 3;
this.ToolTip.SetToolTip(this.data_chpt, resources.GetString("data_chpt.ToolTip"));
//
- // number
- //
- dataGridViewCellStyle1.Format = "N0";
- dataGridViewCellStyle1.NullValue = null;
- this.number.DefaultCellStyle = dataGridViewCellStyle1;
- this.number.Frozen = true;
- this.number.HeaderText = "Chapter Number";
- this.number.MaxInputLength = 3;
- this.number.Name = "number";
- this.number.Resizable = System.Windows.Forms.DataGridViewTriState.False;
- this.number.Width = 165;
- //
- // name
- //
- this.name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
- this.name.HeaderText = "Chapter Name";
- this.name.Name = "name";
- //
// ChaptersMenu
//
this.ChaptersMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -619,11 +603,37 @@ namespace Handbrake this.ToolsToolStripMenuItem.Size = new System.Drawing.Size(48, 20);
this.ToolsToolStripMenuItem.Text = "&Tools";
//
+ // mnu_encode
+ //
+ this.mnu_encode.Image = global::Handbrake.Properties.Resources.Queue_Small;
+ this.mnu_encode.Name = "mnu_encode";
+ this.mnu_encode.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Q)));
+ this.mnu_encode.Size = new System.Drawing.Size(201, 22);
+ this.mnu_encode.Text = "Show Queue";
+ this.mnu_encode.Click += new System.EventHandler(this.mnu_encode_Click);
+ //
+ // mnu_encodeLog
+ //
+ this.mnu_encodeLog.Image = global::Handbrake.Properties.Resources.ActivityWindow_small;
+ this.mnu_encodeLog.Name = "mnu_encodeLog";
+ this.mnu_encodeLog.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.L)));
+ this.mnu_encodeLog.Size = new System.Drawing.Size(201, 22);
+ this.mnu_encodeLog.Text = "Activity Window";
+ this.mnu_encodeLog.Click += new System.EventHandler(this.mnu_encodeLog_Click);
+ //
// ToolStripSeparator5
//
this.ToolStripSeparator5.Name = "ToolStripSeparator5";
this.ToolStripSeparator5.Size = new System.Drawing.Size(198, 6);
//
+ // mnu_options
+ //
+ this.mnu_options.Image = global::Handbrake.Properties.Resources.Pref_Small;
+ this.mnu_options.Name = "mnu_options";
+ this.mnu_options.Size = new System.Drawing.Size(201, 22);
+ this.mnu_options.Text = "Options";
+ this.mnu_options.Click += new System.EventHandler(this.mnu_options_Click);
+ //
// PresetsToolStripMenuItem
//
this.PresetsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -691,6 +701,14 @@ namespace Handbrake this.HelpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
this.HelpToolStripMenuItem.Text = "&Help";
//
+ // mnu_user_guide
+ //
+ this.mnu_user_guide.Image = global::Handbrake.Properties.Resources.Help16;
+ this.mnu_user_guide.Name = "mnu_user_guide";
+ this.mnu_user_guide.Size = new System.Drawing.Size(192, 22);
+ this.mnu_user_guide.Text = "HandBrake User Guide";
+ this.mnu_user_guide.Click += new System.EventHandler(this.mnu_user_guide_Click);
+ //
// ToolStripSeparator3
//
this.ToolStripSeparator3.Name = "ToolStripSeparator3";
@@ -708,6 +726,14 @@ namespace Handbrake this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(189, 6);
//
+ // mnu_about
+ //
+ this.mnu_about.Image = global::Handbrake.Properties.Resources.hb16;
+ this.mnu_about.Name = "mnu_about";
+ this.mnu_about.Size = new System.Drawing.Size(192, 22);
+ this.mnu_about.Text = "About...";
+ this.mnu_about.Click += new System.EventHandler(this.mnu_about_Click);
+ //
// frmMainMenu
//
this.frmMainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -814,7 +840,7 @@ namespace Handbrake this.radio_cq.BackColor = System.Drawing.Color.Transparent;
this.radio_cq.Location = new System.Drawing.Point(336, 97);
this.radio_cq.Name = "radio_cq";
- this.radio_cq.Size = new System.Drawing.Size(110, 17);
+ this.radio_cq.Size = new System.Drawing.Size(105, 17);
this.radio_cq.TabIndex = 18;
this.radio_cq.Text = "Constant Quality:";
this.radio_cq.UseVisualStyleBackColor = false;
@@ -827,7 +853,7 @@ namespace Handbrake this.radio_avgBitrate.Checked = true;
this.radio_avgBitrate.Location = new System.Drawing.Point(336, 64);
this.radio_avgBitrate.Name = "radio_avgBitrate";
- this.radio_avgBitrate.Size = new System.Drawing.Size(116, 17);
+ this.radio_avgBitrate.Size = new System.Drawing.Size(112, 17);
this.radio_avgBitrate.TabIndex = 17;
this.radio_avgBitrate.TabStop = true;
this.radio_avgBitrate.Text = "Avg Bitrate (kbps):";
@@ -840,7 +866,7 @@ namespace Handbrake this.radio_targetFilesize.BackColor = System.Drawing.Color.Transparent;
this.radio_targetFilesize.Location = new System.Drawing.Point(336, 37);
this.radio_targetFilesize.Name = "radio_targetFilesize";
- this.radio_targetFilesize.Size = new System.Drawing.Size(108, 17);
+ this.radio_targetFilesize.Size = new System.Drawing.Size(107, 17);
this.radio_targetFilesize.TabIndex = 16;
this.radio_targetFilesize.Text = "Target Size (MB):";
this.radio_targetFilesize.UseVisualStyleBackColor = false;
@@ -863,7 +889,7 @@ namespace Handbrake this.check_2PassEncode.BackColor = System.Drawing.Color.Transparent;
this.check_2PassEncode.Location = new System.Drawing.Point(125, 100);
this.check_2PassEncode.Name = "check_2PassEncode";
- this.check_2PassEncode.Size = new System.Drawing.Size(104, 17);
+ this.check_2PassEncode.Size = new System.Drawing.Size(106, 17);
this.check_2PassEncode.TabIndex = 6;
this.check_2PassEncode.Text = "2-Pass Encoding";
this.check_2PassEncode.UseVisualStyleBackColor = false;
@@ -1156,9 +1182,9 @@ namespace Handbrake this.treeView_presets.ShowLines = false;
this.treeView_presets.Size = new System.Drawing.Size(240, 424);
this.treeView_presets.TabIndex = 0;
- this.treeView_presets.MouseUp += new System.Windows.Forms.MouseEventHandler(this.treeview_presets_mouseUp);
this.treeView_presets.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView_presets_AfterSelect);
this.treeView_presets.KeyUp += new System.Windows.Forms.KeyEventHandler(this.treeView_presets_deleteKey);
+ this.treeView_presets.MouseUp += new System.Windows.Forms.MouseEventHandler(this.treeview_presets_mouseUp);
//
// presets_menu
//
@@ -1239,16 +1265,111 @@ namespace Handbrake this.toolStrip1.TabIndex = 1;
this.toolStrip1.Text = "toolStrip1";
//
+ // btn_source
+ //
+ this.btn_source.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.btn_file_source,
+ this.btn_dvd_source,
+ this.toolStripSeparator1});
+ this.btn_source.Image = global::Handbrake.Properties.Resources.Movies;
+ this.btn_source.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+ this.btn_source.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.btn_source.Name = "btn_source";
+ this.btn_source.Size = new System.Drawing.Size(88, 36);
+ this.btn_source.Text = "Source";
+ this.btn_source.ToolTipText = "Open a new source file or folder.";
+ this.btn_source.Click += new System.EventHandler(this.btn_source_Click);
+ //
+ // btn_file_source
+ //
+ this.btn_file_source.Image = global::Handbrake.Properties.Resources.Movies_Small;
+ this.btn_file_source.Name = "btn_file_source";
+ this.btn_file_source.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
+ this.btn_file_source.Size = new System.Drawing.Size(182, 22);
+ this.btn_file_source.Text = "Video File";
+ this.btn_file_source.Click += new System.EventHandler(this.btn_file_source_Click);
+ //
+ // btn_dvd_source
+ //
+ this.btn_dvd_source.Image = global::Handbrake.Properties.Resources.folder;
+ this.btn_dvd_source.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.btn_dvd_source.Name = "btn_dvd_source";
+ this.btn_dvd_source.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
+ | System.Windows.Forms.Keys.O)));
+ this.btn_dvd_source.Size = new System.Drawing.Size(182, 22);
+ this.btn_dvd_source.Text = "Folder";
+ this.btn_dvd_source.Click += new System.EventHandler(this.btn_dvd_source_Click);
+ //
+ // toolStripSeparator1
+ //
+ this.toolStripSeparator1.Name = "toolStripSeparator1";
+ this.toolStripSeparator1.Size = new System.Drawing.Size(179, 6);
+ //
// toolStripSeparator10
//
this.toolStripSeparator10.Name = "toolStripSeparator10";
this.toolStripSeparator10.Size = new System.Drawing.Size(6, 39);
//
+ // btn_start
+ //
+ this.btn_start.Image = global::Handbrake.Properties.Resources.Play;
+ this.btn_start.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+ this.btn_start.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.btn_start.Name = "btn_start";
+ this.btn_start.Size = new System.Drawing.Size(67, 36);
+ this.btn_start.Text = "Start";
+ this.btn_start.ToolTipText = "Start the encoding process";
+ this.btn_start.Click += new System.EventHandler(this.btn_start_Click);
+ //
+ // btn_add2Queue
+ //
+ this.btn_add2Queue.Image = global::Handbrake.Properties.Resources.AddToQueue;
+ this.btn_add2Queue.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+ this.btn_add2Queue.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.btn_add2Queue.Name = "btn_add2Queue";
+ this.btn_add2Queue.Size = new System.Drawing.Size(117, 36);
+ this.btn_add2Queue.Text = "Add to Queue";
+ this.btn_add2Queue.ToolTipText = "Add a new item to the Queue";
+ this.btn_add2Queue.Click += new System.EventHandler(this.btn_add2Queue_Click);
+ //
+ // btn_showQueue
+ //
+ this.btn_showQueue.Image = global::Handbrake.Properties.Resources.Queue;
+ this.btn_showQueue.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+ this.btn_showQueue.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.btn_showQueue.Name = "btn_showQueue";
+ this.btn_showQueue.Size = new System.Drawing.Size(110, 36);
+ this.btn_showQueue.Tag = "";
+ this.btn_showQueue.Text = "Show Queue";
+ this.btn_showQueue.Click += new System.EventHandler(this.btn_showQueue_Click);
+ //
// toolStripSeparator4
//
this.toolStripSeparator4.Name = "toolStripSeparator4";
this.toolStripSeparator4.Size = new System.Drawing.Size(6, 39);
//
+ // tb_preview
+ //
+ this.tb_preview.Image = global::Handbrake.Properties.Resources.window;
+ this.tb_preview.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+ this.tb_preview.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.tb_preview.Name = "tb_preview";
+ this.tb_preview.Size = new System.Drawing.Size(84, 36);
+ this.tb_preview.Text = "Preview";
+ this.tb_preview.Click += new System.EventHandler(this.tb_preview_Click);
+ //
+ // btn_ActivityWindow
+ //
+ this.btn_ActivityWindow.Image = global::Handbrake.Properties.Resources.ActivityWindow;
+ this.btn_ActivityWindow.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+ this.btn_ActivityWindow.ImageTransparentColor = System.Drawing.Color.Magenta;
+ this.btn_ActivityWindow.Name = "btn_ActivityWindow";
+ this.btn_ActivityWindow.Size = new System.Drawing.Size(130, 36);
+ this.btn_ActivityWindow.Text = "Activity Window";
+ this.btn_ActivityWindow.ToolTipText = "Displays the activity window which displays the log of the last completed or curr" +
+ "ently running encode.";
+ this.btn_ActivityWindow.Click += new System.EventHandler(this.btn_ActivityWindow_Click);
+ //
// notifyIcon
//
this.notifyIcon.BalloonTipIcon = System.Windows.Forms.ToolTipIcon.Info;
@@ -1503,142 +1624,25 @@ namespace Handbrake //
this.File_ChapterImport.Filter = "CSV Files|*.csv";
//
- // btn_source
- //
- this.btn_source.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.btn_file_source,
- this.btn_dvd_source,
- this.toolStripSeparator1});
- this.btn_source.Image = global::Handbrake.Properties.Resources.Movies;
- this.btn_source.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
- this.btn_source.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.btn_source.Name = "btn_source";
- this.btn_source.Size = new System.Drawing.Size(88, 36);
- this.btn_source.Text = "Source";
- this.btn_source.ToolTipText = "Open a new source file or folder.";
- this.btn_source.Click += new System.EventHandler(this.btn_source_Click);
- //
- // btn_file_source
- //
- this.btn_file_source.Image = global::Handbrake.Properties.Resources.Movies_Small;
- this.btn_file_source.Name = "btn_file_source";
- this.btn_file_source.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
- this.btn_file_source.Size = new System.Drawing.Size(182, 22);
- this.btn_file_source.Text = "Video File";
- this.btn_file_source.Click += new System.EventHandler(this.btn_file_source_Click);
- //
- // btn_dvd_source
- //
- this.btn_dvd_source.Image = global::Handbrake.Properties.Resources.folder;
- this.btn_dvd_source.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.btn_dvd_source.Name = "btn_dvd_source";
- this.btn_dvd_source.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
- | System.Windows.Forms.Keys.O)));
- this.btn_dvd_source.Size = new System.Drawing.Size(182, 22);
- this.btn_dvd_source.Text = "Folder";
- this.btn_dvd_source.Click += new System.EventHandler(this.btn_dvd_source_Click);
- //
- // toolStripSeparator1
- //
- this.toolStripSeparator1.Name = "toolStripSeparator1";
- this.toolStripSeparator1.Size = new System.Drawing.Size(179, 6);
- //
- // btn_start
- //
- this.btn_start.Image = global::Handbrake.Properties.Resources.Play;
- this.btn_start.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
- this.btn_start.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.btn_start.Name = "btn_start";
- this.btn_start.Size = new System.Drawing.Size(67, 36);
- this.btn_start.Text = "Start";
- this.btn_start.ToolTipText = "Start the encoding process";
- this.btn_start.Click += new System.EventHandler(this.btn_start_Click);
- //
- // btn_add2Queue
- //
- this.btn_add2Queue.Image = global::Handbrake.Properties.Resources.AddToQueue;
- this.btn_add2Queue.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
- this.btn_add2Queue.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.btn_add2Queue.Name = "btn_add2Queue";
- this.btn_add2Queue.Size = new System.Drawing.Size(117, 36);
- this.btn_add2Queue.Text = "Add to Queue";
- this.btn_add2Queue.ToolTipText = "Add a new item to the Queue";
- this.btn_add2Queue.Click += new System.EventHandler(this.btn_add2Queue_Click);
- //
- // btn_showQueue
- //
- this.btn_showQueue.Image = global::Handbrake.Properties.Resources.Queue;
- this.btn_showQueue.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
- this.btn_showQueue.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.btn_showQueue.Name = "btn_showQueue";
- this.btn_showQueue.Size = new System.Drawing.Size(110, 36);
- this.btn_showQueue.Tag = "";
- this.btn_showQueue.Text = "Show Queue";
- this.btn_showQueue.Click += new System.EventHandler(this.btn_showQueue_Click);
- //
- // tb_preview
- //
- this.tb_preview.Image = global::Handbrake.Properties.Resources.window;
- this.tb_preview.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
- this.tb_preview.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.tb_preview.Name = "tb_preview";
- this.tb_preview.Size = new System.Drawing.Size(84, 36);
- this.tb_preview.Text = "Preview";
- this.tb_preview.Click += new System.EventHandler(this.tb_preview_Click);
- //
- // btn_ActivityWindow
- //
- this.btn_ActivityWindow.Image = global::Handbrake.Properties.Resources.ActivityWindow;
- this.btn_ActivityWindow.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
- this.btn_ActivityWindow.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.btn_ActivityWindow.Name = "btn_ActivityWindow";
- this.btn_ActivityWindow.Size = new System.Drawing.Size(130, 36);
- this.btn_ActivityWindow.Text = "Activity Window";
- this.btn_ActivityWindow.ToolTipText = "Displays the activity window which displays the log of the last completed or curr" +
- "ently running encode.";
- this.btn_ActivityWindow.Click += new System.EventHandler(this.btn_ActivityWindow_Click);
- //
- // mnu_encode
- //
- this.mnu_encode.Image = global::Handbrake.Properties.Resources.Queue_Small;
- this.mnu_encode.Name = "mnu_encode";
- this.mnu_encode.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Q)));
- this.mnu_encode.Size = new System.Drawing.Size(201, 22);
- this.mnu_encode.Text = "Show Queue";
- this.mnu_encode.Click += new System.EventHandler(this.mnu_encode_Click);
- //
- // mnu_encodeLog
- //
- this.mnu_encodeLog.Image = global::Handbrake.Properties.Resources.ActivityWindow_small;
- this.mnu_encodeLog.Name = "mnu_encodeLog";
- this.mnu_encodeLog.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.L)));
- this.mnu_encodeLog.Size = new System.Drawing.Size(201, 22);
- this.mnu_encodeLog.Text = "Activity Window";
- this.mnu_encodeLog.Click += new System.EventHandler(this.mnu_encodeLog_Click);
- //
- // mnu_options
- //
- this.mnu_options.Image = global::Handbrake.Properties.Resources.Pref_Small;
- this.mnu_options.Name = "mnu_options";
- this.mnu_options.Size = new System.Drawing.Size(201, 22);
- this.mnu_options.Text = "Options";
- this.mnu_options.Click += new System.EventHandler(this.mnu_options_Click);
- //
- // mnu_user_guide
+ // number
//
- this.mnu_user_guide.Image = global::Handbrake.Properties.Resources.Help16;
- this.mnu_user_guide.Name = "mnu_user_guide";
- this.mnu_user_guide.Size = new System.Drawing.Size(192, 22);
- this.mnu_user_guide.Text = "HandBrake User Guide";
- this.mnu_user_guide.Click += new System.EventHandler(this.mnu_user_guide_Click);
+ dataGridViewCellStyle1.Format = "N0";
+ dataGridViewCellStyle1.NullValue = null;
+ this.number.DefaultCellStyle = dataGridViewCellStyle1;
+ this.number.Frozen = true;
+ this.number.HeaderText = "Chapter Number";
+ this.number.MaxInputLength = 3;
+ this.number.Name = "number";
+ this.number.Resizable = System.Windows.Forms.DataGridViewTriState.False;
+ this.number.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+ this.number.Width = 165;
//
- // mnu_about
+ // name
//
- this.mnu_about.Image = global::Handbrake.Properties.Resources.hb16;
- this.mnu_about.Name = "mnu_about";
- this.mnu_about.Size = new System.Drawing.Size(192, 22);
- this.mnu_about.Text = "About...";
- this.mnu_about.Click += new System.EventHandler(this.mnu_about_Click);
+ this.name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+ this.name.HeaderText = "Chapter Name";
+ this.name.Name = "name";
+ this.name.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// frmMain
//
diff --git a/win/C#/frmMain.resx b/win/C#/frmMain.resx index 7f7acfbab..49b97ddb8 100644 --- a/win/C#/frmMain.resx +++ b/win/C#/frmMain.resx @@ -117,12 +117,12 @@ <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
- <metadata name="notifyIconMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>17, 54</value>
- </metadata>
<metadata name="notifyIconMenu.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
+ <metadata name="notifyIconMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 54</value>
+ </metadata>
<metadata name="DVD_Save.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>556, 15</value>
</metadata>
|