summaryrefslogtreecommitdiffstats
path: root/win/C#/Controls
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-07-22 18:20:19 +0000
committersr55 <[email protected]>2010-07-22 18:20:19 +0000
commita7a9e89446f318ae286a7cf45182b3f1dee978a6 (patch)
tree017e2548bba5315d7e32d86fe728b20f2761fb21 /win/C#/Controls
parent925dfe6a2292889fd623d4092747ad798b5d1606 (diff)
Reverting 3452
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3454 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Controls')
-rw-r--r--win/C#/Controls/Filters.cs39
-rw-r--r--win/C#/Controls/PictureSettings.cs16
-rw-r--r--win/C#/Controls/Subtitles.cs33
-rw-r--r--win/C#/Controls/x264Panel.cs10
4 files changed, 39 insertions, 59 deletions
diff --git a/win/C#/Controls/Filters.cs b/win/C#/Controls/Filters.cs
index 1ee72d6c9..9f75f69d3 100644
--- a/win/C#/Controls/Filters.cs
+++ b/win/C#/Controls/Filters.cs
@@ -8,12 +8,14 @@ namespace Handbrake.Controls
using System;
using System.Windows.Forms;
- /// <summary>
- /// The Filters Panel
- /// </summary>
public partial class Filters : UserControl
{
/// <summary>
+ /// The Filter settings have changed
+ /// </summary>
+ public event EventHandler FilterSettingsChanged;
+
+ /// <summary>
/// Initializes a new instance of the <see cref="Filters"/> class.
/// Creates a new instance of Filters
/// </summary>
@@ -27,11 +29,6 @@ namespace Handbrake.Controls
}
/// <summary>
- /// The Filter settings have changed
- /// </summary>
- public event EventHandler FilterSettingsChanged;
-
- /// <summary>
/// Gets the CLI query for the query generator.
/// </summary>
public string GetCliQuery
@@ -263,12 +260,6 @@ namespace Handbrake.Controls
}
// Controls
-
- /// <summary>
- /// Delecine Selected Index Changed
- /// </summary>
- /// <param name="sender">The Sender</param>
- /// <param name="e">The EventArgs</param>
private void DropDetelecineSelectedIndexChanged(object sender, EventArgs e)
{
text_customDT.Visible = drop_detelecine.Text == "Custom";
@@ -277,11 +268,6 @@ namespace Handbrake.Controls
this.FilterSettingsChanged(this, new EventArgs());
}
- /// <summary>
- /// Decomb Selected Index Changed
- /// </summary>
- /// <param name="sender">The Sender</param>
- /// <param name="e">The EventArgs</param>
private void DropDecombSelectedIndexChanged(object sender, EventArgs e)
{
text_customDC.Visible = drop_decomb.Text == "Custom";
@@ -293,11 +279,6 @@ namespace Handbrake.Controls
this.FilterSettingsChanged(this, new EventArgs());
}
- /// <summary>
- /// DeInterlace Selected Index Changed
- /// </summary>
- /// <param name="sender">The Sender</param>
- /// <param name="e">The EventArgs</param>
private void DropDeinterlaceSelectedIndexChanged(object sender, EventArgs e)
{
text_customDI.Visible = drop_deinterlace.Text == "Custom";
@@ -309,11 +290,6 @@ namespace Handbrake.Controls
this.FilterSettingsChanged(this, new EventArgs());
}
- /// <summary>
- /// DeNoise Selected Index Changed
- /// </summary>
- /// <param name="sender">The Sender</param>
- /// <param name="e">The EventArgs</param>
private void DropDenoiseSelectedIndexChanged(object sender, EventArgs e)
{
text_customDN.Visible = drop_denoise.Text == "Custom";
@@ -323,11 +299,6 @@ namespace Handbrake.Controls
this.FilterSettingsChanged(this, new EventArgs());
}
- /// <summary>
- /// Deblock Changed
- /// </summary>
- /// <param name="sender">The Sender</param>
- /// <param name="e">The EventArgs</param>
private void SliderDeblockScroll(object sender, EventArgs e)
{
lbl_deblockVal.Text = slider_deblock.Value == 4 ? "Off" : slider_deblock.Value.ToString();
diff --git a/win/C#/Controls/PictureSettings.cs b/win/C#/Controls/PictureSettings.cs
index 534cc0fd5..e0319a690 100644
--- a/win/C#/Controls/PictureSettings.cs
+++ b/win/C#/Controls/PictureSettings.cs
@@ -7,6 +7,7 @@ namespace Handbrake.Controls
{
using System;
using System.Drawing;
+ using System.Globalization;
using System.Windows.Forms;
using HandBrake.ApplicationServices.Parsing;
@@ -18,6 +19,7 @@ namespace Handbrake.Controls
/// </summary>
public partial class PictureSettings : UserControl
{
+ private readonly CultureInfo culture = new CultureInfo("en-US", false);
private bool preventChangingWidth;
private bool preventChangingHeight;
private bool preventChangingCustom;
@@ -150,6 +152,9 @@ namespace Handbrake.Controls
// Picture Controls
private void TextWidthValueChanged(object sender, EventArgs e)
{
+ if (Properties.Settings.Default.disableResCalc)
+ return;
+
if (preventChangingWidth)
return;
@@ -209,6 +214,9 @@ namespace Handbrake.Controls
private void TextHeightValueChanged(object sender, EventArgs e)
{
+ if (Properties.Settings.Default.disableResCalc)
+ return;
+
if (preventChangingHeight)
return;
@@ -269,6 +277,9 @@ namespace Handbrake.Controls
private void CheckKeepArCheckedChanged(object sender, EventArgs e)
{
+ if (Properties.Settings.Default.disableResCalc)
+ return;
+
// Force TextWidth to recalc height
if (check_KeepAR.Checked)
TextWidthValueChanged(this, new EventArgs());
@@ -287,6 +298,9 @@ namespace Handbrake.Controls
private void UpdownDisplayWidthValueChanged(object sender, EventArgs e)
{
+ if (Properties.Settings.Default.disableResCalc)
+ return;
+
if (preventChangingDisplayWidth == false && check_KeepAR.CheckState == CheckState.Unchecked)
{
preventChangingCustom = true;
@@ -312,7 +326,7 @@ namespace Handbrake.Controls
// Update value
preventChangingHeight = true;
- text_height.Value = modulusHeight;
+ text_height.Value = (decimal)modulusHeight;
updownParWidth.Value = updownDisplayWidth.Value;
updownParHeight.Value = text_width.Value;
preventChangingHeight = false;
diff --git a/win/C#/Controls/Subtitles.cs b/win/C#/Controls/Subtitles.cs
index 8baf18eae..e923598e7 100644
--- a/win/C#/Controls/Subtitles.cs
+++ b/win/C#/Controls/Subtitles.cs
@@ -195,7 +195,7 @@ namespace Handbrake.Controls
srtFile = drp_subtitleTracks.SelectedItem.ToString();
srtLangVal = srt_lang.SelectedItem.ToString();
srtCode = srt_charcode.SelectedItem.ToString();
- srtOffsetMs = (int)srt_offset.Value;
+ srtOffsetMs = (int) srt_offset.Value;
if (defaultSub == "Yes") SetNoSrtDefault();
}
else
@@ -210,14 +210,14 @@ namespace Handbrake.Controls
SubtitleInfo track = new SubtitleInfo
{
- Track = trackName,
- Forced = forcedVal,
- Burned = burnedVal,
- Default = defaultSub,
- SrtLang = srtLangVal,
- SrtCharCode = srtCode,
- SrtOffset = srtOffsetMs,
- SrtPath = srtPath,
+ Track = trackName,
+ Forced = forcedVal,
+ Burned = burnedVal,
+ Default = defaultSub,
+ SrtLang = srtLangVal,
+ SrtCharCode = srtCode,
+ SrtOffset = srtOffsetMs,
+ SrtPath = srtPath,
SrtFileName = srtFile
};
@@ -286,7 +286,7 @@ namespace Handbrake.Controls
int c = 0;
if (lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[0].Text.ToLower().Contains(".srt"))
- // We have an SRT
+ // We have an SRT
{
foreach (var item in drp_subtitleTracks.Items)
{
@@ -388,7 +388,7 @@ namespace Handbrake.Controls
lv_subList.Select();
subList[lv_subList.SelectedIndices[0]].Forced = check_forced.Checked ? "Yes" : "No";
- // Update SubList List<SubtitleInfo>
+ // Update SubList List<SubtitleInfo>
}
/// <summary>
@@ -411,7 +411,7 @@ namespace Handbrake.Controls
lv_subList.Select();
subList[lv_subList.SelectedIndices[0]].Burned = check_burned.Checked ? "Yes" : "No";
- // Update SubList List<SubtitleInfo>
+ // Update SubList List<SubtitleInfo>
}
/// <summary>
@@ -437,7 +437,7 @@ namespace Handbrake.Controls
lv_subList.Select();
subList[lv_subList.SelectedIndices[0]].Default = check_default.Checked ? "Yes" : "No";
- // Update SubList List<SubtitleInfo>
+ // Update SubList List<SubtitleInfo>
}
/// <summary>
@@ -458,7 +458,8 @@ namespace Handbrake.Controls
lv_subList.Items[lv_subList.SelectedIndices[0]].SubItems[6].Text = srt_offset.Value.ToString();
lv_subList.Select();
- subList[lv_subList.SelectedIndices[0]].SrtOffset = (int)srt_offset.Value;
+ subList[lv_subList.SelectedIndices[0]].SrtOffset = (int) srt_offset.Value;
+ // Update SubList List<SubtitleInfo>
}
/// <summary>
@@ -478,7 +479,7 @@ namespace Handbrake.Controls
lv_subList.Select();
subList[lv_subList.SelectedIndices[0]].SrtCharCode = srt_charcode.SelectedItem.ToString();
- // Update SubList List<SubtitleInfo>
+ // Update SubList List<SubtitleInfo>
}
/// <summary>
@@ -498,7 +499,7 @@ namespace Handbrake.Controls
lv_subList.Select();
subList[lv_subList.SelectedIndices[0]].SrtLang = srt_lang.SelectedItem.ToString();
- // Update SubList List<SubtitleInfo>
+ // Update SubList List<SubtitleInfo>
}
/* Right Click Menu */
diff --git a/win/C#/Controls/x264Panel.cs b/win/C#/Controls/x264Panel.cs
index f63214b23..8d223f6ab 100644
--- a/win/C#/Controls/x264Panel.cs
+++ b/win/C#/Controls/x264Panel.cs
@@ -8,9 +8,6 @@ namespace Handbrake.Controls
using System;
using System.Windows.Forms;
- /// <summary>
- /// The Advanced Panel
- /// </summary>
public partial class x264Panel : UserControl
{
/*
@@ -41,10 +38,7 @@ namespace Handbrake.Controls
{
return rtf_x264Query.Text;
}
- set
- {
- rtf_x264Query.Text = value;
- }
+ set { rtf_x264Query.Text = value; }
}
/// <summary>
@@ -1005,7 +999,7 @@ namespace Handbrake.Controls
private void widgetControlChanged(object sender, EventArgs e)
{
- Control changedControlName = (Control)sender;
+ Control changedControlName = (Control) sender;
string controlName = string.Empty;
switch (changedControlName.Name.Trim())