VintaSoft Imaging .NET SDK 15.1: Документация для .NET разработчика
Vintasoft.Imaging.Media Namespace / ImageCaptureDeviceConfiguration Class
Члены типа Объект Синтаксис Example Иерархия Требования Смотрите также
В этом разделе
Класс ImageCaptureDeviceConfiguration
В этом разделе
Получает информацию об устройствах захвата изображения, доступных в системе.
Объектная модель
ImageCaptureDeviceConfiguration
Синтаксис
'Declaration

Public MustInherit NotInheritable Class ImageCaptureDeviceConfiguration

public static class ImageCaptureDeviceConfiguration

Пример

Вот C#/VB.NET код, который демонстрирует, как отображать информацию о доступных устройствах захвата изображений:


Class ImageCaptureDeviceConfiguration_Example
    Public Shared Sub Test()
        System.Console.WriteLine(GetInformation())
    End Sub

    Public Shared Function GetInformation() As String
        Dim sb As New System.Text.StringBuilder()

        ' gets available capture devices
        Dim availableDevices As System.Collections.ObjectModel.ReadOnlyCollection(Of Vintasoft.Imaging.Media.ImageCaptureDevice) = Vintasoft.Imaging.Media.ImageCaptureDeviceConfiguration.GetCaptureDevices()

        For Each device As Vintasoft.Imaging.Media.ImageCaptureDevice In availableDevices
            ' FriendlyName
            sb.AppendLine(String.Format("{0}, supported formats:", device.FriendlyName))
            ' SupportedFormats
            For Each format As Vintasoft.Imaging.Media.ImageCaptureFormat In device.SupportedFormats
                sb.AppendLine(format.ToString())
            Next
            sb.AppendLine()
        Next

        Return sb.ToString()
    End Function
End Class


class ImageCaptureDeviceConfiguration_Example
{
    public static void Test()
    {
        System.Console.WriteLine(GetInformation());
    }

    public static string GetInformation()
    {
        System.Text.StringBuilder sb = new System.Text.StringBuilder();

        // gets available capture devices
        System.Collections.ObjectModel.ReadOnlyCollection<Vintasoft.Imaging.Media.ImageCaptureDevice> availableDevices = 
            Vintasoft.Imaging.Media.ImageCaptureDeviceConfiguration.GetCaptureDevices();

        foreach (Vintasoft.Imaging.Media.ImageCaptureDevice device in availableDevices)
        {
            // FriendlyName
            sb.AppendLine(string.Format("{0}, supported formats:", device.FriendlyName));
            // SupportedFormats
            foreach (Vintasoft.Imaging.Media.ImageCaptureFormat format in device.SupportedFormats)
                sb.AppendLine(format.ToString());
            sb.AppendLine();
        }

        return sb.ToString();
    }
}

Иерархия наследования

System.Object
   Vintasoft.Imaging.Media.ImageCaptureDeviceConfiguration

Требования

Целевые платформы: .NET 10; .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

Смотрите также