ETC/Nevron
[ETC-Nevron] 다이어그램 Shape 를 삭제할 때 확인을 요청
WooGong Peter
2017. 4. 5. 11:46
다이어그램에서 Shape 을 삭제할 때 확인을 하도록 하는 방법은 다음과 같다.
C#
// NDrawingDocument 의 OnNodeRemoving 이벤트를 구독:
nDrawingDocument1.EventSinkService.NodeRemoving +=
new
ChildNodeCancelEventHandler(EventSinkService_NodeRemoving);
// 이벤트 핸들러 작성:
void
EventSinkService_NodeRemoving(NChildNodeCancelEventArgs args)
{
if
(MessageBox.Show(
"Remove ?"
,
"Question"
, MessageBoxButtons.YesNo, MessageBoxIcon.Question) !=
DialogResult.Yes)
{
args.Cancel =
true
;
}
}
VB.NET
' NDrawingDocument 의 OnNodeRemoving 이벤트를 구독:
AddHandler
NDrawingDocument1.EventSinkService.NodeRemoving,
AddressOf
EventSinkService_NodeRemoving
' 이벤트 핸들러 작성:
Private
Sub
EventSinkService_NodeRemoving(args
As
NChildNodeCancelEventArgs)
If
MessageBox.Show(
"Remove ?"
,
"Question"
, MessageBoxButtons.YesNo, MessageBoxIcon.Question) <> DialogResult.Yes
Then
args.Cancel =
True
End
If
End
Sub
위 내용은 아래 페이지를 옮겼습니다.
How to ask a user for confirmation when he or she deletes a diagram shape?
행복한 고수되십시요.
woojja ))*
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
반응형