From 10aed84471d4e0bacd1adb6842f1b921fbb36b73 Mon Sep 17 00:00:00 2001 From: sr55 Date: Wed, 19 Jan 2011 20:08:32 +0000 Subject: [PATCH] WinGui: - Set culture on drc string -> double conversion. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3757 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/Controls/AudioPanel.cs | 4 +++- win/C#/Controls/AudioPanel.resx | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/win/C#/Controls/AudioPanel.cs b/win/C#/Controls/AudioPanel.cs index 7226ed1de..3f4808e6a 100644 --- a/win/C#/Controls/AudioPanel.cs +++ b/win/C#/Controls/AudioPanel.cs @@ -7,6 +7,7 @@ namespace Handbrake.Controls { using System; using System.Collections; + using System.Globalization; using System.Linq; using System.Windows.Forms; using Functions; @@ -22,6 +23,7 @@ namespace Handbrake.Controls /// public partial class AudioPanel : UserControl { + private static readonly CultureInfo Culture = new CultureInfo("en-US", false); private const string AC3Passthru = "AC3 Passthru"; @@ -349,7 +351,7 @@ namespace Handbrake.Controls 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); + int.TryParse(drcValue.ToString(Culture), out drcCalculated); tb_drc.Value = drcCalculated; lbl_drc.Text = audioList.SelectedRows[0].Cells[6].Value.ToString(); diff --git a/win/C#/Controls/AudioPanel.resx b/win/C#/Controls/AudioPanel.resx index 1a227342d..ac50d9273 100644 --- a/win/C#/Controls/AudioPanel.resx +++ b/win/C#/Controls/AudioPanel.resx @@ -112,36 +112,36 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + 216, 16 - + 35, 17 - + True - + True - + True - + True - + True - + True - + True \ No newline at end of file -- 2.40.0