SetSelected
Overloads
| Name | Description |
|---|---|
| SetSelected(int id, bool selected) | 옵저버의 선택 상태를 변경합니다. |
| SetSelected(List<int> ids, bool selected) | 여러 옵저버의 선택 상태를 한 번에 변경합니다. |
SetSelected(int id, bool selected)
public bool SetSelected(int id, bool selected)
옵저버의 선택 상태를 변경합니다.
Remarks
기존과 동일한 상태이면 아무 것도 하지 않고 false 를 반환합니다.
Parameters
| Name | Type | Description |
|---|---|---|
| id | int | 옵저버 아이디 |
| selected | bool | 선택 상태 |
Returns
| Type | Description |
|---|---|
| bool | 변경되었으면 true |
Examples
// VIZCore3DX.NET Control
private VIZCore3DX.NET.VIZCore3DXControl vizcore3dx;
// 첫 옵저버를 선택해 표식을 강조한다
public void Example()
{
System.Collections.Generic.List<int> ids = vizcore3dx.Observer.GetIDs();
if (ids.Count == 0) return;
vizcore3dx.Observer.SetSelected(ids[0], true);
System.Diagnostics.Debug.WriteLine($"Selected : {vizcore3dx.Observer.GetSelected().Count}");
}
SetSelected(List<int> ids, bool selected)
public void SetSelected(List<int> ids, bool selected)
여러 옵저버의 선택 상태를 한 번에 변경합니다.
Remarks
실제로 바뀐 옵저버가 없으면 통지도 발생하지 않습니다.
Parameters
| Name | Type | Description |
|---|---|---|
| ids | List<int> | 옵저버 아이디 목록 |
| selected | bool | 선택 상태 |
Examples
// VIZCore3DX.NET Control
private VIZCore3DX.NET.VIZCore3DXControl vizcore3dx;
// 전체 선택을 해제한다
public void Example()
{
vizcore3dx.Observer.SetSelected(vizcore3dx.Observer.GetSelected(), false);
System.Diagnostics.Debug.WriteLine($"Selected : {vizcore3dx.Observer.GetSelected().Count}");
}