iconDreamine
← 목록

Dreamine.UI.Abstractions

stablev1.0.1

플랫폼 공통 UI 인터페이스 — IPopupService, IThemeService 등.

#abstractions#dreamine#popup#ui#virtualkeyboard#wpf
TFM net8.0-windowsPackage Dreamine.UI.Abstractions

Dreamine.UI.Abstractions

Dreamine.UI.Abstractions는 모든 Dreamine UI 패키지가 공유하는 플랫폼 독립적 계약 인터페이스와 열거형을 정의합니다.

WPF 전용 코드를 포함하지 않습니다.
구체적인 구현은 Dreamine.UI.Wpf.Equipment 같은 플랫폼별 패키지에 있습니다.

➡️ English Documentation


이 라이브러리가 해결하는 문제

UI 컴포넌트 계약은 렌더링 플랫폼과 독립적으로 정의되어야 합니다.

  • WPF 어셈블리 없이도 추상화를 참조할 수 있음
  • 비즈니스 레이어가 구체적인 UI 컨트롤 대신 인터페이스에 의존 가능
  • 플랫폼별 패키지가 순환 의존 없이 계약을 구현

주요 기능

  • 플랫폼 독립적 팝업 서비스 인터페이스 (IPopupService)
  • 가상 키보드 레이아웃 및 입력 모드 열거형
  • 키보드 지역화를 위한 언어 코드 열거형
  • 가상 키보드 Enter 키 프로바이더용 액션 결과 열거형
  • WPF 등 UI 프레임워크 의존 없음

요구 사항

  • 대상 프레임워크: net8.0-windows
  • 외부 패키지 의존성 없음

설치

NuGet

dotnet add package Dreamine.UI.Abstractions

PackageReference

<PackageReference Include="Dreamine.UI.Abstractions" />

프로젝트 구조

Dreamine.UI.Abstractions
├── Popup/
│   ├── BlinkPopupOptions.cs       — 깜빡임 팝업 창 옵션
│   └── IPopupService.cs           — 팝업 서비스 계약
└── VirtualKeyboard/
    ├── ActionResult.cs            — Enter 키 프로바이더 결과
    ├── IEnterActionProvider.cs    — Enter 키 액션 프로바이더 계약
    ├── KeyboardInputMode.cs       — 텍스트 / 숫자 / 비밀번호 입력 모드
    ├── LanguageCode.cs            — en_US / ko_KR / zh_CN / vi_VN
    └── VkLayout.cs                — Text / Password / Numeric / Decimal

아키텍처 역할

Dreamine.UI.Abstractions
        │
        ├─ Dreamine.UI.Wpf.Equipment   (팝업 + 키보드 구현)
        ├─ Dreamine.UI.Wpf.Controls    (네비게이션 + 뷰 관리)
        └─ 애플리케이션 코드            (인터페이스만 의존)

이 패키지는 UI 스택의 가장 하위 레이어로, 상위 의존성이 없습니다.


주요 인터페이스

IPopupService

깜빡임 팝업 창의 표시, 닫기, 상태 조회를 위한 플랫폼 중립 계약입니다.

IPopupService popupService = DMContainer.Resolve<IPopupService>();

await popupService.ShowBlinkAsync(owner, new BlinkPopupOptions
{
    Message = "작업이 완료되었습니다.",
    OkText  = "확인"
});

BlinkPopupOptions

깜빡임 팝업 창의 외형과 동작을 구성합니다.

var options = new BlinkPopupOptions
{
    Title           = "경고",
    Message         = "설비 상태를 확인하세요",
    UseBlink        = true,
    BlinkIntervalMs = 400,
    Color1          = Colors.Red,
    Color2          = Colors.DarkRed,
    IsModal         = true
};

VkLayout

사용자에게 표시할 가상 키보드 레이아웃을 선택합니다.

설명
Text 영숫자 풀 키보드
Password 마스킹 텍스트 키보드
Numeric 숫자 패드
Decimal 소수 숫자 입력

LanguageCode

가상 키보드의 언어를 선택합니다.

언어
en_US 영어
ko_KR 한국어
zh_CN 중국어
vi_VN 베트남어

설계 노트

