internal static void SetAccSelection(System.IntPtr accSelection, int vmId, string controlValue)
        {
            int num = 0;

            if (!accSelection.Equals((System.IntPtr)System.IntPtr.Zero) && int.TryParse(controlValue, out num))
            {
                try
                {
                    if (num <= 0)
                    {
                        throw new System.ArgumentException("Incorrect Control Value");
                    }
                    JavaAccNativeMethods.addAccessibleSelectionFromContext(vmId, accSelection, (int)(num - 1));
                }
                catch (System.Exception exception)
                {
                    if (!IsJavaAccException(exception) || !IsJavaAccExceptionMaskable(exception))
                    {
                        throw;
                    }
                }
            }
        }