Class Dialogs
Static class containing functions to show builtin dialogs
Inherited Members
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 |
|
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
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 |
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 |
|
Exceptions
Type | Condition |
---|---|
ArgumentNullException |
|
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 |
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 |
|
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 |