Diagram.OnViewMouseEnter 메서드
파생된 클래스 다이어그램 클라이언트 보기 마우스 포인터를 입력 하면 작업을 수행할 수 있습니다.
네임스페이스: Microsoft.VisualStudio.Modeling.Diagrams
어셈블리: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0(Microsoft.VisualStudio.Modeling.Sdk.Diagrams.11.0.dll)
구문
‘선언
Public Overridable Sub OnViewMouseEnter ( _
pointArgs As DiagramPointEventArgs _
)
public virtual void OnViewMouseEnter(
DiagramPointEventArgs pointArgs
)
매개 변수
- pointArgs
형식: Microsoft.VisualStudio.Modeling.Diagrams.DiagramPointEventArgs
이벤트 데이터입니다.인수 목록을 참조 하십시오. DiagramPointEventArgs.
예제
public override void OnViewMouseEnter(DslDiagrams::DiagramPointEventArgs pointArgs)
{
if (pointArgs == null) throw new global::System.ArgumentNullException("pointArgs");
DslDiagrams::DiagramView activeView = this.ActiveDiagramView;
if(activeView != null)
{
DslDiagrams::MouseAction action = null;
if (activeView.SelectedToolboxItemSupportsFilterString(global::Microsoft.SequenceDiagramModel2.SequenceDiagramModel2ToolboxHelper.SyncMessageFilterString))
{
if (this.syncMessageConnectAction == null)
{
this.syncMessageConnectAction = new global::Microsoft.SequenceDiagramModel2.SyncMessageConnectAction(this);
this.syncMessageConnectAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnConnectActionDeactivated);
}
action = this.syncMessageConnectAction;
}
else if (activeView.SelectedToolboxItemSupportsFilterString(global::Microsoft.SequenceDiagramModel2.SequenceDiagramModel2ToolboxHelper.CreateMessageFilterString))
{
if (this.createMessageConnectAction == null)
{
this.createMessageConnectAction = new global::Microsoft.SequenceDiagramModel2.CreateMessageConnectAction(this);
this.createMessageConnectAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnConnectActionDeactivated);
}
action = this.createMessageConnectAction;
}
else if (activeView.SelectedToolboxItemSupportsFilterString(global::Microsoft.SequenceDiagramModel2.SequenceDiagramModel2ToolboxHelper.AsyncMessageFilterString))
{
if (this.asyncMessageConnectAction == null)
{
this.asyncMessageConnectAction = new global::Microsoft.SequenceDiagramModel2.AsyncMessageConnectAction(this);
this.asyncMessageConnectAction.MouseActionDeactivated += new DslDiagrams::MouseAction.MouseActionDeactivatedEventHandler(OnConnectActionDeactivated);
}
action = this.asyncMessageConnectAction;
}
else
{
action = null;
}
if (pointArgs.DiagramClientView.ActiveMouseAction != action)
{
pointArgs.DiagramClientView.ActiveMouseAction = action;
}
}
}
.NET Framework 보안
- 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.