diff options
author | sr55 <[email protected]> | 2010-02-08 20:59:46 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2010-02-08 20:59:46 +0000 |
commit | 974fc416c9b792a5e7b1b2ce59083f68f2e6f8c4 (patch) | |
tree | 615ce4cd2177b363ff7393e2e8825dfba8d0bc24 /win/C# | |
parent | e9d428e473e896b6a8d699c9c745e200869cfd69 (diff) |
WinGui:
- Banish % Quality display.
- Code Refactoring.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3105 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#')
-rw-r--r-- | win/C#/Controls/AudioPanel.cs | 89 | ||||
-rw-r--r-- | win/C#/Controls/x264Panel.cs | 212 | ||||
-rw-r--r-- | win/C#/EncodeQueue/Queue.cs | 3 | ||||
-rw-r--r-- | win/C#/Functions/PresetLoader.cs | 2 | ||||
-rw-r--r-- | win/C#/Functions/QueryGenerator.cs | 7 | ||||
-rw-r--r-- | win/C#/Functions/QueryParser.cs | 2 | ||||
-rw-r--r-- | win/C#/frmMain.Designer.cs | 119 | ||||
-rw-r--r-- | win/C#/frmMain.cs | 22 |
8 files changed, 224 insertions, 232 deletions
diff --git a/win/C#/Controls/AudioPanel.cs b/win/C#/Controls/AudioPanel.cs index a56daa3be..b60bf767e 100644 --- a/win/C#/Controls/AudioPanel.cs +++ b/win/C#/Controls/AudioPanel.cs @@ -112,6 +112,53 @@ namespace Handbrake.Controls }
}
+ /// <summary>
+ /// Set the Track list dropdown from the parsed title captured during the scan
+ /// </summary>
+ /// <param name="selectedTitle"></param>
+ public void SetTrackList(Parsing.Title selectedTitle)
+ {
+ drp_audioTrack.Items.Clear();
+ drp_audioTrack.Items.Add("Automatic");
+ drp_audioTrack.Items.Add("None");
+ drp_audioTrack.Items.AddRange(selectedTitle.AudioTracks.ToArray());
+
+ // Handle Native Language and "Dub Foreign language audio" and "Use Foreign language audio and Subtitles" Options
+ if (Properties.Settings.Default.NativeLanguage == "Any")
+ drp_audioTrack.SelectedIndex = drp_audioTrack.Items.Count >= 3 ? 2 : 0;
+ else
+ {
+ if (Properties.Settings.Default.DubAudio) // "Dub Foreign language audio"
+ {
+ int i = 0;
+ foreach (object item in drp_audioTrack.Items)
+ {
+ if (item.ToString().Contains(Properties.Settings.Default.NativeLanguage))
+ {
+ drp_audioTrack.SelectedIndex = i;
+ break;
+ }
+
+ i++;
+ }
+
+ if (drp_audioTrack.SelectedItem != null)
+ foreach (ListViewItem item in lv_audioList.Items)
+ item.SubItems[1].Text = 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();
+ }
+ }
+ else
+ drp_audioTrack.SelectedIndex = drp_audioTrack.Items.Count >= 3 ? 2 : 0; // "Use Foreign language audio and Subtitles"
+ }
+ drp_audioMix.SelectedIndex = 0;
+ }
+
// Control and ListView
private void controlChanged(object sender, EventArgs e)
{
@@ -246,48 +293,6 @@ namespace Handbrake.Controls }
// Public Functions
- public void SetTrackList(Parsing.Title selectedTitle)
- {
- drp_audioTrack.Items.Clear();
- drp_audioTrack.Items.Add("Automatic");
- drp_audioTrack.Items.Add("None");
- drp_audioTrack.Items.AddRange(selectedTitle.AudioTracks.ToArray());
-
- // Handle Native Language and "Dub Foreign language audio" and "Use Foreign language audio and Subtitles" Options
- if (Properties.Settings.Default.NativeLanguage == "Any")
- drp_audioTrack.SelectedIndex = drp_audioTrack.Items.Count >= 3 ? 2 : 0;
- else
- {
- if (Properties.Settings.Default.DubAudio) // "Dub Foreign language audio"
- {
- int i = 0;
- foreach (object item in drp_audioTrack.Items)
- {
- if (item.ToString().Contains(Properties.Settings.Default.NativeLanguage))
- {
- drp_audioTrack.SelectedIndex = i;
- break;
- }
-
- i++;
- }
-
- if (drp_audioTrack.SelectedItem != null)
- foreach (ListViewItem item in lv_audioList.Items)
- item.SubItems[1].Text = 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();
- }
- }
- else
- drp_audioTrack.SelectedIndex = drp_audioTrack.Items.Count >= 3 ? 2 : 0; // "Use Foreign language audio and Subtitles"
- }
- drp_audioMix.SelectedIndex = 0;
- }
private void AddTrackForPreset(ListViewItem item)
{
lv_audioList.Items.Add(item);
diff --git a/win/C#/Controls/x264Panel.cs b/win/C#/Controls/x264Panel.cs index 4229c8298..78480b2de 100644 --- a/win/C#/Controls/x264Panel.cs +++ b/win/C#/Controls/x264Panel.cs @@ -11,6 +11,14 @@ namespace Handbrake.Controls {
public partial class x264Panel : UserControl
{
+ /*
+ * TODO This code was ported from the obj-c MacGUI code. It's really messy and could really do with being cleaned up
+ * at some point.
+ */
+
+ /// <summary>
+ /// Initializes a new instance of the x264 panel user control
+ /// </summary>
public x264Panel()
{
InitializeComponent();
@@ -18,109 +26,22 @@ namespace Handbrake.Controls if (Properties.Settings.Default.tooltipEnable)
ToolTip.Active = true;
- reset2Defaults();
+ Reset2Defaults();
}
- public string x264Query
+ /// <summary>
+ /// Gets or sets the X264 query string
+ /// </summary>
+ public string X264Query
{
get { return rtf_x264Query.Text; }
set { rtf_x264Query.Text = value; }
}
-
- private void widgetControlChanged(object sender, EventArgs e)
- {
- Control changedControlName = (Control) sender;
- string controlName = "";
-
- switch (changedControlName.Name.Trim())
- {
- case "drop_refFrames":
- controlName = "ref";
- break;
- case "check_mixedReferences":
- controlName = "mixed-refs";
- break;
- case "drop_bFrames":
- controlName = "bframes";
- break;
- case "drop_directPrediction":
- controlName = "direct";
- break;
- case "check_weightedBFrames":
- controlName = "weightb";
- break;
- case "check_pyrmidalBFrames":
- controlName = "b-pyramid";
- break;
- case "drop_MotionEstimationMethod":
- controlName = "me";
- break;
- case "drop_MotionEstimationRange":
- controlName = "merange";
- break;
- case "drop_subpixelMotionEstimation":
- controlName = "subq";
- break;
- case "drop_analysis":
- controlName = "analyse";
- break;
- case "check_8x8DCT":
- controlName = "8x8dct";
- break;
- case "drop_deblockAlpha":
- controlName = "deblock";
- break;
- case "drop_deblockBeta":
- controlName = "deblock";
- break;
- case "drop_trellis":
- controlName = "trellis";
- break;
- case "check_noFastPSkip":
- controlName = "no-fast-pskip";
- break;
- case "check_noDCTDecimate":
- controlName = "no-dct-decimate";
- break;
- case "check_Cabac":
- controlName = "cabac";
- break;
- case "slider_psyrd":
- controlName = "psy-rd";
- break;
- case "slider_psytrellis":
- controlName = "psy-rd";
- break;
- case "drop_adaptBFrames":
- controlName = "b-adapt";
- break;
- }
- on_x264_WidgetChange(controlName);
- }
- private void rtf_x264Query_TextChanged(object sender, EventArgs e)
- {
- if (rtf_x264Query.Text.EndsWith("\n"))
- {
- string query = rtf_x264Query.Text.Replace("\n", "");
- reset2Defaults();
- rtf_x264Query.Text = query;
- X264_StandardizeOptString();
- X264_SetCurrentSettingsInPanel();
-
- if (rtf_x264Query.Text == string.Empty)
- reset2Defaults();
- }
- }
- private void btn_reset_Click(object sender, EventArgs e)
- {
- rtf_x264Query.Text = "";
- reset2Defaults();
- }
/// <summary>
/// Reset all components to defaults and clears the x264 rtf box
/// </summary>
- public void reset2Defaults()
+ public void Reset2Defaults()
{
check_8x8DCT.CheckState = CheckState.Checked;
check_Cabac.CheckState = CheckState.Checked;
@@ -427,9 +348,9 @@ namespace Handbrake.Controls /// <summary>
/// This function will update the X264 Query when one of the GUI widgets changes.
/// </summary>
- private void on_x264_WidgetChange(string sender)
+ private void OnX264WidgetChange(string sender)
{
- animate(sender);
+ Animate(sender);
String optNameToChange = sender;
String currentOptString = rtf_x264Query.Text;
@@ -440,9 +361,9 @@ namespace Handbrake.Controls // IF the current H264 Option String Contains Multiple Items or Just 1 Item
if ((currentOptString.Contains(checkOptNameToChange)) || (currentOptString.StartsWith(checkOptNameToChangeBegin)))
- hasOptions(currentOptString, optNameToChange);
+ HasOptions(currentOptString, optNameToChange);
else // IF there is no options in the rich text box!
- hasNoOptions(optNameToChange);
+ HasNoOptions(optNameToChange);
}
/// <summary>
@@ -451,7 +372,7 @@ namespace Handbrake.Controls /// </summary>
/// <param name="currentOptString"></param>
/// <param name="optNameToChange"></param>
- private void hasOptions(string currentOptString, string optNameToChange)
+ private void HasOptions(string currentOptString, string optNameToChange)
{
String thisOpt; // The separated option such as "bframes=3"
String optName; // The option name such as "bframes"
@@ -663,7 +584,7 @@ namespace Handbrake.Controls /// e.g no-fast-pskip
/// </summary>
/// <param name="optNameToChange"></param>
- private void hasNoOptions(string optNameToChange)
+ private void HasNoOptions(IEquatable<string> optNameToChange)
{
string colon = "";
if (rtf_x264Query.Text != "")
@@ -852,7 +773,7 @@ namespace Handbrake.Controls /// Shows and hides controls based on the values of other controls.
/// </summary>
/// <param name="sender"></param>
- private void animate(string sender)
+ private void Animate(string sender)
{
/* Lots of situations to cover.
- B-frames (when 0 turn of b-frame specific stuff, when < 2 disable b-pyramid)
@@ -998,5 +919,96 @@ namespace Handbrake.Controls break;
}
}
+
+
+ private void widgetControlChanged(object sender, EventArgs e)
+ {
+ Control changedControlName = (Control)sender;
+ string controlName = "";
+
+ switch (changedControlName.Name.Trim())
+ {
+ case "drop_refFrames":
+ controlName = "ref";
+ break;
+ case "check_mixedReferences":
+ controlName = "mixed-refs";
+ break;
+ case "drop_bFrames":
+ controlName = "bframes";
+ break;
+ case "drop_directPrediction":
+ controlName = "direct";
+ break;
+ case "check_weightedBFrames":
+ controlName = "weightb";
+ break;
+ case "check_pyrmidalBFrames":
+ controlName = "b-pyramid";
+ break;
+ case "drop_MotionEstimationMethod":
+ controlName = "me";
+ break;
+ case "drop_MotionEstimationRange":
+ controlName = "merange";
+ break;
+ case "drop_subpixelMotionEstimation":
+ controlName = "subq";
+ break;
+ case "drop_analysis":
+ controlName = "analyse";
+ break;
+ case "check_8x8DCT":
+ controlName = "8x8dct";
+ break;
+ case "drop_deblockAlpha":
+ controlName = "deblock";
+ break;
+ case "drop_deblockBeta":
+ controlName = "deblock";
+ break;
+ case "drop_trellis":
+ controlName = "trellis";
+ break;
+ case "check_noFastPSkip":
+ controlName = "no-fast-pskip";
+ break;
+ case "check_noDCTDecimate":
+ controlName = "no-dct-decimate";
+ break;
+ case "check_Cabac":
+ controlName = "cabac";
+ break;
+ case "slider_psyrd":
+ controlName = "psy-rd";
+ break;
+ case "slider_psytrellis":
+ controlName = "psy-rd";
+ break;
+ case "drop_adaptBFrames":
+ controlName = "b-adapt";
+ break;
+ }
+ OnX264WidgetChange(controlName);
+ }
+ private void rtf_x264Query_TextChanged(object sender, EventArgs e)
+ {
+ if (rtf_x264Query.Text.EndsWith("\n"))
+ {
+ string query = rtf_x264Query.Text.Replace("\n", "");
+ Reset2Defaults();
+ rtf_x264Query.Text = query;
+ X264_StandardizeOptString();
+ X264_SetCurrentSettingsInPanel();
+
+ if (rtf_x264Query.Text == string.Empty)
+ Reset2Defaults();
+ }
+ }
+ private void btn_reset_Click(object sender, EventArgs e)
+ {
+ rtf_x264Query.Text = "";
+ Reset2Defaults();
+ }
}
}
\ No newline at end of file diff --git a/win/C#/EncodeQueue/Queue.cs b/win/C#/EncodeQueue/Queue.cs index 664710ec6..da9b78658 100644 --- a/win/C#/EncodeQueue/Queue.cs +++ b/win/C#/EncodeQueue/Queue.cs @@ -158,8 +158,7 @@ namespace Handbrake.EncodeQueue }
catch (Exception)
{
- // Any Errors will be out of diskspace/permissions problems.
- // Don't report them as they'll annoy the user.
+ return;
}
}
diff --git a/win/C#/Functions/PresetLoader.cs b/win/C#/Functions/PresetLoader.cs index c88ff2d59..a6614b99c 100644 --- a/win/C#/Functions/PresetLoader.cs +++ b/win/C#/Functions/PresetLoader.cs @@ -217,7 +217,7 @@ namespace Handbrake.Functions #endregion
#region Other
- mainWindow.x264Panel.x264Query = presetQuery.H264Query;
+ mainWindow.x264Panel.X264Query = presetQuery.H264Query;
// Set the preset name
mainWindow.labelPreset.Text = "Output Settings (Preset: " + name + ")";
diff --git a/win/C#/Functions/QueryGenerator.cs b/win/C#/Functions/QueryGenerator.cs index 03fa22c83..499b11d2e 100644 --- a/win/C#/Functions/QueryGenerator.cs +++ b/win/C#/Functions/QueryGenerator.cs @@ -9,6 +9,7 @@ using System.Windows.Forms; using System.Globalization;
using System.IO;
using System.Collections.Generic;
+using Handbrake.Model;
namespace Handbrake.Functions
{
@@ -400,7 +401,7 @@ namespace Handbrake.Functions string srtDefault = String.Empty;
int srtCount = 0;
- List<Controls.SubtitleInfo> SubList = mainWindow.Subtitles.GetSubtitleInfoList();
+ List<SubtitleInfo> SubList = mainWindow.Subtitles.GetSubtitleInfoList();
foreach (var item in SubList)
{
@@ -524,8 +525,8 @@ namespace Handbrake.Functions #endregion
#region H264 Tab
- if (mainWindow.x264Panel.x264Query != "")
- query += " -x " + mainWindow.x264Panel.x264Query;
+ if (mainWindow.x264Panel.X264Query != "")
+ query += " -x " + mainWindow.x264Panel.X264Query;
#endregion
#region Processors / Other
diff --git a/win/C#/Functions/QueryParser.cs b/win/C#/Functions/QueryParser.cs index 413f8fa4c..216d114ac 100644 --- a/win/C#/Functions/QueryParser.cs +++ b/win/C#/Functions/QueryParser.cs @@ -424,7 +424,7 @@ namespace Handbrake.Functions catch (Exception exc)
{
MessageBox.Show(
- "An error has occured in the Query Parser. Please report this error on the forum in the 'Windows' support section. \n\n" +
+ "An error has occured in the Query Parser.\n\n" +
exc, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs index f716d9274..6da486aa4 100644 --- a/win/C#/frmMain.Designer.cs +++ b/win/C#/frmMain.Designer.cs @@ -100,9 +100,9 @@ namespace Handbrake this.Label47 = new System.Windows.Forms.Label();
this.Label3 = new System.Windows.Forms.Label();
this.tab_audio = new System.Windows.Forms.TabPage();
+ this.AudioSettings = new Handbrake.Controls.AudioPanel();
this.AudioMenuRowHeightHack = new System.Windows.Forms.ImageList(this.components);
this.tab_video = new System.Windows.Forms.TabPage();
- this.lbl_qualityValue = new System.Windows.Forms.Label();
this.radio_cq = new System.Windows.Forms.RadioButton();
this.radio_avgBitrate = new System.Windows.Forms.RadioButton();
this.radio_targetFilesize = new System.Windows.Forms.RadioButton();
@@ -112,13 +112,17 @@ namespace Handbrake this.lbl_SliderValue = new System.Windows.Forms.Label();
this.Label46 = new System.Windows.Forms.Label();
this.tab_picture = new System.Windows.Forms.TabPage();
+ this.PictureSettings = new Handbrake.Controls.PictureSettings();
this.Check_ChapterMarkers = new System.Windows.Forms.CheckBox();
this.tabs_panel = new System.Windows.Forms.TabControl();
this.tab_filters = new System.Windows.Forms.TabPage();
+ this.Filters = new Handbrake.Controls.Filters();
this.tab_subtitles = new System.Windows.Forms.TabPage();
+ this.Subtitles = new Handbrake.Controls.Subtitles();
this.tab_chapters = new System.Windows.Forms.TabPage();
this.label31 = new System.Windows.Forms.Label();
this.tab_advanced = new System.Windows.Forms.TabPage();
+ this.x264Panel = new Handbrake.Controls.x264Panel();
this.tab_query = new System.Windows.Forms.TabPage();
this.btn_clear = new System.Windows.Forms.Button();
this.label34 = new System.Windows.Forms.Label();
@@ -171,11 +175,6 @@ 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.PictureSettings = new Handbrake.Controls.PictureSettings();
- this.Filters = new Handbrake.Controls.Filters();
- this.AudioSettings = new Handbrake.Controls.AudioPanel();
- this.Subtitles = new Handbrake.Controls.Subtitles();
- this.x264Panel = new Handbrake.Controls.x264Panel();
notifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
notifyIconMenu.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).BeginInit();
@@ -807,6 +806,15 @@ namespace Handbrake this.tab_audio.Text = "Audio";
this.tab_audio.UseVisualStyleBackColor = true;
//
+ // AudioSettings
+ //
+ this.AudioSettings.BackColor = System.Drawing.Color.Transparent;
+ this.AudioSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.AudioSettings.Location = new System.Drawing.Point(0, 0);
+ this.AudioSettings.Name = "AudioSettings";
+ this.AudioSettings.Size = new System.Drawing.Size(715, 310);
+ this.AudioSettings.TabIndex = 0;
+ //
// AudioMenuRowHeightHack
//
this.AudioMenuRowHeightHack.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
@@ -816,7 +824,6 @@ namespace Handbrake // tab_video
//
this.tab_video.BackColor = System.Drawing.Color.Transparent;
- this.tab_video.Controls.Add(this.lbl_qualityValue);
this.tab_video.Controls.Add(this.radio_cq);
this.tab_video.Controls.Add(this.radio_avgBitrate);
this.tab_video.Controls.Add(this.radio_targetFilesize);
@@ -840,16 +847,6 @@ namespace Handbrake this.tab_video.Text = "Video";
this.tab_video.UseVisualStyleBackColor = true;
//
- // lbl_qualityValue
- //
- this.lbl_qualityValue.AutoSize = true;
- this.lbl_qualityValue.BackColor = System.Drawing.Color.Transparent;
- this.lbl_qualityValue.Location = new System.Drawing.Point(534, 100);
- this.lbl_qualityValue.Name = "lbl_qualityValue";
- this.lbl_qualityValue.Size = new System.Drawing.Size(24, 13);
- this.lbl_qualityValue.TabIndex = 19;
- this.lbl_qualityValue.Text = "0%";
- //
// radio_cq
//
this.radio_cq.AutoSize = true;
@@ -955,6 +952,17 @@ namespace Handbrake this.tab_picture.Text = "Picture";
this.tab_picture.UseVisualStyleBackColor = true;
//
+ // PictureSettings
+ //
+ this.PictureSettings.BackColor = System.Drawing.Color.Transparent;
+ this.PictureSettings.CurrentlySelectedPreset = null;
+ this.PictureSettings.Enabled = false;
+ this.PictureSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.PictureSettings.Location = new System.Drawing.Point(0, 0);
+ this.PictureSettings.Name = "PictureSettings";
+ this.PictureSettings.Size = new System.Drawing.Size(666, 279);
+ this.PictureSettings.TabIndex = 0;
+ //
// Check_ChapterMarkers
//
this.Check_ChapterMarkers.AutoSize = true;
@@ -994,6 +1002,15 @@ namespace Handbrake this.tab_filters.Text = "Video Filters";
this.tab_filters.UseVisualStyleBackColor = true;
//
+ // Filters
+ //
+ this.Filters.BackColor = System.Drawing.Color.Transparent;
+ this.Filters.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.Filters.Location = new System.Drawing.Point(0, 0);
+ this.Filters.Name = "Filters";
+ this.Filters.Size = new System.Drawing.Size(713, 310);
+ this.Filters.TabIndex = 0;
+ //
// tab_subtitles
//
this.tab_subtitles.Controls.Add(this.Subtitles);
@@ -1005,6 +1022,15 @@ namespace Handbrake this.tab_subtitles.Text = "Subtitles";
this.tab_subtitles.UseVisualStyleBackColor = true;
//
+ // Subtitles
+ //
+ this.Subtitles.BackColor = System.Drawing.Color.Transparent;
+ this.Subtitles.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.Subtitles.Location = new System.Drawing.Point(0, 0);
+ this.Subtitles.Name = "Subtitles";
+ this.Subtitles.Size = new System.Drawing.Size(722, 310);
+ this.Subtitles.TabIndex = 0;
+ //
// tab_chapters
//
this.tab_chapters.BackColor = System.Drawing.Color.Transparent;
@@ -1042,6 +1068,16 @@ namespace Handbrake this.tab_advanced.Text = "Advanced";
this.tab_advanced.UseVisualStyleBackColor = true;
//
+ // x264Panel
+ //
+ this.x264Panel.BackColor = System.Drawing.Color.Transparent;
+ this.x264Panel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.x264Panel.Location = new System.Drawing.Point(0, 0);
+ this.x264Panel.Name = "x264Panel";
+ this.x264Panel.Size = new System.Drawing.Size(720, 306);
+ this.x264Panel.TabIndex = 0;
+ this.x264Panel.X264Query = "";
+ //
// tab_query
//
this.tab_query.Controls.Add(this.btn_clear);
@@ -1609,54 +1645,6 @@ namespace Handbrake //
this.File_ChapterImport.Filter = "CSV Files|*.csv";
//
- // PictureSettings
- //
- this.PictureSettings.BackColor = System.Drawing.Color.Transparent;
- this.PictureSettings.CurrentlySelectedPreset = null;
- this.PictureSettings.Enabled = false;
- this.PictureSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.PictureSettings.Location = new System.Drawing.Point(0, 0);
- this.PictureSettings.Name = "PictureSettings";
- this.PictureSettings.Size = new System.Drawing.Size(666, 279);
- this.PictureSettings.TabIndex = 0;
- //
- // Filters
- //
- this.Filters.BackColor = System.Drawing.Color.Transparent;
- this.Filters.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Filters.Location = new System.Drawing.Point(0, 0);
- this.Filters.Name = "Filters";
- this.Filters.Size = new System.Drawing.Size(713, 310);
- this.Filters.TabIndex = 0;
- //
- // AudioSettings
- //
- this.AudioSettings.BackColor = System.Drawing.Color.Transparent;
- this.AudioSettings.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.AudioSettings.Location = new System.Drawing.Point(0, 0);
- this.AudioSettings.Name = "AudioSettings";
- this.AudioSettings.Size = new System.Drawing.Size(715, 310);
- this.AudioSettings.TabIndex = 0;
- //
- // Subtitles
- //
- this.Subtitles.BackColor = System.Drawing.Color.Transparent;
- this.Subtitles.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.Subtitles.Location = new System.Drawing.Point(0, 0);
- this.Subtitles.Name = "Subtitles";
- this.Subtitles.Size = new System.Drawing.Size(722, 310);
- this.Subtitles.TabIndex = 0;
- //
- // x264Panel
- //
- this.x264Panel.BackColor = System.Drawing.Color.Transparent;
- this.x264Panel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.x264Panel.Location = new System.Drawing.Point(0, 0);
- this.x264Panel.Name = "x264Panel";
- this.x264Panel.Size = new System.Drawing.Size(720, 306);
- this.x264Panel.TabIndex = 0;
- this.x264Panel.x264Query = "";
- //
// frmMain
//
this.AllowDrop = true;
@@ -1858,7 +1846,6 @@ namespace Handbrake private ToolStripMenuItem mnu_resetChapters;
private ToolStripMenuItem pmnu_import;
private ToolStripSeparator toolStripSeparator2;
- internal Label lbl_qualityValue;
internal ComboBox drop_mode;
}
}
\ No newline at end of file diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 4b2ddb7b7..0d1630934 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -111,7 +111,7 @@ namespace Handbrake if (query != null)
{
- x264Panel.reset2Defaults();
+ x264Panel.Reset2Defaults();
QueryParser presetQuery = QueryParser.Parse(query);
PresetLoader.LoadPreset(this, presetQuery, Properties.Settings.Default.defaultPreset, loadPictureSettings);
@@ -597,7 +597,7 @@ namespace Handbrake if (query != null)
{
//Ok, Reset all the H264 widgets before changing the preset
- x264Panel.reset2Defaults();
+ x264Panel.Reset2Defaults();
// Send the query from the file to the Query Parser class
QueryParser presetQuery = QueryParser.Parse(query);
@@ -1262,7 +1262,7 @@ namespace Handbrake check_turbo.CheckState = CheckState.Unchecked;
check_turbo.Enabled = false;
tab_advanced.Enabled = false;
- x264Panel.x264Query = "";
+ x264Panel.X264Query = "";
check_iPodAtom.Enabled = false;
check_iPodAtom.Checked = false;
}
@@ -1387,27 +1387,15 @@ namespace Handbrake switch (drp_videoEncoder.Text)
{
case "MPEG-4 (FFmpeg)":
- double rfValue = 31 - (slider_videoQuality.Value - 1);
- double max = slider_videoQuality.Maximum;
- double min = slider_videoQuality.Minimum;
- double val = ((max - min) - (rfValue - min)) / (max - min);
lbl_SliderValue.Text = "QP:" + (32 - slider_videoQuality.Value);
- lbl_qualityValue.Text = Math.Round((val * 100), 2).ToString(new CultureInfo("en-US")) + "%";
break;
case "H.264 (x264)":
- rfValue = 51.0 - slider_videoQuality.Value * cqStep;
- max = slider_videoQuality.Maximum * cqStep;
- min = slider_videoQuality.Minimum;
- val = ((max - min) - (rfValue - min)) / (max - min);
+ double rfValue = 51.0 - slider_videoQuality.Value * cqStep;
rfValue = Math.Round(rfValue, 2);
lbl_SliderValue.Text = "RF:" + rfValue.ToString(new CultureInfo("en-US"));
- lbl_qualityValue.Text = Math.Round((val * 100), 2).ToString(new CultureInfo("en-US")) + "%";
break;
case "VP3 (Theora)":
- rfValue = slider_videoQuality.Value;
- double value = rfValue / 63;
lbl_SliderValue.Text = "QP:" + slider_videoQuality.Value;
- lbl_qualityValue.Text = Math.Round((value * 100), 2).ToString(new CultureInfo("en-US")) + "%";
break;
}
}
@@ -1679,7 +1667,7 @@ namespace Handbrake if (query != null)
{
//Ok, Reset all the H264 widgets before changing the preset
- x264Panel.reset2Defaults();
+ x264Panel.Reset2Defaults();
// Send the query from the file to the Query Parser class
QueryParser presetQuery = QueryParser.Parse(query);
|