/// </summary>\r
private readonly IUserSettingService UserSettingService = ServiceManager.UserSettingService;\r
\r
- private CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US");\r
-\r
/// <summary>\r
/// Initializes a new instance of the <see cref="x264Panel"/> class. \r
/// Initializes a new instance of the x264 panel user control\r
else\r
{\r
double value = slider_adaptiveQuantStrength.Value * 0.1;\r
- string aqs = value.ToString("f1", culture);\r
+ string aqs = value.ToString("f1", CultureInfo.InvariantCulture);\r
thisOpt = "aq-strength=" + aqs;\r
}\r
}\r
double psyrd = slider_psyrd.Value * 0.1;\r
double psytre = slider_psytrellis.Value * 0.05;\r
\r
- string rd = psyrd.ToString("f2", culture);\r
- string rt = psytre.ToString("f2", culture);\r
+ string rd = psyrd.ToString("f2", CultureInfo.InvariantCulture);\r
+ string rt = psytre.ToString("f2", CultureInfo.InvariantCulture);\r
\r
thisOpt = "psy-rd=" + rd + "," + rt;\r
}\r
else\r
{\r
double value = slider_adaptiveQuantStrength.Value * 0.1;\r
- string aqs = value.ToString("f1", culture);\r
+ string aqs = value.ToString("f1", CultureInfo.InvariantCulture);\r
query += colon + "aq-strength=" + aqs;\r
}\r
}\r
double psyrd = slider_psyrd.Value * 0.1;\r
double psytre = slider_psytrellis.Value * 0.05;\r
\r
- string rd = psyrd.ToString("f1", culture);\r
- string rt = psytre.ToString("f2", culture);\r
+ string rd = psyrd.ToString("f1", CultureInfo.InvariantCulture);\r
+ string rt = psytre.ToString("f2", CultureInfo.InvariantCulture);\r
\r
query += colon + "psy-rd=" + rd + "," + rt;\r
}\r
case "MPEG-4 (FFmpeg)":\r
case "MPEG-2 (FFmpeg)":\r
value = 31 - (mainWindow.slider_videoQuality.Value - 1);\r
- query += " -q " + value.ToString(new CultureInfo("en-US"));\r
+ query += " -q " + value.ToString(CultureInfo.InvariantCulture);\r
break;\r
case "H.264 (x264)":\r
- CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US");\r
value = 51 - (mainWindow.slider_videoQuality.Value * cqStep);\r
value = Math.Round(value, 2);\r
- query += " -q " + value.ToString(culture);\r
+ query += " -q " + value.ToString(CultureInfo.InvariantCulture);\r
break;\r
case "VP3 (Theora)":\r
value = mainWindow.slider_videoQuality.Value;\r
- query += " -q " + value.ToString(new CultureInfo("en-US"));\r
+ query += " -q " + value.ToString(CultureInfo.InvariantCulture);\r
break;\r
}\r
}\r
/// </summary>\r
public class Title\r
{\r
- /// <summary>\r
- /// The Culture Info\r
- /// </summary>\r
- private static readonly CultureInfo Culture = new CultureInfo("en-US", false);\r
-\r
/// <summary>\r
/// The User Setting Service\r
/// </summary>\r
{\r
thisTitle.Resolution = new Size(int.Parse(m.Groups[1].Value), int.Parse(m.Groups[2].Value));\r
thisTitle.ParVal = new Size(int.Parse(m.Groups[3].Value), int.Parse(m.Groups[4].Value));\r
- thisTitle.AspectRatio = float.Parse(m.Groups[5].Value, Culture);\r
- thisTitle.Fps = float.Parse(m.Groups[6].Value, Culture);\r
+ thisTitle.AspectRatio = float.Parse(m.Groups[5].Value, CultureInfo.InvariantCulture);\r
+ thisTitle.Fps = float.Parse(m.Groups[6].Value, CultureInfo.InvariantCulture);\r
}\r
\r
// Get autocrop region for this title\r
{\r
case VideoEncoder.FFMpeg:\r
value = 31 - (task.Quality.Value - 1);\r
- query += string.Format(" -q {0}", value.ToString(new CultureInfo("en-US")));\r
+ query += string.Format(" -q {0}", value.ToString(CultureInfo.InvariantCulture));\r
break;\r
case VideoEncoder.X264:\r
- CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US");\r
value = 51 - (task.Quality.Value * x264CqStep);\r
value = Math.Round(value, 2);\r
- query += string.Format(" -q {0}", value.ToString(culture));\r
+ query += string.Format(" -q {0}", value.ToString(CultureInfo.InvariantCulture));\r
break;\r
case VideoEncoder.Theora:\r
value = task.Quality.Value;\r
- query += string.Format(" -q {0}", value.ToString(new CultureInfo("en-US")));\r
+ query += string.Format(" -q {0}", value.ToString(CultureInfo.InvariantCulture));\r
break;\r
}\r
break;\r
{\r
using System;\r
using System.Collections.Generic;\r
- using System.Globalization;\r
\r
- using HandBrake.Interop;\r
using HandBrake.Interop.Model;\r
\r
/// <summary>\r
/// </summary>\r
public class Title\r
{\r
- private static readonly CultureInfo Culture = new CultureInfo("en-US", false);\r
private readonly List<AudioTrack> audioTracks;\r
private readonly List<Chapter> chapters;\r
private readonly List<Subtitle> subtitles;\r
this.ConstantQualityGranularity.Add("0.50");\r
this.ConstantQualityGranularity.Add("0.25");\r
this.ConstantQualityGranularity.Add("0.20");\r
- this.selectedGranulairty = userSettingService.GetUserSetting<double>(ASUserSettingConstants.X264Step).ToString("0.00", new CultureInfo("en-US"));\r
+ this.selectedGranulairty = userSettingService.GetUserSetting<double>(ASUserSettingConstants.X264Step).ToString("0.00", CultureInfo.InvariantCulture);\r
\r
// Min Title Length\r
this.minLength = this.userSettingService.GetUserSetting<int>(ASUserSettingConstants.MinScanDuration);\r
/// </summary>\r
public partial class AdvancedAudio : Form\r
{\r
- // Culture Info\r
- private static readonly CultureInfo Culture = new CultureInfo("en-US", false);\r
-\r
/// <summary>\r
/// Initializes a new instance of the <see cref="AdvancedAudio"/> class. \r
/// </summary>\r
int drcCalculated;\r
if (track.DRC != 0)\r
drcValue = ((track.DRC * 10) + 1) - 10;\r
- int.TryParse(drcValue.ToString(Culture), out drcCalculated);\r
+ int.TryParse(drcValue.ToString(CultureInfo.InvariantCulture), out drcCalculated);\r
tb_drc.Value = drcCalculated;\r
- lbl_drc.Text = track.DRC.ToString(Culture);\r
+ lbl_drc.Text = track.DRC.ToString(CultureInfo.InvariantCulture);\r
tb_drc.Enabled = track.TrackDisplay.Contains("(AC3)");\r
\r
// Se the Track Name\r
int drcCalculated;\r
if (track.DRC != 0)\r
drcValue = ((track.DRC * 10) + 1) - 10;\r
- int.TryParse(drcValue.ToString(Culture), out drcCalculated);\r
+ int.TryParse(drcValue.ToString(CultureInfo.InvariantCulture), out drcCalculated);\r
tb_drc.Value = drcCalculated;\r
\r
// Set the model.\r
else\r
value = ((tb_drc.Value - 1) / 10.0) + 1;\r
\r
- lbl_drc.Text = value.ToString(Culture);\r
+ lbl_drc.Text = value.ToString(CultureInfo.InvariantCulture);\r
track.DRC = value;\r
}\r
\r
case "H.264 (x264)":\r
double rfValue = 51.0 - slider_videoQuality.Value * cqStep;\r
rfValue = Math.Round(rfValue, 2);\r
- lbl_SliderValue.Text = "RF:" + rfValue.ToString(new CultureInfo("en-US"));\r
+ lbl_SliderValue.Text = "RF:" + rfValue.ToString(CultureInfo.InvariantCulture);\r
\r
if (rfValue == 0)\r
{\r
drop_previewScanCount.SelectedItem = this.userSettingService.GetUserSetting<int>(UserSettingConstants.PreviewScanCount).ToString();\r
\r
// x264 step\r
- string step = userSettingService.GetUserSetting<double>(ASUserSettingConstants.X264Step).ToString(new CultureInfo("en-US"));\r
+ string step = userSettingService.GetUserSetting<double>(ASUserSettingConstants.X264Step).ToString(CultureInfo.InvariantCulture);\r
switch (step)\r
{\r
case "1":\r