VideoOS.Platform.UI.ItemPickerForm Class Reference

This class is deprecated. Windows Forms controls are no longer supported. Use ItemPickerWpfWindow instead. A form used for selecting a single Item.
After this form has been created, the properties should be set, and the Init() method should ALWAYS be called.
More...

Inheritance diagram for VideoOS.Platform.UI.ItemPickerForm:

Classes

class  IsItemVisibleEventArgs
 Send on the IsItemVisibleEvent event for checking if an Item should be visible. More...
 
class  ValidateEventArgs
 Is used on the ValidateSelectionEvent event - when the client application can validate if an Item is selectable. More...
 

Public Member Functions

void Init ()
 Initializes the Form.
One of the Init methods must be called before the Form is opened.
 
void Init (List< Item > topLevelItems)
 Initializes the Form.
One of the Init methods must be called before the Form is opened.
 
void Init (List< Item > topLevelItems, ItemHierarchy itemHierarchy)
 Initializes the Form.
One of the Init methods must be called before the Form is opened.
 
delegate void IsItemVisibleHandler (IsItemVisibleEventArgs e)
 Defining the IsItemVisibleEvent event.
 
 ItemPickerForm ()
 
delegate void ValidateSelectionHandler (ValidateEventArgs e)
 Defines the ValidateSelectionEvent event.
 

Protected Member Functions

override void Dispose (bool disposing)
 Clean up any resources being used.
 

Properties

bool AutoAccept [get, set]
 When set to True, closes the form returns immediately as the user selects a valid Item.
 
bool AutoExpand [get, set]
 Identifies if single treenodes should automatically expand to next level. Default is true.
 
Category CategoryFilter [get, set]
 Sets what Category the user can choose from. Can be a single Category or null for any category. This property need to be set before showing the dialog.
 
Guid KindFilter [get, set]
 Sets what Kind the user can choose from. Can be one Kind or Guid.Empty for all kinds. This property need to be set before showing the dialog.
 
Item SelectedItem [get, set]
 Identifies a previous selected Item.
 
bool ShowDisabledItems [get, set]
 Used to filter on or off the devices that may be disabled. Default is to hide disabled items.
 
String TopLabel [get, set]
 Overrides the heading text on the form.
 

Events

ItemPickerForm.IsItemVisibleHandler IsItemVisibleEvent
 This event is called when the TreeView TreeNode is about to be displayed.
The controlling plug-in can evaluate if a given Item should be available in the TreeView.
 
ValidateSelectionHandler ValidateSelectionEvent
 Use for custom control of what Items are valid selection. This event will be called for every click the user makes on an Item for the client program to validate if the selections is a valid selection.
 

Detailed Description

This class is deprecated. Windows Forms controls are no longer supported. Use ItemPickerWpfWindow instead. A form used for selecting a single Item.
After this form has been created, the properties should be set, and the Init() method should ALWAYS be called.

To select a camera the following can be used:

form.KindFilter = Kind.Camera; //We just want camera type of Items
form.SelectedItem = _selectedCameraItem; //The previous selected camera
form.AutoAccept = true; //Single click on Camera
form.Init(); //Initialize the form and pull from entire configuration
if (form.ShowDialog() == DialogResult.OK) //Show dialog and test for user exit
{
_selectedCameraItem = form.SelectedItem;
if (_selectedCameraItem != null)
{
buttonCameraSelect.Text = _selectedCameraItem.Name;
}
}
Kind is a class that contains Milestone defined kinds as static members. Each field is a GUID....
Definition Kind.cs:21
static Guid Camera
Definition Kind.cs:29
This class is deprecated. Windows Forms controls are no longer supported. Use ItemPickerWpfWindow ins...
Definition ItemPickerForm.Designer.cs:4
ItemPickerForm()
Definition ItemPickerForm.cs:67
Item SelectedItem
Identifies a previous selected Item.
Definition ItemPickerForm.cs:189
void Init()
Initializes the Form. One of the Init methods must be called before the Form is opened.
Definition ItemPickerForm.cs:153