이 패키지는 의도적으로 렌더링 프레임워크 의존성 없이 유지됩니다.

  • System.Windows 타입 없음
  • XAML 리소스 참조 없음
  • 계약만 포함 — 모든 동작은 구현 패키지에 위치

라이선스

MIT License

구조 다이어그램

classDiagram
    class IDreamineControl {
        <<interface>>
        +IsLoading bool
        +HasError bool
        +ErrorMessage string
        +Refresh() void
    }
    class IDreamineView~T~ {
        <<interface>>
        +ViewModel T
        +BindViewModel(T) void
    }
    class IDreaminePanel {
        <<interface>>
        +Title string
        +IsCollapsed bool
        +Toggle() void
    }
    class IDreamineTheme {
        <<interface>>
        +Apply(FrameworkElement) void
        +ThemeName string
        +IsDark bool
    }
    class IDreamineDialogView {
        <<interface>>
        +ShowAsync() Task
        +Close(bool) void
        +Result bool
    }
    IDreamineControl <|-- IDreamineView~T~
    IDreamineControl <|-- IDreaminePanel
    IDreamineControl <|-- IDreamineDialogView

API 문서

타입

ActionResult

\if KO 가상 키보드 입력 동작의 처리 결과를 지정합니다. \endif \if EN Specifies the outcome of a virtual-keyboard input action. \endif

BlinkPopupOptions

\if KO 깜빡임 팝업 창의 표시 방식과 동작을 구성하는 옵션을 나타냅니다. \endif \if EN Represents options that configure the appearance and behavior of a blinking popup window. \endif

DoNothingEnterActionResult

\if KO 후속 처리가 필요 없는 Enter 동작 결과를 나타냅니다. \endif \if EN Represents an Enter-action result that requires no follow-up processing. \endif

EnterActionResult

\if KO 가상 키보드의 Enter 동작 결과와 사용자 피드백을 나타냅니다. \endif \if EN Represents the result of a virtual-keyboard Enter action and its user feedback. \endif

IEnterActionProvider

\if KO 가상 키보드의 Enter 입력 처리와 현재 값 읽기 기능을 정의합니다. \endif \if EN Defines Enter-input processing and current-value retrieval for a virtual keyboard. \endif

IPopupService

\if KO 깜빡임 팝업 창의 표시, 조회 및 수명 주기를 관리하는 서비스를 정의합니다. \endif \if EN Defines a service that displays, queries, and manages the lifetime of blinking popup windows. \endif

KeyboardInputMode

\if KO 가상 키보드가 제공하는 입력 키의 범위를 지정합니다. \endif \if EN Specifies the range of input keys provided by the virtual keyboard. \endif

KeyData

\if KO 하나의 가상 키에 대한 언어별 및 Shift 상태별 표시 값을 저장합니다. \endif \if EN Stores language-specific and Shift-specific display values for a virtual key. \endif

LanguageCode

\if KO 가상 키보드에서 지원하는 언어 및 지역 코드를 지정합니다. \endif \if EN Specifies language and locale codes supported by the virtual keyboard. \endif

NgEnterActionResult

\if KO 거부된 Enter 동작 결과를 나타냅니다. \endif \if EN Represents a rejected Enter-action result. \endif

OkEnterActionResult

\if KO 승인된 Enter 동작 결과를 나타냅니다. \endif \if EN Represents an accepted Enter-action result. \endif

SpecialButtonName

\if KO 가상 키보드 레이아웃의 특수 버튼 식별자 상수를 제공합니다. \endif \if EN Provides identifier constants for special buttons in a virtual-keyboard layout. \endif

VkLayout

\if KO 가상 키보드에 사용할 레이아웃 종류를 지정합니다. \endif \if EN Specifies the layout type used by the virtual keyboard. \endif

ActionResult

DoNothing Field

\if KO 입력에 대해 추가 동작을 수행하지 않음을 나타냅니다. \endif \if EN Indicates that no additional action should be performed for the input. \endif

NG Field

\if KO 입력이 거부되었거나 유효성 검사에 실패했음을 나타냅니다. \endif \if EN Indicates that the input was rejected or failed validation. \endif

OK Field

\if KO 입력이 성공적으로 승인되었음을 나타냅니다. \endif \if EN Indicates that the input was accepted successfully. \endif

