Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Thick-Common
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘栩锋
Thick-Common
Commits
f668ae25
Commit
f668ae25
authored
May 07, 2020
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复 密码输入界面按虚拟键盘会出错
parent
271a7bd3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
1 deletion
+46
-1
KeyboardBehavior.cs
...trolLibrary/FLY.ControlLibrary/UI.OSK/KeyboardBehavior.cs
+45
-0
WdPassword.xaml.cs
Project.FLY.Thick.Base/FLY.Thick.Base.UI/WdPassword.xaml.cs
+1
-1
No files found.
Project.FLY.ControlLibrary/FLY.ControlLibrary/UI.OSK/KeyboardBehavior.cs
View file @
f668ae25
...
...
@@ -181,6 +181,9 @@ namespace FLY.ControlLibrary.UI.OSK
w
.
Closed
+=
(
s
,
e
)
=>
{
IsKeyboardOnShow
=
false
;
if
(
window
==
null
)
return
;
if
(
window
.
WindowState
==
WindowState
.
Normal
)
{
//当window 为2级时, 关闭虚拟键盘,window有概率不刷新
//移动一下界面。 强制令它刷新
...
...
@@ -190,6 +193,48 @@ namespace FLY.ControlLibrary.UI.OSK
};
kb
.
Open
(
tb
);
}
public
static
void
PopPad
(
TextBox
tb
,
Window
parentWindow
)
{
IVirtualKeyboard
kb
;
string
param
=
""
;
if
((
tb
.
Tag
is
string
))
param
=
(
string
)
tb
.
Tag
;
param
=
param
.
ToLower
();
if
(
param
.
Contains
(
"full"
))
{
var
fkb
=
new
WdFullKeyboard
();
if
(
param
.
Contains
(
"password"
)
||
param
.
Contains
(
"pw"
))
fkb
.
IsPwMode
=
true
;
kb
=
fkb
;
}
else
kb
=
new
WdNumKeyboard
();
Window
w
=
(
Window
)
kb
;
Window
window
=
parentWindow
;
w
.
Owner
=
parentWindow
;
IsKeyboardOnShow
=
true
;
w
.
Closed
+=
(
s
,
e
)
=>
{
IsKeyboardOnShow
=
false
;
if
(
window
==
null
)
return
;
if
(
window
.
WindowState
==
WindowState
.
Normal
)
{
//当window 为2级时, 关闭虚拟键盘,window有概率不刷新
//移动一下界面。 强制令它刷新
//window.UpdateLayout() 无效
window
.
Left
+=
1
;
}
};
kb
.
Open
(
tb
);
}
}
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/WdPassword.xaml.cs
View file @
f668ae25
...
...
@@ -108,7 +108,7 @@ namespace FLY.Thick.Base.UI
var
textbox
=
s
as
TextBox
;
passwordbox
.
Password
=
textbox
.
Text
;
};
FLY
.
ControlLibrary
.
UI
.
OSK
.
KeyboardBehavior
.
PopPad
(
tbPw
);
FLY
.
ControlLibrary
.
UI
.
OSK
.
KeyboardBehavior
.
PopPad
(
tbPw
,
this
);
}
private
void
Window_Loaded
(
object
sender
,
RoutedEventArgs
e
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment