Table of Contents

Class RemovingFromListEventArgs

Namespace
CADability
Assembly
CADability.dll

Used as a parameter in the event RemovingFromListDelegate. When handling an appropriate event, you can prevent the object beeing removed from the list.

public class RemovingFromListEventArgs : EventArgs
Inheritance
RemovingFromListEventArgs
Inherited Members

Constructors

RemovingFromListEventArgs(object, object, string, string)

Creates an RemovingFromListEventArgs object.

public RemovingFromListEventArgs(object List, object Item, string Name, string ResourceID)

Parameters

List object

The List, from which the object is going to be removed

Item object

The object that is going to be removed

Name string

Name of the item

ResourceID string

Resource ID for the messages displayed in ItemIsUsed()

Fields

Item

The object that is going to be removed.

public object Item

Field Value

object

List

The list from which the object is going to be removed.

public object List

Field Value

object

Name

Name of the Item.

public string Name

Field Value

string

Refuse

Set this to true if you want to prevent the object to be removed.

public bool Refuse

Field Value

bool

ResourceID

Resource ID for errormessages that will be displayed in ItemIsUsed(). ResourceID+".ItemIsUsed" is the formattable string like "Item with the name {0} is used. Do you want to remove it anyway". ResourceID+".Label" is used for the Title of the message.

public string ResourceID

Field Value

string

Methods

DontRemoveLastItem()

Displays a massage telling the user that the last item cannot be removed

public virtual void DontRemoveLastItem()

ItemIsUsed()

Displays a massage telling the user that the item is still in use and asks the user whether the item should be removed anyway.

public virtual void ItemIsUsed()