From 6c9b4d2c4cf5928bb2b472beca76c2edc4c41f03 Mon Sep 17 00:00:00 2001 From: sr55 Date: Thu, 15 Jul 2010 20:15:08 +0000 Subject: 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 --- win/C#/Program.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'win/C#/Program.cs') 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 /// 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 -- cgit v1.2.3