SIL.FieldWorks.FieldWorks.IsInSingleFWProccessMode C# (CSharp) Метод

IsInSingleFWProccessMode() приватный статический Метод

Determines whether any FW process is in "single user mode".
private static IsInSingleFWProccessMode ( ) : bool
Результат bool
		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
			});
		}
FieldWorks