SIL.FieldWorks.FieldWorks.IsInSingleFWProccessMode C# (CSharp) Méthode

IsInSingleFWProccessMode() private static méthode

Determines whether any FW process is in "single user mode".
private static IsInSingleFWProccessMode ( ) : bool
Résultat 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