BlinkPopupOptions

AuthViewModel Property

\if KO 인증 창에 연결할 선택적 뷰 모델을 가져오거나 설정합니다. \endif \if EN Gets or sets the optional view model to associate with the authentication window. \endif

BlinkIntervalMs Property

\if KO 한 방향 깜빡임 전환 간격을 밀리초 단위로 가져오거나 설정합니다. 한 번의 왕복에는 이 값의 두 배가 걸립니다. \endif \if EN Gets or sets the one-way blink transition interval in milliseconds. A round trip takes twice this value. \endif

BlinkRepeatCount Property

\if KO 깜빡임 반복 횟수를 가져오거나 설정합니다. 0은 무한 반복을 의미합니다. \endif \if EN Gets or sets the blink repetition count. Zero means repeat indefinitely. \endif

BlockAltF4 Property

\if KO Alt+F4 시스템 닫기 동작을 차단할지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether the Alt+F4 system-close action is blocked. \endif

CancelText Property

\if KO 취소 버튼의 텍스트를 가져오거나 설정합니다. 또는 빈 문자열이면 버튼을 숨깁니다. \endif \if EN Gets or sets the Cancel button text. A or empty value hides the button. \endif

Color1 Property

\if KO 깜빡임 애니메이션의 시작 배경색을 가져오거나 설정합니다. \endif \if EN Gets or sets the starting background color of the blinking animation. \endif

Color2 Property

\if KO 깜빡임 애니메이션의 종료 배경색을 가져오거나 설정합니다. \endif \if EN Gets or sets the ending background color of the blinking animation. \endif

Content Property

\if KO 팝업에 표시할 사용자 지정 콘텐츠를 가져오거나 설정합니다. \endif \if EN Gets or sets custom content to display in the popup. \endif

FixedSize Property

\if KO 팝업에 적용할 선택적 고정 너비와 높이를 가져오거나 설정합니다. \endif \if EN Gets or sets the optional fixed width and height applied to the popup. \endif

ForegroundColor Property

\if KO 제목, 메시지 및 아이콘에 사용할 전경색을 가져오거나 설정합니다. \endif \if EN Gets or sets the foreground color used for titles, messages, and icons. \endif

Fullscreen Property

\if KO 팝업이 모니터 전체 크기를 사용할지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether the popup uses the full monitor size. \endif

IsModal Property

\if KO 팝업을 모달 창으로 표시할지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether the popup is displayed as a modal window. \endif

Message Property

\if KO 사용자 지정 콘텐츠가 없을 때 중앙에 표시할 메시지를 가져오거나 설정합니다. \endif \if EN Gets or sets the message displayed in the center when no custom content is supplied. \endif

MessageFontSize Property

\if KO 메시지의 글꼴 크기를 가져오거나 설정합니다. \endif \if EN Gets or sets the message font size. \endif

OkText Property

\if KO 확인 버튼의 텍스트를 가져오거나 설정합니다. 또는 빈 문자열이면 버튼을 숨깁니다. \endif \if EN Gets or sets the OK button text. A or empty value hides the button. \endif

Opacity1 Property

\if KO 깜빡임 애니메이션의 시작 불투명도를 가져오거나 설정합니다. \endif \if EN Gets or sets the starting opacity of the blinking animation. \endif

Opacity2 Property

\if KO 깜빡임 애니메이션의 종료 불투명도를 가져오거나 설정합니다. \endif \if EN Gets or sets the ending opacity of the blinking animation. \endif

RequireAuthOnCancel Property

\if KO 취소 버튼을 클릭할 때 인증을 요구할지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether authentication is required when the Cancel button is clicked. \endif

RequireAuthOnOk Property

\if KO 확인 버튼을 클릭할 때 인증을 요구할지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether authentication is required when the OK button is clicked. \endif

Title Property

\if KO 상단 표시줄과 중앙 카드에 표시할 제목을 가져오거나 설정합니다. \endif \if EN Gets or sets the title displayed in the top bar and center card. \endif

TitleFontSize Property

\if KO 상단 및 중앙 제목의 글꼴 크기를 가져오거나 설정합니다. \endif \if EN Gets or sets the font size of the top and center titles. \endif

