VintaSoft Twain .NET SDK 15.0: Documentation for .NET developer
In This Topic
    How to work with profiles of Kodak scanner?
    In This Topic
    VintaSoft TWAIN .NET SDK allows to work with profiles of Kodak scanners using KodakDeviceProfileCollection class.


    Here is an example that demonstrates how to get a list of Kodak scanner profiles:
    /// <summary>
    /// Adds the profile with specified name to the Kodak device.
    /// </summary>
    /// <param name="device">The device.</param>
    /// <param name="profileName">The profile name.</param>
    public static void AddProfile(Vintasoft.Twain.Device device, string profileName)
    {
        // create profile collection
        Vintasoft.Twain.KodakDeviceProfileCollection profiles = new Vintasoft.Twain.KodakDeviceProfileCollection(device);
    
        // create and add profile
        profiles.Add(profileName);
    }
    
    ''' <summary>
    ''' Adds the profile with specified name to the Kodak device.
    ''' </summary>
    ''' <param name="device">The device.</param>
    ''' <param name="profileName">The profile name.</param>
    Public Shared Sub AddProfile(device As Vintasoft.Twain.Device, profileName As String)
            ' create profile collection
            Dim profiles As New Vintasoft.Twain.KodakDeviceProfileCollection(device)
    
            ' create and add profile
            profiles.Add(profileName)
    End Sub
    


    Here is an example that demonstrates how to add profile to Kodak scanner:
    /// <summary>
    /// Adds the profile with specified name to the Kodak device.
    /// </summary>
    /// <param name="device">The device.</param>
    /// <param name="profileName">The profile name.</param>
    public static void AddProfile(Vintasoft.Twain.Device device, string profileName)
    {
        // create profile collection
        Vintasoft.Twain.KodakDeviceProfileCollection profiles = new Vintasoft.Twain.KodakDeviceProfileCollection(device);
    
        // create and add profile
        profiles.Add(profileName);
    }
    
    ''' <summary>
    ''' Adds the profile with specified name to the Kodak device.
    ''' </summary>
    ''' <param name="device">The device.</param>
    ''' <param name="profileName">The profile name.</param>
    Public Shared Sub AddProfile(device As Vintasoft.Twain.Device, profileName As String)
            ' create profile collection
            Dim profiles As New Vintasoft.Twain.KodakDeviceProfileCollection(device)
    
            ' create and add profile
            profiles.Add(profileName)
    End Sub
    


    Here is an example that demonstrates how to set current profile for Kodak scanner:
    /// <summary>
    /// Set the current device profile.
    /// </summary>
    /// <param name="device">The device.</param>
    /// <param name="profileName">The profile name.</param>
    public static void SetCurrentProfile(Vintasoft.Twain.Device device, string profileName)
    {
        // create profile collection
        Vintasoft.Twain.KodakDeviceProfileCollection profiles = new Vintasoft.Twain.KodakDeviceProfileCollection(device);
    
        // set current profile
        profiles.SetCurrentProfile(profileName);
    }
    
    ''' <summary>
    ''' Set the current device profile.
    ''' </summary>
    ''' <param name="device">The device.</param>
    ''' <param name="profileName">The profile name.</param>
    Public Shared Sub SetCurrentProfile(device As Vintasoft.Twain.Device, profileName As String)
            ' create profile collection
            Dim profiles As New Vintasoft.Twain.KodakDeviceProfileCollection(device)
    
            ' set current profile
            profiles.SetCurrentProfile(profileName)
    End Sub
    


    Here is an example that demonstrates how to remove profile from Kodak scanner:
    /// <summary>
    /// Removes the profile with specified name from the device.
    /// </summary>
    /// <param name="device">The device.</param>
    /// <param name="profileName">The profile name.</param>
    public static void RemoveProfile(Vintasoft.Twain.Device device, string profileName)
    {
        // create profile collection
        Vintasoft.Twain.KodakDeviceProfileCollection profiles = new Vintasoft.Twain.KodakDeviceProfileCollection(device);
    
        // remove profile from device
        profiles.Remove(profileName);
    }
    
    ''' <summary>
    ''' Removes the profile with specified name from the device.
    ''' </summary>
    ''' <param name="device">The device.</param>
    ''' <param name="profileName">The profile name.</param>
    Public Shared Sub RemoveProfile(device As Vintasoft.Twain.Device, profileName As String)
            ' create profile collection
            Dim profiles As New Vintasoft.Twain.KodakDeviceProfileCollection(device)
    
            ' remove profile from device
            profiles.Remove(profileName)
    End Sub