diff options
author | sr55 <[email protected]> | 2011-04-03 17:49:44 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2011-04-03 17:49:44 +0000 |
commit | a6fbb52b6c9f4b639101e6e4d37e670ca2840c84 (patch) | |
tree | 5bf6b9a4d945365ba07dd07ba77fd05019d0e086 /win/CS/HandBrake.ApplicationServices/Utilities | |
parent | 80ebbf6f36a9084dd19e04e1cbfbd9ec93bfb6b6 (diff) |
WinGui:
- Move all user settings for the Services library into the services library.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3899 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Utilities')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs | 24 | ||||
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs | 2 |
2 files changed, 24 insertions, 2 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs b/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs index 3f56213e8..e267e45f4 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/GeneralUtilities.cs @@ -109,7 +109,7 @@ namespace HandBrake.ApplicationServices.Utilities {
StringBuilder logHeader = new StringBuilder();
- logHeader.AppendLine(String.Format("{0}", Init.HandBrakeGuiVersionString));
+ logHeader.AppendLine(String.Format("HandBrake {0} {1}", Properties.Settings.Default.HandBrakeVersion, Properties.Settings.Default.HandBrakeBuild));
logHeader.AppendLine(String.Format("OS: {0}", Environment.OSVersion));
logHeader.AppendLine(String.Format("CPU: {0}", SystemInfo.GetCpuCount));
logHeader.Append(String.Format("Ram: {0} MB, ", SystemInfo.TotalPhysicalMemory));
@@ -140,5 +140,27 @@ namespace HandBrake.ApplicationServices.Utilities return string.Format("[{0}] {1}", DateTime.Now.TimeOfDay, message);
}
+ /// <summary>
+ /// Gets a value indicating whether HandBrake is running in multi instance mode
+ /// </summary>
+ /// <returns>True if the UI has another instance running</returns>
+ public static bool IsMultiInstance
+ {
+ get
+ {
+ return Process.GetProcessesByName("HandBrake").Length > 0 ? true : false;
+ }
+ }
+
+ /// <summary>
+ /// Gets the number of HandBrake instances running.
+ /// </summary>
+ public static string GetInstanceCount
+ {
+ get
+ {
+ return Process.GetProcessesByName("HandBrake").Length == 0 ? string.Empty : Process.GetProcessesByName("HandBrake").Length.ToString();
+ }
+ }
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs index 4aed1799f..0a8aa72ec 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/PlistUtility.cs @@ -516,7 +516,7 @@ namespace HandBrake.ApplicationServices.Utilities AddEncodeElement(xmlWriter, "PictureWidth", "integer", parsed.Width.ToString());
// Preset Information
- AddEncodeElement(xmlWriter, "PresetBuildNumber", "string", Init.Build.ToString());
+ AddEncodeElement(xmlWriter, "PresetBuildNumber", "string", Properties.Settings.Default.HandBrakeBuild.ToString());
AddEncodeElement(xmlWriter, "PresetDescription", "string", "No Description");
AddEncodeElement(xmlWriter, "PresetName", "string", preset.Name);
AddEncodeElement(xmlWriter, "Type", "integer", "1"); // 1 is user preset, 0 is built in
|