TopMost Property

\if KO 팝업을 항상 위 창으로 유지할지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether the popup remains a topmost window. \endif

UseBlink Property

\if KO 배경 깜빡임 효과를 사용할지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether the background blinking effect is enabled. \endif

UseContentCard Property

\if KO 제목과 버튼을 담는 중앙 콘텐츠 카드를 표시할지 여부를 가져오거나 설정합니다. \endif \if EN Gets or sets whether the center content card containing the title and buttons is displayed. \endif

DoNothingEnterActionResult

#ctor Method

\if KO 무동작 결과를 초기화합니다. \endif \if EN Initializes a no-op result. \endif

EnterActionResult

#ctor Method

\if KO 지정한 처리 상태로 결과를 초기화합니다. \endif \if EN Initializes a result with the specified processing state. \endif

result— \if KO Enter 동작의 처리 상태입니다. \endif \if EN The processing state of the Enter action. \endif
#ctor Method

\if KO 지정한 처리 상태와 메시지로 결과를 초기화합니다. \endif \if EN Initializes a result with the specified processing state and message. \endif

result— \if KO Enter 동작의 처리 상태입니다. \endif \if EN The processing state of the Enter action. \endif
message— \if KO 사용자에게 표시할 메시지입니다. \endif \if EN The message to display to the user. \endif
IsAccepted Method

\if KO 현재 결과가 입력을 계속 진행할 수 있는 상태인지 확인합니다. \endif \if EN Determines whether the current result permits the input flow to continue. \endif

반환: \if KO 결과가 성공 또는 무동작이면 , 거부이면 입니다. \endif \if EN for a successful or no-op result; for a rejected result. \endif

Show Method

\if KO 결과 메시지와 상태 색상을 지정한 텍스트 상자에 UI 스레드에서 표시합니다. \endif \if EN Displays the result message and status color in the specified text box on the UI thread. \endif

textBox— \if KO 결과를 표시할 텍스트 상자입니다. \endif \if EN The text box in which to display the result. \endif
Action Property

\if KO 결과와 함께 실행할 선택적 후속 동작을 가져오거나 설정합니다. \endif \if EN Gets or sets an optional follow-up action associated with the result. \endif

Message Property

\if KO 사용자에게 표시할 결과 메시지를 가져오거나 설정합니다. \endif \if EN Gets or sets the result message displayed to the user. \endif

Result Property

\if KO Enter 동작의 처리 상태를 가져오거나 설정합니다. \endif \if EN Gets or sets the processing state of the Enter action. \endif

IEnterActionProvider

ExecuteAsync Method

\if KO Enter 입력에 연결된 동작을 비동기로 실행합니다. \endif \if EN Asynchronously executes the action associated with Enter input. \endif

반환: \if KO Enter 동작 결과를 생성하는 작업입니다. \endif \if EN A task that produces the Enter-action result. \endif

Read Method

\if KO 공급자가 보유한 현재 입력 값을 읽습니다. \endif \if EN Reads the current input value held by the provider. \endif

반환: \if KO 현재 입력 값입니다. \endif \if EN The current input value. \endif

PlacementTarget Property

\if KO 키보드가 배치되는 대상 WPF 객체를 가져오거나 설정합니다. \endif \if EN Gets or sets the WPF object relative to which the keyboard is placed. \endif

IPopupService

Close Method

\if KO 지정한 팝업 창을 닫습니다. \endif \if EN Closes the specified popup window. \endif

window— \if KO 닫을 팝업 창입니다. \endif \if EN The popup window to close. \endif
CloseAll Method

\if KO 서비스가 관리하는 열린 모든 깜빡임 팝업을 닫습니다. \endif \if EN Closes every open blinking popup managed by the service. \endif

CloseOwnedBy Method

\if KO 지정한 창이 소유한 모든 팝업을 닫습니다. \endif \if EN Closes all popups owned by the specified window. \endif

owner— \if KO 닫을 팝업들의 소유자 창입니다. \endif \if EN The owner of the popups to close. \endif
GetActive Method

\if KO 현재 활성화된 깜빡임 팝업을 가져옵니다. \endif \if EN Gets the currently active blinking popup. \endif

