Esempio n. 1
0
 /// <summary>
 /// This function is used to store the current configuration of the loaded MHL driver to named profile.
 /// The idea behind this is that you can store the existing configuration when your application starts and then radically alter the settings of the MHL driver to suit your needs.
 /// This may include capturing the Scan button so that it sends a virtual key code your program can intercept instead of automatically triggering the scanner.
 /// Another typical use is to set up the barcode scanners parameters as you need them to be.
 /// Then when your program exits you can load the initial profile and ensure that the device works as a factory default unit when your application is no longer running.
 /// </summary>
 /// <param name="name">The name of the profile you wish to store. Use this same name with LoadProfile when you wish to load the previously stored profile. Use the name SystemDefault to override the systems default configuration for this MHL driver.</param>
 /// <exception cref="System.ArgumentException">If exceptions are enabled, on failure exception is thrown with valid error message.</exception>
 /// <returns>true on success, false on failure.</returns>
 /// <remarks>On failure, use GetLastError() ot GetLastErrorMessage() for more information.</remarks>
 public bool SaveProfile(string name)
 {
     if (MHLSRV._MHL_SaveProfile(loadedDrvHandle, name) == 0)
     {
         if (throwsException)
         {
             throw new System.ArgumentException("Cannot save profile " + name, "Error " + this.GetLastError().ToString() + "; " + this.GetLastErrorMessage());
         }
         return(false);
     }
     return(true);
 }
Esempio n. 2
0
 /// <summary>PROVIDED ONLY FOR BACKWARD COMPATIBILITY. Please use new HotkeyHelper class.</summary>
 /// <remarks>PROVIDED ONLY FOR BACKWARD COMPATIBILITY. Please use new MHLDriver class.</remarks>
 public int SaveProfile(int handle, String name)
 {
     return(MHLSRV._MHL_SaveProfile(handle, name));
 }