Class NotificationCollection
A collection of Notification objects that are shown in a popup when the user clicks the notification icon in the RobotStudio title bar.
Namespace: ABB.Robotics.RobotStudio.Environment
Assembly: ABB.Robotics.RobotStudio.Environment.dll
Syntax
public sealed class NotificationCollection : IEnumerable<Notification>, IEnumerable
Properties
Count
Gets the number of Notifications in the collection.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
Int32 |
Item[Int32]
Gets the Notification at the specified index.
Declaration
public Notification this[int idx] { get; }
Parameters
Type | Name | Description |
---|---|---|
Int32 | idx |
Property Value
Type | Description |
---|---|
Notification |
Item[String]
Gets the Notification with the specified Tag.
Declaration
public Notification this[string tag] { get; }
Parameters
Type | Name | Description |
---|---|---|
String | tag |
Property Value
Type | Description |
---|---|
Notification | Null if no notification with the specified exists. |
Methods
Add(Notification)
Adds a Notification to the collection.
Declaration
public void Add(Notification notification)
Parameters
Type | Name | Description |
---|---|---|
Notification | notification |
Remarks
If Tag is not empty, any existing notification with the same tag is automatically removed.
GetEnumerator()
Declaration
public IEnumerator<Notification> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<Notification> |
Remove(Notification)
Removes a Notification from the collection.
Declaration
public bool Remove(Notification notification)
Parameters
Type | Name | Description |
---|---|---|
Notification | notification |
Returns
Type | Description |
---|---|
Boolean |
Remove(String)
Removes the Notification with a specified Tag from the collection.
Declaration
public bool Remove(string tag)
Parameters
Type | Name | Description |
---|---|---|
String | tag |
Returns
Type | Description |
---|---|
Boolean | True if the notification was found and removed. |
RemoveExpired()
Removes all expired Notifications from the collection.
Declaration
public int RemoveExpired()
Returns
Type | Description |
---|---|
Int32 | The number of removed notifications. |
Events
CollectionChanged
Raised when notifications are added or removed, or when the IsNew property of any notification changes.
Declaration
public event EventHandler<EventArgs> CollectionChanged
Event Type
Type | Description |
---|---|
EventHandler<EventArgs> |
LinkClicked
Raised when a NotificationActionLink is clicked.
Declaration
public event EventHandler<NotificationLinkEventArgs> LinkClicked
Event Type
Type | Description |
---|---|
EventHandler<NotificationLinkEventArgs> |