}\r
set\r
{\r
- this.qualityMax = value;\r
- this.NotifyOfPropertyChange(() => this.QualityMax);\r
+ if (!qualityMax.Equals(value))\r
+ {\r
+ this.qualityMax = value;\r
+ this.NotifyOfPropertyChange(() => this.QualityMax);\r
+ }\r
}\r
}\r
\r
}\r
set\r
{\r
- this.qualityMin = value;\r
- this.NotifyOfPropertyChange(() => this.QualityMin);\r
+ if (!qualityMin.Equals(value))\r
+ {\r
+ this.qualityMin = value;\r
+ this.NotifyOfPropertyChange(() => this.QualityMin);\r
+ }\r
}\r
}\r
\r
this.rf = value;\r
\r
double cqStep = userSettingService.GetUserSetting<double>(ASUserSettingConstants.X264Step);\r
+ this.SetQualitySliderBounds(); \r
switch (this.SelectedVideoEncoder)\r
{\r
case VideoEncoder.FFMpeg:\r
IAdvancedViewModel advancedViewModel = IoC.Get<IAdvancedViewModel>();\r
advancedViewModel.SetEncoder(this.Task.VideoEncoder);\r
\r
- // Update the Quality Slider\r
- switch (this.SelectedVideoEncoder)\r
- {\r
- case VideoEncoder.FFMpeg:\r
- case VideoEncoder.FFMpeg2:\r
- this.QualityMin = 1;\r
- this.QualityMax = 31;\r
- break;\r
- case VideoEncoder.X264:\r
- this.QualityMin = 0;\r
- this.QualityMax = (int)(51 / userSettingService.GetUserSetting<double>(ASUserSettingConstants.X264Step));\r
- break;\r
- case VideoEncoder.Theora:\r
- this.QualityMin = 0;\r
- this.QualityMax = 63;\r
- break;\r
- }\r
+ // Update the Quality Slider. Make sure the bounds are up to date with the users settings.\r
+ this.SetQualitySliderBounds();\r
}\r
}\r
\r
\r
double cqStep = userSettingService.GetUserSetting<double>(ASUserSettingConstants.X264Step);\r
double rfValue = 0;\r
+ this.SetQualitySliderBounds();\r
switch (this.SelectedVideoEncoder)\r
{\r
case VideoEncoder.FFMpeg:\r
\r
#endregion\r
\r
+ /// <summary>\r
+ /// Set the bounds of the Constant Quality Slider\r
+ /// </summary>\r
+ private void SetQualitySliderBounds()\r
+ {\r
+ // Note Updating bounds to the same values won't trigger an update.\r
+ // The properties are smart enough to not take in equal values.\r
+ switch (this.SelectedVideoEncoder)\r
+ {\r
+ case VideoEncoder.FFMpeg:\r
+ case VideoEncoder.FFMpeg2:\r
+ this.QualityMin = 1;\r
+ this.QualityMax = 31;\r
+ break;\r
+ case VideoEncoder.X264:\r
+ this.QualityMin = 0;\r
+ this.QualityMax = (int)(51 / userSettingService.GetUserSetting<double>(ASUserSettingConstants.X264Step));\r
+ break;\r
+ case VideoEncoder.Theora:\r
+ this.QualityMin = 0;\r
+ this.QualityMax = 63;\r
+ break;\r
+ }\r
+ }\r
+\r
#region Advanced\r
///// <summary>\r
///// Gets or sets State.\r