Dreamine.UI.WinForms 1.0.1
Dreamine.UI.WinForms 사용자 인터페이스 기능과 구성 요소를 제공합니다.
로딩중...
검색중...
일치하는것 없음
Dreamine.UI.WinForms.VirtualKeyboard.DreamineVirtualKeyboardAssist 클래스 참조

더 자세히 ...

정적 Public 멤버 함수

static void Attach (DreamineTextBox textBox, VkLayout layout=VkLayout.Text)
static void Detach (DreamineTextBox textBox)

정적 Private 멤버 함수

static void Show (DreamineTextBox textBox, VkLayout layout)

정적 Private 속성

static readonly Dictionary< DreamineTextBox, DreamineVirtualKeyboardForm > _open = new()

상세한 설명

DreamineTextBox 포커스에 화면 키보드의 표시와 수명 주기를 연결합니다.

DreamineVirtualKeyboardAssist.cs 파일의 14 번째 라인에서 정의되었습니다.

멤버 함수 문서화

◆ Attach()

void Dreamine.UI.WinForms.VirtualKeyboard.DreamineVirtualKeyboardAssist.Attach ( DreamineTextBox textBox,
VkLayout layout = VkLayout::Text )
inlinestatic

지정한 텍스트 상자가 포커스를 받을 때 선택한 레이아웃의 화면 키보드를 표시하도록 연결합니다.

매개변수
textBox화면 키보드를 연결할 Dreamine 텍스트 상자입니다.
layout표시할 키보드 레이아웃입니다.
예외
NullReferenceExceptiontextBoxnull일 때 발생합니다.

DreamineVirtualKeyboardAssist.cs 파일의 58 번째 라인에서 정의되었습니다.

59 {
60 textBox.Enter += (_, _) => Show(textBox, layout);
61 }

다음을 참조함 : Show().

이 함수 내부에서 호출하는 함수들에 대한 그래프입니다.:

◆ Detach()

void Dreamine.UI.WinForms.VirtualKeyboard.DreamineVirtualKeyboardAssist.Detach ( DreamineTextBox textBox)
inlinestatic

열려 있는 화면 키보드를 닫고 지정한 텍스트 상자의 연결 상태를 제거합니다.

매개변수
textBox화면 키보드 연결을 해제할 텍스트 상자입니다.

DreamineVirtualKeyboardAssist.cs 파일의 79 번째 라인에서 정의되었습니다.

80 {
81 if (_open.TryGetValue(textBox, out var form))
82 {
83 form.Close();
84 _open.Remove(textBox);
85 }
86 }

다음을 참조함 : _open.

◆ Show()

void Dreamine.UI.WinForms.VirtualKeyboard.DreamineVirtualKeyboardAssist.Show ( DreamineTextBox textBox,
VkLayout layout )
inlinestaticprivate

텍스트 상자 주변의 화면 작업 영역 안에 키보드 폼을 배치하여 표시합니다.

매개변수
textBox입력 대상이자 배치 기준인 텍스트 상자입니다.
layout키보드 폼에 사용할 레이아웃입니다.

DreamineVirtualKeyboardAssist.cs 파일의 112 번째 라인에서 정의되었습니다.

113 {
114 if (_open.ContainsKey(textBox))
115 return;
116
117 var screenLocation = textBox.Parent?.PointToScreen(textBox.Location) ?? Cursor.Position;
118 var form = new DreamineVirtualKeyboardForm(textBox, layout);
119 var workingArea = Screen.FromControl(textBox).WorkingArea;
120 var x = Math.Clamp(screenLocation.X, workingArea.Left, Math.Max(workingArea.Left, workingArea.Right - form.Width));
121 var y = screenLocation.Y + textBox.Height + 4;
122 if (y + form.Height > workingArea.Bottom)
123 y = Math.Max(workingArea.Top, screenLocation.Y - form.Height - 4);
124
125 form.Location = new System.Drawing.Point(x, y);
126 form.FormClosed += (_, _) => _open.Remove(textBox);
127
128 _open[textBox] = form;
129 form.Show();
130 }

다음을 참조함 : _open.

다음에 의해서 참조됨 : Attach().

이 함수를 호출하는 함수들에 대한 그래프입니다.:

멤버 데이터 문서화

◆ _open

readonly Dictionary<DreamineTextBox, DreamineVirtualKeyboardForm> Dreamine.UI.WinForms.VirtualKeyboard.DreamineVirtualKeyboardAssist._open = new()
staticprivate

open 값을 보관합니다.

DreamineVirtualKeyboardAssist.cs 파일의 24 번째 라인에서 정의되었습니다.

다음에 의해서 참조됨 : Detach(), Show().


이 클래스에 대한 문서화 페이지는 다음의 파일로부터 생성되었습니다.: