본문으로 건너뛰기

OnAreaSelectionBeginEvent

event ViewAreaSelectionBeginEventHandler OnAreaSelectionBeginEvent

View Area Selection Begin Event

Examples

// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;

public void Example()
{
vizcore3d.View.OnAreaSelectionBeginEvent += View_OnAreaSelectionBeginEvent;
vizcore3d.View.OnAreaSelectionEndEvent += View_OnAreaSelectionEndEvent;
}

private void View_OnAreaSelectionBeginEvent(object sender, ref EventManager.ViewAreaSelectionBeginEventArgs e)
{
// Single Language Apply
e.CustomText = "Drag Selection Box Activated";

// Multi Language Apply
LanguageKind language = vizcore3d.Language.GetLanguage();
switch (language)
{
case LanguageKind.UNKNOWN:
e.CustomText = "Drag Selection Box Activated";
break;

case LanguageKind.KOREAN:
e.CustomText = "Drag 선택 상자 이벤트 커스텀 텍스트 적용";
break;

case LanguageKind.ENGLISH:
e.CustomText = "Apply Drag Selection Box Custom Text";
break;

case LanguageKind.CHINESE:
// Apply Drag Selection Box Custom Text
e.CustomText = "应用拖动选择框自定义文本";
break;

case LanguageKind.JAPANESE:
// Apply Drag Selection Box Custom Text
e.CustomText = "ドラッグ選択ボックスのカスタムテキストを適用";
break;

default:
e.CustomText = "Drag Selection Box Activated";
break;
}
}

private void View_OnAreaSelectionEndEvent(object sender, EventManager.ViewAreaSelectionEndEventArgs e)
{
MessageBox.Show($"Begin Point : {e.BeginPoint} \nEnd Point : {e.EndPoint}");
}