Esempio n. 1
0
 /// <summary>
 /// Stops the scanning process of a datasource
 /// </summary>
 /// <param name="applicationIdentity">Identity of the application</param>
 /// <param name="dataSourceIdentity">Identity of the datasource</param>
 /// <param name="userInterface"></param>
 /// <returns>Reply of the twaindriver</returns>
 internal static ReturnCodes DisableDataSource(
     Identity applicationIdentity,
     Identity dataSourceIdentity,
     UserInterface userInterface)
 {
     return DataSourceUserInterface (
         applicationIdentity,
         dataSourceIdentity,
         DataGroups.Control,
         DataAttributeTypes.UserInterface,
         Messages.DisableDataSource,
         userInterface);
 }
Esempio n. 2
0
 private static extern ReturnCodes DataSourceUserInterface(
     [In, Out] Identity origin,
     [In, Out] Identity destination,
     DataGroups dataGroup,
     DataAttributeTypes dataAttributeType,
     Messages message,
     UserInterface userInterface);
Esempio n. 3
0
        /// <summary>
        /// Starts the scanning process
        /// </summary>
        /// <param name="parentWindowHandle">Parent window of the twain driver's userinterface</param>
        /// <returns>Resonse of the twain driver</returns>
        internal ReturnCodes Enable(IntPtr parentWindowHandle)
        {
            ReturnCodes result = ReturnCodes.Failure;

            if (IsOpen)
            {
                UserInterface guif = new UserInterface ();
                guif.ShowUserInterface = 1;
                guif.ModalUserInterface = 1;
                guif.ParentHandle = parentWindowHandle;

                result = Twain32.EnableDataSource (dataSourceManager.Identity, this.Identity, guif);
            }

            return result;
        }