/// </summary>\r
public int MinScanDuration { get; set; }\r
\r
- /// <summary>\r
- /// Gets or sets the process priority.\r
- /// </summary>\r
- public string ProcessPriority { get; set; }\r
-\r
/// <summary>\r
/// Gets or sets a value indicating whether save log to copy directory.\r
/// </summary>\r
PreviewScanCount = UserSettingService.GetUserSetting<int>(UserSettingConstants.PreviewScanCount), \r
Verbosity = UserSettingService.GetUserSetting<int>(UserSettingConstants.Verbosity), \r
MinScanDuration = UserSettingService.GetUserSetting<int>(UserSettingConstants.MinScanDuration), \r
- ProcessPriority = UserSettingService.GetUserSetting<string>(UserSettingConstants.ProcessPriority), \r
SaveLogToCopyDirectory = UserSettingService.GetUserSetting<bool>(UserSettingConstants.SaveLogToCopyDirectory), \r
SaveLogWithVideo = UserSettingService.GetUserSetting<bool>(UserSettingConstants.SaveLogWithVideo), \r
SaveLogCopyDirectory = UserSettingService.GetUserSetting<string>(UserSettingConstants.SaveLogCopyDirectory), \r
// Fire the Encode Started Event
this.InvokeEncodeStarted(System.EventArgs.Empty);
-
- // Set the Process Priority
- switch (configuration.ProcessPriority)
- {
- case "Realtime":
- Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.RealTime;
- break;
- case "High":
- Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.High;
- break;
- case "Above Normal":
- Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.AboveNormal;
- break;
- case "Normal":
- Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.Normal;
- break;
- case "Low":
- Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.Idle;
- break;
- default:
- Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.BelowNormal;
- break;
- }
}
catch (Exception exc)
{
this.Presets = this.presetService.Presets;\r
this.Drives = new BindingList<SourceMenuItem>();\r
\r
+ // Set Process Priority\r
+ switch (this.userSettingService.GetUserSetting<string>(UserSettingConstants.ProcessPriority))\r
+ {\r
+ case "Realtime":\r
+ Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.RealTime;\r
+ break;\r
+ case "High":\r
+ Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.High;\r
+ break;\r
+ case "Above Normal":\r
+ Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.AboveNormal;\r
+ break;\r
+ case "Normal":\r
+ Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.Normal;\r
+ break;\r
+ case "Low":\r
+ Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.Idle;\r
+ break;\r
+ default:\r
+ Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.BelowNormal;\r
+ break;\r
+ }\r
+\r
HandBrakeInstanceManager.Init();\r
}\r
\r
set\r
{\r
this.selectedPriority = value;\r
- this.NotifyOfPropertyChange("SelectedPriority");\r
+ this.NotifyOfPropertyChange();\r
+\r
+ // Set the Process Priority\r
+ switch (value)\r
+ {\r
+ case "Realtime":\r
+ Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.RealTime;\r
+ break;\r
+ case "High":\r
+ Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.High;\r
+ break;\r
+ case "Above Normal":\r
+ Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.AboveNormal;\r
+ break;\r
+ case "Normal":\r
+ Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.Normal;\r
+ break;\r
+ case "Low":\r
+ Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.Idle;\r
+ break;\r
+ default:\r
+ Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.BelowNormal;\r
+ break;\r
+ }\r
}\r
}\r
#endregion\r