To select any Item that can be triggered, the following code can be used:

form.CategoryFilter = Category.TriggerOut;
form.SelectedItem = _selectedItem;
form.AutoAccept = true;
form.Init();
if (form.ShowDialog()==DialogResult.OK)
{
_selectedItem = form.SelectedItem;
}

Constructor & Destructor Documentation

◆ ItemPickerForm()

VideoOS.Platform.UI.ItemPickerForm.ItemPickerForm ( )
inline

Member Function Documentation

◆ Dispose()

override void VideoOS.Platform.UI.ItemPickerForm.Dispose ( bool disposing)
inlineprotected

Clean up any resources being used.

Parameters
disposingtrue if managed resources should be disposed; otherwise, false.

◆ Init() [1/3]

void VideoOS.Platform.UI.ItemPickerForm.Init ( )
inline

Initializes the Form.
One of the Init methods must be called before the Form is opened.

◆ Init() [2/3]

void VideoOS.Platform.UI.ItemPickerForm.Init ( List< Item > topLevelItems)
inline

Initializes the Form.
One of the Init methods must be called before the Form is opened.

◆ Init() [3/3]

void VideoOS.Platform.UI.ItemPickerForm.Init ( List< Item > topLevelItems,
ItemHierarchy itemHierarchy )
inline

Initializes the Form.
One of the Init methods must be called before the Form is opened.

◆ IsItemVisibleHandler()

delegate void VideoOS.Platform.UI.ItemPickerForm.IsItemVisibleHandler ( IsItemVisibleEventArgs e)

Defining the IsItemVisibleEvent event.

Parameters
e

◆ ValidateSelectionHandler()

delegate void VideoOS.Platform.UI.ItemPickerForm.ValidateSelectionHandler ( ValidateEventArgs e)

Defines the ValidateSelectionEvent event.

Parameters
e

Property Documentation

◆ AutoAccept

bool VideoOS.Platform.UI.ItemPickerForm.AutoAccept
getset

When set to True, closes the form returns immediately as the user selects a valid Item.

◆ AutoExpand

bool VideoOS.Platform.UI.ItemPickerForm.AutoExpand
getset

Identifies if single treenodes should automatically expand to next level. Default is true.

◆ CategoryFilter

Category VideoOS.Platform.UI.ItemPickerForm.CategoryFilter
getset

Sets what Category the user can choose from. Can be a single Category or null for any category. This property need to be set before showing the dialog.

The CategoryFilter should be used when configuring items that can be triggered. By setting this property instead of the KindFilter, you will provide the end-user with the choice of all kinds of Items that can be triggered, and not just one kind.

◆ KindFilter

Guid VideoOS.Platform.UI.ItemPickerForm.KindFilter
getset

Sets what Kind the user can choose from. Can be one Kind or Guid.Empty for all kinds. This property need to be set before showing the dialog.

◆ SelectedItem

Item VideoOS.Platform.UI.ItemPickerForm.SelectedItem
getset

Identifies a previous selected Item.

◆ ShowDisabledItems

bool VideoOS.Platform.UI.ItemPickerForm.ShowDisabledItems
getset

Used to filter on or off the devices that may be disabled. Default is to hide disabled items.

◆ TopLabel

String VideoOS.Platform.UI.ItemPickerForm.TopLabel
getset

Overrides the heading text on the form.

Event Documentation

◆ IsItemVisibleEvent

ItemPickerForm.IsItemVisibleHandler VideoOS.Platform.UI.ItemPickerForm.IsItemVisibleEvent

This event is called when the TreeView TreeNode is about to be displayed.
The controlling plug-in can evaluate if a given Item should be available in the TreeView.

◆ ValidateSelectionEvent

ValidateSelectionHandler VideoOS.Platform.UI.ItemPickerForm.ValidateSelectionEvent

Use for custom control of what Items are valid selection. This event will be called for every click the user makes on an Item for the client program to validate if the selections is a valid selection.