Diagram.OnViewMouseEnter 메서드
마우스 포인터가 다이어그램 클라이언트 뷰를 시작하면 파생 클래스가 작업을 수행할 수 있습니다.
네임스페이스: Microsoft.VisualStudio.Modeling.Diagrams
어셈블리: Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0(Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.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 보안
- 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용을 참조하십시오.