コード例 #1
0
 internal static void SetValue(IAccessible accObj, int childId, string textValue)
 {
     try
     {
         accObj.set_accValue(childId, textValue);
     }
     catch (Exception exception)
     {
         if (!IsOleAccException(exception) || !IsOleAccExceptionMaskable(exception))
         {
             throw;
         }
     }
 }
コード例 #2
0
        /* void SetCopyCount(int number)
         * Set how many copies we need to print.
         * return true is success, else return false.
         */
        public static bool SetCopyCount(int number)
        {
            if (_copyCountHandle != IntPtr.Zero && number >= 0)
            {
                try
                {
                    //get MSAA interface for copy count.
                    Win32API.AccessibleObjectFromWindow(_copyCountHandle, (int)Win32API.IACC.OBJID_CLIENT, ref Win32API.IACCUID, ref _paccCopyCount);

                    if (_paccCopyCount != null)
                    {
                        _paccCopyCount.set_accValue(_selfID, number.ToString());
                        return(true);
                    }
                }
                catch
                {
                }
            }

            return(false);
        }
コード例 #3
0
 void IAccessibleInternal.set_accValue(object childID, string newValue)
 => publicIAccessible.set_accValue(childID, newValue);
コード例 #4
0
 void UnsafeNativeMethods.IAccessibleInternal.set_accValue(object childID, string newValue)
 {
     IntSecurity.UnmanagedCode.Assert();
     publicIAccessible.set_accValue(childID, newValue);
 }