KIOSK Plugin 구현
본 내용은 Visual Studio 2017 및 C# 언어 기준으로 설명합니다.
예제
- Visual Studio 실행
- [클래스 라이브러리(.NET Framework)] 프로젝트 유형 선택

- 프로젝트 이름에 MyKIOSK 입력 후 확인 선택
- MyKIOSK 프로젝트 선택 후
마우스 오른쪽 버튼 클릭 → 추가 → 사용자 정의 컨트롤 선택

- 이름에 KIOSKControl.cs 입력 후 추가 선택

- MyKIOSK 프로젝트 하위 참조 선택 후
마우스 오른쪽 버튼 클릭 → 참조 추가 선택

- 참조 관리자에서 찾아보기 선택 →
VIZZARD 설치 폴더의 SHConnector.dll 선택 후 추가

- Namespace 추가
using SHConnector;
- Base Class 추가
IEntryConnector
- VIZZARD 응용프로그램과 연결을 위한 객체 선언
public IVIZZARDService Connector { get; set; }
- 생성자 재정의
public KIOSKControl(IVIZZARDService conn) : this()
{
Connector = conn;
}
- Plugin 자체 라이선스 체크 메서드 추가
public bool CheckLicense(int hostApp)
{
return true;
}
⚠️ 해당 메서드에서 라이선스 체크 후
false를 반환하면
Plugin이 로딩되지 않습니다.
(개발사 라이선스 정책 지원 목적)
DevExpress 라이브러리 추가
KIOSK Plugin은 DevExpress UI 기능을 사용합니다.


- DevExpress Namespace 추가
using DevExpress.XtraBars.Docking2010.Views.WindowsUI;
using DevExpress.XtraEditors;
using DevExpress.LookAndFeel;
- 타일 및 UI 관리를 위한 객체 선언
// 타일 컨테이너 객체
private TileContainer windowsTileContainer;
// UI View 객체
private WindowsUIView windowsUIView;
- KIOSK VIZCore Control 선언
public VIZViewer VIZCoreUserControl { get; set; }
⚠️ KIOSK Plugin에서 VIZCore Control을 사용하려면
VIZZARD가 License Server 인증 방식으로 구성되어 있어야 합니다.
Touch Mode 설정 (선택)
public KIOSKControl()
{
InitializeComponent();
WindowsFormsSettings.TouchUIMode = TouchUIMode.Default;
WindowsFormsSettings.TouchScaleFactor = 1.0F;
WindowsFormsSettings.ScrollUIMode = ScrollUIMode.Default;
WindowsFormsSettings.ShowTouchScrollBarOnMouseMove = true;
WindowsFormsSettings.DefaultFont =
new Font(WindowsFormsSettings.DefaultMenuFont.FontFamily, 9);
}
기본 이벤트 정의
public KIOSKControl(IVIZZARDService conn) : this()
{
Connector = conn;
Connector.OnInitializedAppEvent += Connector_OnInitializedAppEvent;
Connector.OnClickedTileEvent += Connector_OnClickedTileEvent;
}
KIOSK 타일 및 VIZCore 연동
private void Connector_OnInitializedAppEvent(object sender, EventArgs e)
{
windowsTileContainer = (TileContainer)Connector.GetTileContainer(0);
windowsTileContainer.Caption = "MyKIOSK Caption";
windowsUIView = (WindowsUIView)Connector.GetTileContainer(1);
windowsUIView.ContentContainerActionCustomization +=
WindowsUIView_ContentContainerActionCustomization;
AddExitTile(windowsUIView);
}
private void Connector_OnClickedTileEvent(object sender, ClickedTileEventArgs e)
{
if (e.KIOSK_CONTROL != this) return;
if (VIZCoreUserControl == null)
{
VIZCoreUserControl = (VIZViewer)Connector.CreateVIZCoreControl();
VIZCoreUserControl.Dock = DockStyle.Fill;
pcView.Controls.Add(VIZCoreUserControl);
InitVIZCoreUserControlEvent();
}
}
Plugin.xml 정의
기본 코드 템플릿
namespace MyKIOSK
{
public partial class KIOSKControl : UserControl, IEntryConnector
{
public IVIZZARDService Connector { get; set; }
public KIOSKControl()
{
InitializeComponent();
}
public KIOSKControl(IVIZZARDService conn) : this()
{
Connector = conn;
}
public bool CheckLicense(int hostApp)
{
return true;
}
}
}