Class Dialogs

Static class containing functions to show builtin dialogs

Inheritance

Dialogs
Namespace: ic4.WinForms
Assembly: ic4dotnet.System.Windows.Forms.dll
Syntax
public static class Dialogs

Methods

ShowDeviceDialog(Grabber, IWin32Window)

Shows a dialog that lets the user select a video capture device.

If the user selects a device, it is opened in the passed grabber object.

Declaration

public static bool ShowDeviceDialog(Grabber grabber, IWin32Window parentWindow)

Parameters

Type Name Description
Grabber grabber

A grabber object

IWin32Window parentWindow

A parent window for the dialog

Returns

Type Description
bool

true if a device was opened successfully, otherwise false

Exceptions

Type Condition
ArgumentNullException

grabber is null

ShowDevicePropertyDialog(Grabber, IWin32Window, PropertyDialogFlags, string, string, PropertyVisibility, string)

Show a dialog to let the user configure the properties of the video capture device opened in grabber.

If the user cancels the dialog, all properties are restored to the state they were in when the dialog was opened.

Declaration

public static bool ShowDevicePropertyDialog(Grabber grabber, IWin32Window parentWindow, PropertyDialogFlags flags = PropertyDialogFlags.Default, string category = "Root", string title = "Properties", PropertyVisibility initialVisibility = PropertyVisibility.Beginner, string initialFilter = null)

Parameters

Type Name Description
Grabber grabber

A grabber with an opened video capture device

IWin32Window parentWindow

A parent window for the dialog

PropertyDialogFlags flags

Customizes dialog behavior

string category

Category of properties to show in the dialog

string title

The title of the dialog. If null, a default title is set.

PropertyVisibility initialVisibility

Pre-selects a property visibility in the property dialog's visibility selector.

string initialFilter

Inserts a text into the property dialog's filter textbox.

Returns

Type Description
bool

true if the dialog was displayed and exited using the OK button, otherwise false.

Exceptions

Type Condition
ArgumentNullException

grabber is null

ShowPropertyMapDialog(PropertyMap, IWin32Window, PropertyDialogFlags, string, string, PropertyVisibility, string)

Show a dialog to let the user configure properties in the passed PropertyMap.

If the user cancels the dialog, all properties are restored to the state they were in when the dialog was opened.

When displaying the PropertyMap of an opened video capture device (DevicePropertyMap), this function does not allow changing certain properties when there is an active data stream. Use ShowDevicePropertyDialog(Grabber, IWin32Window, PropertyDialogFlags, string, string, PropertyVisibility, string) with AllowStreamRestart to show a dialog that allows changing stream-defining properties.

Declaration

public static bool ShowPropertyMapDialog(PropertyMap map, IWin32Window parentWindow, PropertyDialogFlags flags = PropertyDialogFlags.Default, string category = "Root", string title = "Properties", PropertyVisibility initialVisibility = PropertyVisibility.Beginner, string initialFilter = null)

Parameters

Type Name Description
PropertyMap map

A property map

IWin32Window parentWindow

A parent window for the dialog

PropertyDialogFlags flags

Customizes dialog behavior

string category

Category of properties to show in the dialog

string title

The title of the dialog. If null, a default title is set.

PropertyVisibility initialVisibility

Pre-selects a property visibility in the property dialog's visibility selector.

string initialFilter

Inserts a text into the property dialog's filter textbox.

Returns

Type Description
bool

true if the dialog was displayed and exited using the OK button, otherwise false.

Exceptions

Type Condition
ArgumentNullException

ShowSelectDeviceDialog(IWin32Window)

Shows a dialog that lets the user select a video capture device

Declaration

public static DeviceInfo ShowSelectDeviceDialog(IWin32Window parentWindow)

Parameters

Type Name Description
IWin32Window parentWindow

A parent window for the dialog

Returns

Type Description
DeviceInfo

A DeviceInfo object representing the video capture device that was selected, or null if the user did not select a device.