반환: \if KO 활성 팝업 창이거나 활성 팝업이 없으면 입니다. \endif \if EN The active popup window, or when none is active. \endif

RegisterWindow Method

\if KO 외부에서 생성한 팝업 창과 해당 옵션을 서비스의 관리 대상으로 등록합니다. \endif \if EN Registers an externally created popup window and its options for management by the service. \endif

window— \if KO 등록할 팝업 창입니다. \endif \if EN The popup window to register. \endif
options— \if KO 창에 적용된 팝업 옵션입니다. \endif \if EN The popup options applied to the window. \endif
ShowBlink Method

\if KO 지정한 옵션으로 깜빡임 팝업을 표시합니다. \endif \if EN Displays a blinking popup using the specified options. \endif

owner— \if KO 팝업을 소유할 창이거나 소유자가 없으면 입니다. \endif \if EN The window that owns the popup, or for no owner. \endif
options— \if KO 팝업 표시 옵션입니다. \endif \if EN The popup display options. \endif

반환: \if KO 확인이면 , 취소이면 , 결과가 없으면 입니다. \endif \if EN for OK, for Cancel, or when no result is available. \endif

ShowBlink Method

\if KO 깜빡임 팝업을 표시하고 생성된 창 참조를 반환합니다. \endif \if EN Displays a blinking popup and returns the created window reference. \endif

owner— \if KO 팝업을 소유할 창이거나 소유자가 없으면 입니다. \endif \if EN The window that owns the popup, or for no owner. \endif
options— \if KO 팝업 표시 옵션입니다. \endif \if EN The popup display options. \endif
windowRef— \if KO 생성된 팝업 창을 받습니다. \endif \if EN Receives the created popup window. \endif

반환: \if KO 확인이면 , 취소이면 , 결과가 없으면 입니다. \endif \if EN for OK, for Cancel, or when no result is available. \endif

ShowBlinkAsync Method

\if KO 선택적 자동 닫기와 취소를 지원하며 깜빡임 팝업을 비동기로 표시합니다. \endif \if EN Asynchronously displays a blinking popup with optional automatic closing and cancellation. \endif

owner— \if KO 팝업을 소유할 창이거나 소유자가 없으면 입니다. \endif \if EN The window that owns the popup, or for no owner. \endif
options— \if KO 팝업 표시 옵션입니다. \endif \if EN The popup display options. \endif
autoCloseAfter— \if KO 자동으로 닫을 때까지의 시간이거나 자동 닫기를 사용하지 않으면 입니다. \endif \if EN The duration before automatic closing, or to disable automatic closing. \endif
cancellationToken— \if KO 비동기 대기를 취소하는 토큰입니다. \endif \if EN A token used to cancel the asynchronous wait. \endif

반환: \if KO 팝업 결과를 생성하는 작업입니다. \endif \if EN A task that produces the popup result. \endif

TryGetOptions Method

\if KO 지정한 팝업에 적용된 옵션을 가져오려고 시도합니다. \endif \if EN Attempts to get the options applied to the specified popup. \endif

window— \if KO 옵션을 조회할 팝업 창입니다. \endif \if EN The popup window whose options are requested. \endif
options— \if KO 조회에 성공하면 적용된 옵션을 받습니다. \endif \if EN Receives the applied options when the lookup succeeds. \endif

반환: \if KO 옵션을 찾았으면 , 그렇지 않으면 입니다. \endif \if EN if the options were found; otherwise, . \endif

TryGetOwnerOptions Method

\if KO 지정한 자식 팝업의 소유자 창에 적용된 옵션을 가져오려고 시도합니다. \endif \if EN Attempts to get the options applied to the owner of the specified child popup. \endif

window— \if KO 소유자 옵션을 조회할 자식 팝업 창입니다. \endif \if EN The child popup whose owner options are requested. \endif
ownerOptions— \if KO 조회에 성공하면 소유자 창에 적용된 옵션을 받습니다. \endif \if EN Receives the options applied to the owner window when the lookup succeeds. \endif

반환: \if KO 소유자 옵션을 찾았으면 , 그렇지 않으면 입니다. \endif \if EN if the owner options were found; otherwise, . \endif

KeyboardInputMode

Full Field

