ShapeElement.GetPotentialMouseAction Yöntem
Belirli bir noktaya Diyagram üzerinde fare olayı aşağı gerçekleştirmek için fare eylemi alır.
Ad alanı: Microsoft.VisualStudio.Modeling.Diagrams
Derleme: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0 (Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0.dll içinde)
Sözdizimi
'Bildirim
Public Overridable Function GetPotentialMouseAction ( _
mouseButtons As MouseButtons, _
point As PointD, _
hitTestInfo As DiagramHitTestInfo _
) As MouseAction
public virtual MouseAction GetPotentialMouseAction(
MouseButtons mouseButtons,
PointD point,
DiagramHitTestInfo hitTestInfo
)
Parametreler
- mouseButtons
Tür: System.Windows.Forms.MouseButtons
Fare olayı aşağı neden fare düğmeleri.
- point
Tür: Microsoft.VisualStudio.Modeling.Diagrams.PointD
Diyagramın sol üst noktasına göreli olarak Diyagram noktasında.
- hitTestInfo
Tür: Microsoft.VisualStudio.Modeling.Diagrams.DiagramHitTestInfo
Vuruş testi bilgi.
Dönüş Değeri
Tür: Microsoft.VisualStudio.Modeling.Diagrams.MouseAction
Belirli bir noktaya Diyagram üzerinde fare olayı aşağı gerçekleştirmek için fare eylemi.
Örnekler
public override DslDiagrams::MouseAction GetPotentialMouseAction(System.Windows.Forms.MouseButtons mouseButtons, DslDiagrams.PointD point, DslDiagrams::DiagramHitTestInfo hitTestInfo)
{
DslDiagrams::LinkShape linkShape = hitTestInfo.HitDiagramItem.Shape as DslDiagrams::LinkShape;
DslDiagrams::AnchorPoint anchorPoint = hitTestInfo.HitDiagramItem.AnchorPoint;
DslDiagrams::MouseAction action = null;
if ((linkShape != null) && (hitTestInfo.DiagramClientView.Selection.Count == 1) &&
(anchorPoint != null))
{
action = this.SequenceDiagram.AnchorKeyPointAction;
}
else if ((mouseButtons == MouseButtons.Left || mouseButtons == MouseButtons.None) &&
(linkShape != null) && (hitTestInfo.DiagramClientView.Selection.Count == 1) &&
(hitTestInfo.DiagramClientView.Selection.PrimaryItem.Shape is LinkShape) &&
(hitTestInfo.DiagramClientView.Selection.PrimaryItem.Shape == linkShape) &&
(hitTestInfo.DiagramClientView.Selection.FocusedItem != null) &&
(hitTestInfo.DiagramClientView.Selection.FocusedItem.Shape == linkShape))
{
action = this.SequenceDiagram.AnchorKeyPointAction;
}
else
{
action = base.GetPotentialMouseAction(mouseButtons, point, hitTestInfo);
}
return action;
}
return action;
}
.NET Framework Güvenliği
- Anında arayanlar için tam güven. Bu üye kısmen güvenilen kodla kullanılamaz. Daha fazla bilgi için bkz. Kısmen güvenilen kod kitaplıklarını kullanma.