Class WindowCollection
Represents the collection of Windows in the application
Namespace: ABB.Robotics.RobotStudio.Environment
Assembly: ABB.Robotics.RobotStudio.Environment.dll
Syntax
public class WindowCollection : ICollection, IEnumerable<Window>, IEnumerable
Examples
Properties
Count
Returns the number of windows in the collection
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
Int32 |
IsSynchronized
See ICollection.IsSynchronized. Always returns false.
Declaration
public bool IsSynchronized { get; }
Property Value
Type | Description |
---|---|
Boolean |
Item[Int32]
Gets the window with the specified index in the collection
Declaration
public Window this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
Int32 | index |
Property Value
Type | Description |
---|---|
Window |
Item[Object]
Gets the window with the specified ID in the collection
Declaration
public Window this[object id] { get; }
Parameters
Type | Name | Description |
---|---|---|
Object | id |
Property Value
Type | Description |
---|---|
Window |
Item[Type]
Gets the first window in the collection of the specified Type
Declaration
public Window this[Type windowType] { get; }
Parameters
Type | Name | Description |
---|---|---|
Type | windowType |
Property Value
Type | Description |
---|---|
Window |
Item[Control]
Gets the window containing the specified control
Declaration
public Window this[Control control] { get; }
Parameters
Type | Name | Description |
---|---|---|
Control | control |
Property Value
Type | Description |
---|---|
Window |
SyncRoot
See ICollection.SyncRoot
Declaration
public object SyncRoot { get; }
Property Value
Type | Description |
---|---|
Object |
Methods
Add(Window)
Adds a Window to the environment
Declaration
public void Add(Window window)
Parameters
Type | Name | Description |
---|---|---|
Window | window | Window to add |
Remarks
For ToolWindow, consider using AddDockedOrTabbed() instead.
AddDocked(ToolWindow, DockStyle)
Adds a ToolWindow to the environment and docks it to the specified edge
Declaration
public void AddDocked(ToolWindow window, DockStyle dockStyle)
Parameters
Type | Name | Description |
---|---|---|
ToolWindow | window | Window to add |
DockStyle | dockStyle | Edge to dock to |
Remarks
Consider using AddDockedOrTabbed() instead.
AddDocked(ToolWindow, DockStyle, ToolWindow)
Adds a ToolWindow to the environment and docks it relative another window
Declaration
public void AddDocked(ToolWindow window, DockStyle dockStyle, ToolWindow referenceWindow)
Parameters
Type | Name | Description |
---|---|---|
ToolWindow | window | Window to add |
DockStyle | dockStyle | Edge to dock to |
ToolWindow | referenceWindow | Window to dock relative to |
Remarks
Consider using AddDockedOrTabbed() instead.
AddDockedOrTabbed(ToolWindow, DockStyle)
Adds a ToolWindow to the environment and docks it to the specified edge, or adds it as a tab to an existing window at the specified edge.
Declaration
public void AddDockedOrTabbed(ToolWindow window, DockStyle dockStyle)
Parameters
Type | Name | Description |
---|---|---|
ToolWindow | window | Window to add |
DockStyle | dockStyle | Edge to dock to |
AddTabbed(ToolWindow, ToolWindow)
Adds a tabbed ToolWindow to the environment
Declaration
public void AddTabbed(ToolWindow window, ToolWindow referenceWindow)
Parameters
Type | Name | Description |
---|---|---|
ToolWindow | window | Window to add |
ToolWindow | referenceWindow | Window to add a tab to |
Remarks
Consider using AddDockedOrTabbed() instead.
AddToTabGroup(DocumentWindow, DockStyle, DocumentWindow)
Adds a DocumentWindow to the environment and places it in a tab group relative to a reference window.
Declaration
public void AddToTabGroup(DocumentWindow window, DockStyle dockStyle, DocumentWindow referenceWindow)
Parameters
Type | Name | Description |
---|---|---|
DocumentWindow | window | Window to add |
DockStyle | dockStyle | Specifies how the window is placed in relation to referenceWindow. |
DocumentWindow | referenceWindow | Reference window |
Remarks
If dockStyle is Fill the window is placed in the same tab group as referenceWindow, otherwise it is placed in an adjacent tab group according to dockStyle.
If the document area is already split horizontally it will not be split vertically and vice versa. In this case the window will be placed in the same tab group as referenceWindow.
Contains(Window)
Returns True if the collection contains the specified Window
Declaration
public bool Contains(Window window)
Parameters
Type | Name | Description |
---|---|---|
Window | window |
Returns
Type | Description |
---|---|
Boolean |
CopyTo(Array, Int32)
Copies the elements of the collection to an Array, starting at a particular Array index
Declaration
public void CopyTo(Array array, int index)
Parameters
Type | Name | Description |
---|---|---|
Array | array | |
Int32 | index |
FindWindows(Predicate<Window>)
Find all windows that matches a given predicate
Declaration
public Window[] FindWindows(Predicate<Window> match)
Parameters
Type | Name | Description |
---|---|---|
Predicate<Window> | match |
Returns
Type | Description |
---|---|
Window[] |
FindWindows<T>()
Find windows of a given type.
Declaration
ic Window[] FindWindows<T>()
where T : Window
Returns
Type | Description |
---|---|
Window[] |
Type Parameters
Name | Description |
---|---|
T | The type ow Window to find. It must be derived from Window, for example DocumentWindow and ToolWindow |
FindWindows<T>(Object)
Find windows of a given type and with a specified Id.
Declaration
ic Window[] FindWindows<T>(object id)
where T : Window
Parameters
Type | Name | Description |
---|---|---|
Object | id |
Returns
Type | Description |
---|---|
Window[] |
Type Parameters
Name | Description |
---|---|
T | The type of Window to find. It must be derived from Window, for example DocumentWindow and ToolWindow |
GetEnumerator()
See IEnumerable.GetEnumerator()
Declaration
public IEnumerator GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator |
IndexOf(Window)
Returns the index of a window in the collection
Declaration
public int IndexOf(Window window)
Parameters
Type | Name | Description |
---|---|---|
Window | window | Window to search for |
Returns
Type | Description |
---|---|
Int32 | Index of the window in the collection |
Remove(Window)
Removes a window from the environment
Declaration
public void Remove(Window window)
Parameters
Type | Name | Description |
---|---|---|
Window | window | Window to remove |
RemoveAll(Predicate<Window>)
Removes all windows that matches the given predicate
Declaration
public void RemoveAll(Predicate<Window> match)
Parameters
Type | Name | Description |
---|---|---|
Predicate<Window> | match |
Events
Added
Raised after a windows has been added to the collection.
Declaration
public event EventHandler<WindowCollectionChangedEventArgs> Added
Event Type
Type | Description |
---|---|
EventHandler<WindowCollectionChangedEventArgs> |
Removed
Raised after a window has been removed from the collection.
Declaration
public event EventHandler<WindowCollectionChangedEventArgs> Removed
Event Type
Type | Description |
---|---|
EventHandler<WindowCollectionChangedEventArgs> |