Ejemplo n.º 1
0
 /// <summary>
 /// <para>Ring the X display server bell.</para>
 /// </summary>
 ///
 /// <param name="percent">
 /// <para>The percentage of the base bell volume to ring at.
 /// This must be between -100 and 100 inclusive.</para>
 /// </param>
 ///
 /// <exception cref="T:System.ArgumentOfRangeException">
 /// <para>The <paramref name="percent"/> value is less than
 /// -100 or greater than 100.</para>
 /// </exception>
 public void Bell(int percent)
 {
     try
     {
         IntPtr dpy = Lock();
         if (percent >= -100 && percent <= 100)
         {
             Xlib.XBell(dpy, percent);
         }
         else
         {
             throw new ArgumentOutOfRangeException
                       ("percent", S._("X_BellPercent"));
         }
     }
     finally
     {
         Unlock();
     }
 }