\if KO 전체 문자 및 숫자 키보드를 사용합니다. \endif \if EN Uses the full alphanumeric keyboard. \endif

Numeric Field

\if KO 숫자 전용 키보드를 사용합니다. \endif \if EN Uses a numeric-only keyboard. \endif

KeyData

#ctor Method

\if KO 언어별 및 Shift 상태별 키 값으로 인스턴스를 초기화합니다. \endif \if EN Initializes an instance with language-specific and Shift-specific key values. \endif

defaultKey— \if KO 기본 키 값입니다. \endif \if EN The default key value. \endif
shiftKey— \if KO Shift 상태의 기본 키 값입니다. \endif \if EN The shifted default key value. \endif
korKey— \if KO 한국어 키 값입니다. \endif \if EN The Korean key value. \endif
korShiftKey— \if KO Shift 상태의 한국어 키 값입니다. \endif \if EN The shifted Korean key value. \endif
chnKey— \if KO 중국어 키 값입니다. \endif \if EN The Chinese key value. \endif
chnShiftKey— \if KO Shift 상태의 중국어 키 값입니다. \endif \if EN The shifted Chinese key value. \endif
ChnKey Property

\if KO 중국어 키 값을 가져오거나 설정합니다. \endif \if EN Gets or sets the Chinese key value. \endif

ChnShiftKey Property

\if KO Shift 상태의 중국어 키 값을 가져오거나 설정합니다. \endif \if EN Gets or sets the shifted Chinese key value. \endif

DefaultKey Property

\if KO 기본 키 값을 가져오거나 설정합니다. \endif \if EN Gets or sets the default key value. \endif

KorKey Property

\if KO 한국어 키 값을 가져오거나 설정합니다. \endif \if EN Gets or sets the Korean key value. \endif

KorShiftKey Property

\if KO Shift 상태의 한국어 키 값을 가져오거나 설정합니다. \endif \if EN Gets or sets the shifted Korean key value. \endif

ShiftKey Property

\if KO Shift 상태의 기본 키 값을 가져오거나 설정합니다. \endif \if EN Gets or sets the shifted default key value. \endif

LanguageCode

en_US Field

\if KO 미국 영어를 나타냅니다. \endif \if EN Represents English (United States). \endif

ko_KR Field

\if KO 대한민국 한국어를 나타냅니다. \endif \if EN Represents Korean (Republic of Korea). \endif

vi_VN Field

\if KO 베트남어를 나타냅니다. \endif \if EN Represents Vietnamese (Vietnam). \endif

zh_CN Field

\if KO 중국 간체 중국어를 나타냅니다. \endif \if EN Represents Simplified Chinese (China). \endif

NgEnterActionResult

#ctor Method

\if KO 선택적 오류 메시지로 거부 결과를 초기화합니다. \endif \if EN Initializes a rejected result with an optional error message. \endif

message— \if KO 사용자에게 표시할 오류 메시지입니다. \endif \if EN The error message to display to the user. \endif

OkEnterActionResult

#ctor Method

\if KO 선택적 성공 메시지로 승인 결과를 초기화합니다. \endif \if EN Initializes an accepted result with an optional success message. \endif

message— \if KO 사용자에게 표시할 성공 메시지입니다. \endif \if EN The success message to display to the user. \endif

SpecialButtonName

InputModeBtn Field

\if KO 입력 모드 전환 버튼의 식별자입니다. \endif \if EN Identifies the input-mode switch button. \endif

LangBtn Field

\if KO 언어 전환 버튼의 식별자입니다. \endif \if EN Identifies the language-switch button. \endif

VkLayout

Decimal Field

\if KO 소수점 숫자 입력 레이아웃을 사용합니다. \endif \if EN Uses the decimal numeric-input layout. \endif

Numeric Field

\if KO 정수 숫자 입력 레이아웃을 사용합니다. \endif \if EN Uses the integer numeric-input layout. \endif

Password Field

\if KO 암호 입력을 위한 마스킹 레이아웃을 사용합니다. \endif \if EN Uses a masked layout for password input. \endif

Text Field

\if KO 일반 텍스트 입력 레이아웃을 사용합니다. \endif \if EN Uses the general text-input layout. \endif