private static bool IsInSingleFWProccessMode()
{
return RunOnRemoteClients(kFwRemoteRequest, requestor =>
{
Func<bool> invoker = requestor.InSingleProcessMode;
IAsyncResult ar = invoker.BeginInvoke(null, null);
while (!ar.IsCompleted)
{
if (!ar.AsyncWaitHandle.WaitOne(9000, false))
return false; // Just continue on
}
// We can now ask for the answer.
if (invoker.EndInvoke(ar))
{
requestor.BringMainFormToFront();
return true; // Should kill this process
}
return false; // Need to check the other FW processes
});
}