diff options
author | sr55 <[email protected]> | 2010-07-15 20:15:08 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2010-07-15 20:15:08 +0000 |
commit | 6c9b4d2c4cf5928bb2b472beca76c2edc4c41f03 (patch) | |
tree | 85ba020472dfb475f4db0424ed139da20fa6b64e /win/C#/Program.cs | |
parent | 5c8cab7ea3c07e36b74bcb8c8198f8ef796e1530 (diff) |
WinGui:
- Multiple instance support.
Each instance has a unique id. id = 0 will use the standard log/queue files.
id = 1,2...n will use standard file names but with the instance id added to the end.
This means that each instance will have it's own queue. Queue is not shared between Instances
If multiple queue files are found when starting up, it will offer to load them all in.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3440 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Program.cs')
-rw-r--r-- | win/C#/Program.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/win/C#/Program.cs b/win/C#/Program.cs index 6480b50b1..f54a775f9 100644 --- a/win/C#/Program.cs +++ b/win/C#/Program.cs @@ -6,6 +6,7 @@ namespace Handbrake
{
using System;
+ using System.Diagnostics;
using System.IO;
using System.Windows.Forms;
@@ -26,6 +27,8 @@ namespace Handbrake [STAThread]
public static void Main(string[] args)
{
+ InstanceId = Process.GetProcessesByName("HandBrake").Length;
+
// Handle any unhandled exceptions
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
@@ -88,7 +91,7 @@ namespace Handbrake /// </summary>
private static void InitializeApplicationServices()
{
- Init.SetupSettings(Settings.Default.CompletionOption, Settings.Default.noDvdNav,
+ Init.SetupSettings(InstanceId, Settings.Default.CompletionOption, Settings.Default.noDvdNav,
Settings.Default.growlEncode, Settings.Default.growlQueue,
Settings.Default.processPriority, Settings.Default.saveLogPath, Settings.Default.saveLogToSpecifiedPath,
Settings.Default.saveLogWithVideo, Settings.Default.showCliForInGuiEncodeStatus, Settings.Default.preventSleep);
@@ -116,5 +119,10 @@ namespace Handbrake MessageBoxIcon.Error);
}
}
+
+
+ public static int InstanceId = 0;
+
+
}
}
\ No newline at end of file |