ConnectorHitTestInfo(CompositeActivityDesigner, HitTestLocations, Int32) Construtor
Definição
Inicializa uma nova instância da classe ConnectorHitTestInfo.Initializes a new instance of the ConnectorHitTestInfo class.
public:
ConnectorHitTestInfo(System::Workflow::ComponentModel::Design::CompositeActivityDesigner ^ compositeActivityDesigner, System::Workflow::ComponentModel::Design::HitTestLocations flags, int connector);
public ConnectorHitTestInfo (System.Workflow.ComponentModel.Design.CompositeActivityDesigner compositeActivityDesigner, System.Workflow.ComponentModel.Design.HitTestLocations flags, int connector);
new System.Workflow.ComponentModel.Design.ConnectorHitTestInfo : System.Workflow.ComponentModel.Design.CompositeActivityDesigner * System.Workflow.ComponentModel.Design.HitTestLocations * int -> System.Workflow.ComponentModel.Design.ConnectorHitTestInfo
Public Sub New (compositeActivityDesigner As CompositeActivityDesigner, flags As HitTestLocations, connector As Integer)
Parâmetros
- compositeActivityDesigner
- CompositeActivityDesigner
O CompositeActivityDesigner que contém o conector.The CompositeActivityDesigner that contains the connector.
- flags
- HitTestLocations
Um HitTestLocations que define o local no conector em que o usuário clicou.A HitTestLocations that defines the location on the connector that the user clicked.
- connector
- Int32
O identificador de índice do conector que foi clicado.The index identifier of the connector that was clicked.
Exceções
Antes da chamada de construtor, o índice do conector estava definido como menor que zero.Prior to the constructor call the connector index was set to less than zero.
Exemplos
O exemplo a seguir mostra a adição de uma nova ramificação usando um designer com base na CompositeActivityDesigner classe.The following example shows the addition of a new branch using a designer based off of the CompositeActivityDesigner class. Se CanInsertActivities retornar true , uma nova ramificação será criada usando o InsertActivities método.If CanInsertActivities returns true, a new branch is created using the InsertActivities method. Um ConnectorHitTestInfo objeto é criado como um parâmetro para o InsertActivities método.A ConnectorHitTestInfo object is created as a parameter to the InsertActivities method. Quando isso for concluído, o EnsureVisibleContainedDesigner método será usado para garantir que o Branch recém-adicionado seja exibido no designer de fluxo de trabalho.When this is finished, the EnsureVisibleContainedDesigner method is used to ensure that the newly added branch is displayed in the workflow designer.
protected override CompositeActivity OnCreateNewBranch()
{
return new ParallelIfBranch();
}
Protected Overrides Function OnCreateNewBranch() As CompositeActivity
Return New ParallelIfBranch()
End Function