Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
Kivii.Client.Test
Project
Overview
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
示例代码
Kivii.Client.Test
Commits
020f4060
Commit
020f4060
authored
Dec 30, 2020
by
施晓雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新代码
parent
76fe86c3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
112 additions
and
62 deletions
+112
-62
Kivii.Client.Test.sln
Src/Kivii.Client.Test.sln
+6
-0
FrmMain.Designer.cs
Src/Kivii.Client.Test/Forms/FrmMain.Designer.cs
+91
-54
FrmMain.cs
Src/Kivii.Client.Test/Forms/FrmMain.cs
+8
-4
Kivii.Client.Test.V4.5.csproj
Src/Kivii.Client.Test/Kivii.Client.Test.V4.5.csproj
+7
-4
No files found.
Src/Kivii.Client.Test.sln
View file @
020f4060
...
@@ -5,6 +5,8 @@ VisualStudioVersion = 14.0.25420.1
...
@@ -5,6 +5,8 @@ VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kivii.Client.Test.V4.5", "Kivii.Client.Test\Kivii.Client.Test.V4.5.csproj", "{0327117D-548C-4EB4-AD86-13F914BD4D1F}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kivii.Client.Test.V4.5", "Kivii.Client.Test\Kivii.Client.Test.V4.5.csproj", "{0327117D-548C-4EB4-AD86-13F914BD4D1F}"
EndProject
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kivii.Common.V4.5", "..\..\..\K5\Platform-V5.4\Kivii.Common\Src\Kivii.Common.V4.5.csproj", "{587A47FE-0AE8-4649-9364-686E8F6C044B}"
EndProject
Global
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Any CPU = Debug|Any CPU
...
@@ -15,6 +17,10 @@ Global
...
@@ -15,6 +17,10 @@ Global
{0327117D-548C-4EB4-AD86-13F914BD4D1F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0327117D-548C-4EB4-AD86-13F914BD4D1F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0327117D-548C-4EB4-AD86-13F914BD4D1F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0327117D-548C-4EB4-AD86-13F914BD4D1F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0327117D-548C-4EB4-AD86-13F914BD4D1F}.Release|Any CPU.Build.0 = Release|Any CPU
{0327117D-548C-4EB4-AD86-13F914BD4D1F}.Release|Any CPU.Build.0 = Release|Any CPU
{587A47FE-0AE8-4649-9364-686E8F6C044B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{587A47FE-0AE8-4649-9364-686E8F6C044B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{587A47FE-0AE8-4649-9364-686E8F6C044B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{587A47FE-0AE8-4649-9364-686E8F6C044B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
HideSolutionNode = FALSE
...
...
Src/Kivii.Client.Test/Forms/FrmMain.Designer.cs
View file @
020f4060
...
@@ -50,9 +50,12 @@
...
@@ -50,9 +50,12 @@
this
.
groupBox4
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox4
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
dgvResults
=
new
System
.
Windows
.
Forms
.
DataGridView
();
this
.
dgvResults
=
new
System
.
Windows
.
Forms
.
DataGridView
();
this
.
groupBox3
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox3
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
btnSave
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnLoadData
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnClearData
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnClearData
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnLoadData
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnSave
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
cbxUseTokenCookie
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
label7
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
tbxToken
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
panel1
.
SuspendLayout
();
this
.
panel1
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
groupBox2
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
...
@@ -65,57 +68,58 @@
...
@@ -65,57 +68,58 @@
// label1
// label1
//
//
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
AutoSize
=
true
;
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
29
,
34
);
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
27
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
71
,
12
);
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
53
,
12
);
this
.
label1
.
TabIndex
=
0
;
this
.
label1
.
TabIndex
=
0
;
this
.
label1
.
Text
=
"
ServiceUrl:
"
;
this
.
label1
.
Text
=
"
服务路径
"
;
//
//
// tbxServiceUrl
// tbxServiceUrl
//
//
this
.
tbxServiceUrl
.
Location
=
new
System
.
Drawing
.
Point
(
106
,
31
);
this
.
tbxServiceUrl
.
Location
=
new
System
.
Drawing
.
Point
(
71
,
24
);
this
.
tbxServiceUrl
.
Name
=
"tbxServiceUrl"
;
this
.
tbxServiceUrl
.
Name
=
"tbxServiceUrl"
;
this
.
tbxServiceUrl
.
Size
=
new
System
.
Drawing
.
Size
(
1
8
3
,
21
);
this
.
tbxServiceUrl
.
Size
=
new
System
.
Drawing
.
Size
(
1
4
3
,
21
);
this
.
tbxServiceUrl
.
TabIndex
=
0
;
this
.
tbxServiceUrl
.
TabIndex
=
0
;
this
.
tbxServiceUrl
.
Text
=
"http://www.kivii.org/"
;
this
.
tbxServiceUrl
.
Text
=
"http://www.kivii.org/"
;
//
//
// label2
// label2
//
//
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
AutoSize
=
true
;
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
29
,
62
);
this
.
label2
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
54
);
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Name
=
"label2"
;
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
5
9
,
12
);
this
.
label2
.
Size
=
new
System
.
Drawing
.
Size
(
2
9
,
12
);
this
.
label2
.
TabIndex
=
0
;
this
.
label2
.
TabIndex
=
0
;
this
.
label2
.
Text
=
"
UserName:
"
;
this
.
label2
.
Text
=
"
用户
"
;
//
//
// tbxUserName
// tbxUserName
//
//
this
.
tbxUserName
.
Location
=
new
System
.
Drawing
.
Point
(
106
,
59
);
this
.
tbxUserName
.
Location
=
new
System
.
Drawing
.
Point
(
47
,
51
);
this
.
tbxUserName
.
Name
=
"tbxUserName"
;
this
.
tbxUserName
.
Name
=
"tbxUserName"
;
this
.
tbxUserName
.
Size
=
new
System
.
Drawing
.
Size
(
1
83
,
21
);
this
.
tbxUserName
.
Size
=
new
System
.
Drawing
.
Size
(
1
16
,
21
);
this
.
tbxUserName
.
TabIndex
=
1
;
this
.
tbxUserName
.
TabIndex
=
1
;
this
.
tbxUserName
.
Text
=
"administrator"
;
this
.
tbxUserName
.
Text
=
"administrator"
;
//
//
// label3
// label3
//
//
this
.
label3
.
AutoSize
=
true
;
this
.
label3
.
AutoSize
=
true
;
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
29
,
92
);
this
.
label3
.
Location
=
new
System
.
Drawing
.
Point
(
175
,
54
);
this
.
label3
.
Name
=
"label3"
;
this
.
label3
.
Name
=
"label3"
;
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
5
9
,
12
);
this
.
label3
.
Size
=
new
System
.
Drawing
.
Size
(
2
9
,
12
);
this
.
label3
.
TabIndex
=
0
;
this
.
label3
.
TabIndex
=
0
;
this
.
label3
.
Text
=
"
Password:
"
;
this
.
label3
.
Text
=
"
密码
"
;
//
//
// tbxPassword
// tbxPassword
//
//
this
.
tbxPassword
.
Location
=
new
System
.
Drawing
.
Point
(
106
,
89
);
this
.
tbxPassword
.
Location
=
new
System
.
Drawing
.
Point
(
210
,
51
);
this
.
tbxPassword
.
Name
=
"tbxPassword"
;
this
.
tbxPassword
.
Name
=
"tbxPassword"
;
this
.
tbxPassword
.
PasswordChar
=
'*'
;
this
.
tbxPassword
.
PasswordChar
=
'*'
;
this
.
tbxPassword
.
Size
=
new
System
.
Drawing
.
Size
(
183
,
21
);
this
.
tbxPassword
.
Size
=
new
System
.
Drawing
.
Size
(
92
,
21
);
this
.
tbxPassword
.
TabIndex
=
2
;
this
.
tbxPassword
.
TabIndex
=
2
;
this
.
tbxPassword
.
Text
=
"www.kivii.com"
;
//
//
// btnLogin
// btnLogin
//
//
this
.
btnLogin
.
Location
=
new
System
.
Drawing
.
Point
(
31
,
157
);
this
.
btnLogin
.
Location
=
new
System
.
Drawing
.
Point
(
14
,
129
);
this
.
btnLogin
.
Name
=
"btnLogin"
;
this
.
btnLogin
.
Name
=
"btnLogin"
;
this
.
btnLogin
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
btnLogin
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
btnLogin
.
TabIndex
=
4
;
this
.
btnLogin
.
TabIndex
=
4
;
...
@@ -126,7 +130,7 @@
...
@@ -126,7 +130,7 @@
// btnLogout
// btnLogout
//
//
this
.
btnLogout
.
Enabled
=
false
;
this
.
btnLogout
.
Enabled
=
false
;
this
.
btnLogout
.
Location
=
new
System
.
Drawing
.
Point
(
2
14
,
157
);
this
.
btnLogout
.
Location
=
new
System
.
Drawing
.
Point
(
2
27
,
129
);
this
.
btnLogout
.
Name
=
"btnLogout"
;
this
.
btnLogout
.
Name
=
"btnLogout"
;
this
.
btnLogout
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
btnLogout
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
btnLogout
.
TabIndex
=
5
;
this
.
btnLogout
.
TabIndex
=
5
;
...
@@ -137,18 +141,18 @@
...
@@ -137,18 +141,18 @@
// label4
// label4
//
//
this
.
label4
.
AutoSize
=
true
;
this
.
label4
.
AutoSize
=
true
;
this
.
label4
.
Location
=
new
System
.
Drawing
.
Point
(
29
,
122
);
this
.
label4
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
78
);
this
.
label4
.
Name
=
"label4"
;
this
.
label4
.
Name
=
"label4"
;
this
.
label4
.
Size
=
new
System
.
Drawing
.
Size
(
77
,
12
);
this
.
label4
.
Size
=
new
System
.
Drawing
.
Size
(
29
,
12
);
this
.
label4
.
TabIndex
=
0
;
this
.
label4
.
TabIndex
=
0
;
this
.
label4
.
Text
=
"
DisplayName:
"
;
this
.
label4
.
Text
=
"
姓名
"
;
//
//
// tbxDisplayName
// tbxDisplayName
//
//
this
.
tbxDisplayName
.
Enabled
=
false
;
this
.
tbxDisplayName
.
Enabled
=
false
;
this
.
tbxDisplayName
.
Location
=
new
System
.
Drawing
.
Point
(
106
,
119
);
this
.
tbxDisplayName
.
Location
=
new
System
.
Drawing
.
Point
(
47
,
75
);
this
.
tbxDisplayName
.
Name
=
"tbxDisplayName"
;
this
.
tbxDisplayName
.
Name
=
"tbxDisplayName"
;
this
.
tbxDisplayName
.
Size
=
new
System
.
Drawing
.
Size
(
183
,
21
);
this
.
tbxDisplayName
.
Size
=
new
System
.
Drawing
.
Size
(
255
,
21
);
this
.
tbxDisplayName
.
TabIndex
=
3
;
this
.
tbxDisplayName
.
TabIndex
=
3
;
//
//
// panel1
// panel1
...
@@ -169,16 +173,16 @@
...
@@ -169,16 +173,16 @@
this
.
groupBox2
.
Controls
.
Add
(
this
.
tbxFullNameContains
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
tbxFullNameContains
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label5
);
this
.
groupBox2
.
Controls
.
Add
(
this
.
label5
);
this
.
groupBox2
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
groupBox2
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
205
);
this
.
groupBox2
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
161
);
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Name
=
"groupBox2"
;
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
319
,
2
45
);
this
.
groupBox2
.
Size
=
new
System
.
Drawing
.
Size
(
319
,
2
89
);
this
.
groupBox2
.
TabIndex
=
1
;
this
.
groupBox2
.
TabIndex
=
1
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
TabStop
=
false
;
this
.
groupBox2
.
Text
=
"查询人员示例"
;
this
.
groupBox2
.
Text
=
"查询人员示例"
;
//
//
// tbxFirstNameIn
// tbxFirstNameIn
//
//
this
.
tbxFirstNameIn
.
Location
=
new
System
.
Drawing
.
Point
(
106
,
73
);
this
.
tbxFirstNameIn
.
Location
=
new
System
.
Drawing
.
Point
(
65
,
54
);
this
.
tbxFirstNameIn
.
Name
=
"tbxFirstNameIn"
;
this
.
tbxFirstNameIn
.
Name
=
"tbxFirstNameIn"
;
this
.
tbxFirstNameIn
.
Size
=
new
System
.
Drawing
.
Size
(
183
,
21
);
this
.
tbxFirstNameIn
.
Size
=
new
System
.
Drawing
.
Size
(
183
,
21
);
this
.
tbxFirstNameIn
.
TabIndex
=
7
;
this
.
tbxFirstNameIn
.
TabIndex
=
7
;
...
@@ -186,25 +190,25 @@
...
@@ -186,25 +190,25 @@
// label6
// label6
//
//
this
.
label6
.
AutoSize
=
true
;
this
.
label6
.
AutoSize
=
true
;
this
.
label6
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
78
);
this
.
label6
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
57
);
this
.
label6
.
Name
=
"label6"
;
this
.
label6
.
Name
=
"label6"
;
this
.
label6
.
Size
=
new
System
.
Drawing
.
Size
(
7
1
,
12
);
this
.
label6
.
Size
=
new
System
.
Drawing
.
Size
(
4
1
,
12
);
this
.
label6
.
TabIndex
=
4
;
this
.
label6
.
TabIndex
=
4
;
this
.
label6
.
Text
=
"
FirstNameIn
"
;
this
.
label6
.
Text
=
"
姓包含
"
;
//
//
// btnQueryMember
// btnQueryMember
//
//
this
.
btnQueryMember
.
Location
=
new
System
.
Drawing
.
Point
(
31
,
210
);
this
.
btnQueryMember
.
Location
=
new
System
.
Drawing
.
Point
(
254
,
26
);
this
.
btnQueryMember
.
Name
=
"btnQueryMember"
;
this
.
btnQueryMember
.
Name
=
"btnQueryMember"
;
this
.
btnQueryMember
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
btnQueryMember
.
Size
=
new
System
.
Drawing
.
Size
(
48
,
49
);
this
.
btnQueryMember
.
TabIndex
=
8
;
this
.
btnQueryMember
.
TabIndex
=
8
;
this
.
btnQueryMember
.
Text
=
"
Query
"
;
this
.
btnQueryMember
.
Text
=
"
查询
"
;
this
.
btnQueryMember
.
UseVisualStyleBackColor
=
true
;
this
.
btnQueryMember
.
UseVisualStyleBackColor
=
true
;
this
.
btnQueryMember
.
Click
+=
new
System
.
EventHandler
(
this
.
btnQueryMember_Click
);
this
.
btnQueryMember
.
Click
+=
new
System
.
EventHandler
(
this
.
btnQueryMember_Click
);
//
//
// tbxFullNameContains
// tbxFullNameContains
//
//
this
.
tbxFullNameContains
.
Location
=
new
System
.
Drawing
.
Point
(
106
,
3
6
);
this
.
tbxFullNameContains
.
Location
=
new
System
.
Drawing
.
Point
(
65
,
2
6
);
this
.
tbxFullNameContains
.
Name
=
"tbxFullNameContains"
;
this
.
tbxFullNameContains
.
Name
=
"tbxFullNameContains"
;
this
.
tbxFullNameContains
.
Size
=
new
System
.
Drawing
.
Size
(
183
,
21
);
this
.
tbxFullNameContains
.
Size
=
new
System
.
Drawing
.
Size
(
183
,
21
);
this
.
tbxFullNameContains
.
TabIndex
=
6
;
this
.
tbxFullNameContains
.
TabIndex
=
6
;
...
@@ -212,20 +216,23 @@
...
@@ -212,20 +216,23 @@
// label5
// label5
//
//
this
.
label5
.
AutoSize
=
true
;
this
.
label5
.
AutoSize
=
true
;
this
.
label5
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
41
);
this
.
label5
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
29
);
this
.
label5
.
Name
=
"label5"
;
this
.
label5
.
Name
=
"label5"
;
this
.
label5
.
Size
=
new
System
.
Drawing
.
Size
(
101
,
12
);
this
.
label5
.
Size
=
new
System
.
Drawing
.
Size
(
53
,
12
);
this
.
label5
.
TabIndex
=
0
;
this
.
label5
.
TabIndex
=
0
;
this
.
label5
.
Text
=
"
FullNameContains
"
;
this
.
label5
.
Text
=
"
姓名包含
"
;
//
//
// groupBox1
// groupBox1
//
//
this
.
groupBox1
.
Controls
.
Add
(
this
.
tbxToken
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
cbxUseTokenCookie
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label1
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label1
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnLogout
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnLogout
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label2
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label2
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnLogin
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
btnLogin
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label3
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label3
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
tbxDisplayName
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
tbxDisplayName
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label7
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label4
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
label4
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
tbxPassword
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
tbxPassword
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
tbxServiceUrl
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
tbxServiceUrl
);
...
@@ -233,7 +240,7 @@
...
@@ -233,7 +240,7 @@
this
.
groupBox1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Top
;
this
.
groupBox1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Top
;
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
319
,
205
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
319
,
161
);
this
.
groupBox1
.
TabIndex
=
0
;
this
.
groupBox1
.
TabIndex
=
0
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"配置及登陆信息"
;
this
.
groupBox1
.
Text
=
"配置及登陆信息"
;
...
@@ -282,15 +289,15 @@
...
@@ -282,15 +289,15 @@
this
.
groupBox3
.
TabStop
=
false
;
this
.
groupBox3
.
TabStop
=
false
;
this
.
groupBox3
.
Text
=
"操作"
;
this
.
groupBox3
.
Text
=
"操作"
;
//
//
// btn
Save
// btn
ClearData
//
//
this
.
btn
Save
.
Location
=
new
System
.
Drawing
.
Point
(
394
,
34
);
this
.
btn
ClearData
.
Location
=
new
System
.
Drawing
.
Point
(
151
,
34
);
this
.
btn
Save
.
Name
=
"btnSave
"
;
this
.
btn
ClearData
.
Name
=
"btnClearData
"
;
this
.
btn
Save
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
btn
ClearData
.
Size
=
new
System
.
Drawing
.
Size
(
110
,
23
);
this
.
btn
Save
.
TabIndex
=
0
;
this
.
btn
ClearData
.
TabIndex
=
2
;
this
.
btn
Save
.
Text
=
"保存结果
"
;
this
.
btn
ClearData
.
Text
=
"清空本地数据
"
;
this
.
btn
Save
.
UseVisualStyleBackColor
=
true
;
this
.
btn
ClearData
.
UseVisualStyleBackColor
=
true
;
this
.
btn
Save
.
Click
+=
new
System
.
EventHandler
(
this
.
btnSave
_Click
);
this
.
btn
ClearData
.
Click
+=
new
System
.
EventHandler
(
this
.
btnClearData
_Click
);
//
//
// btnLoadData
// btnLoadData
//
//
...
@@ -302,15 +309,41 @@
...
@@ -302,15 +309,41 @@
this
.
btnLoadData
.
UseVisualStyleBackColor
=
true
;
this
.
btnLoadData
.
UseVisualStyleBackColor
=
true
;
this
.
btnLoadData
.
Click
+=
new
System
.
EventHandler
(
this
.
btnLoadData_Click
);
this
.
btnLoadData
.
Click
+=
new
System
.
EventHandler
(
this
.
btnLoadData_Click
);
//
//
// btn
ClearData
// btn
Save
//
//
this
.
btnClearData
.
Location
=
new
System
.
Drawing
.
Point
(
151
,
34
);
this
.
btnSave
.
Location
=
new
System
.
Drawing
.
Point
(
394
,
34
);
this
.
btnClearData
.
Name
=
"btnClearData"
;
this
.
btnSave
.
Name
=
"btnSave"
;
this
.
btnClearData
.
Size
=
new
System
.
Drawing
.
Size
(
110
,
23
);
this
.
btnSave
.
Size
=
new
System
.
Drawing
.
Size
(
75
,
23
);
this
.
btnClearData
.
TabIndex
=
2
;
this
.
btnSave
.
TabIndex
=
0
;
this
.
btnClearData
.
Text
=
"清空本地数据"
;
this
.
btnSave
.
Text
=
"保存结果"
;
this
.
btnClearData
.
UseVisualStyleBackColor
=
true
;
this
.
btnSave
.
UseVisualStyleBackColor
=
true
;
this
.
btnClearData
.
Click
+=
new
System
.
EventHandler
(
this
.
btnClearData_Click
);
this
.
btnSave
.
Click
+=
new
System
.
EventHandler
(
this
.
btnSave_Click
);
//
// cbxUseTokenCookie
//
this
.
cbxUseTokenCookie
.
AutoSize
=
true
;
this
.
cbxUseTokenCookie
.
Location
=
new
System
.
Drawing
.
Point
(
224
,
27
);
this
.
cbxUseTokenCookie
.
Name
=
"cbxUseTokenCookie"
;
this
.
cbxUseTokenCookie
.
Size
=
new
System
.
Drawing
.
Size
(
78
,
16
);
this
.
cbxUseTokenCookie
.
TabIndex
=
6
;
this
.
cbxUseTokenCookie
.
Text
=
"获取Token"
;
this
.
cbxUseTokenCookie
.
UseVisualStyleBackColor
=
true
;
//
// label7
//
this
.
label7
.
AutoSize
=
true
;
this
.
label7
.
Location
=
new
System
.
Drawing
.
Point
(
12
,
105
);
this
.
label7
.
Name
=
"label7"
;
this
.
label7
.
Size
=
new
System
.
Drawing
.
Size
(
35
,
12
);
this
.
label7
.
TabIndex
=
0
;
this
.
label7
.
Text
=
"TOKEN"
;
//
// tbxToken
//
this
.
tbxToken
.
Location
=
new
System
.
Drawing
.
Point
(
47
,
102
);
this
.
tbxToken
.
Name
=
"tbxToken"
;
this
.
tbxToken
.
Size
=
new
System
.
Drawing
.
Size
(
255
,
21
);
this
.
tbxToken
.
TabIndex
=
7
;
//
//
// FrmMain
// FrmMain
//
//
...
@@ -361,5 +394,8 @@
...
@@ -361,5 +394,8 @@
private
System
.
Windows
.
Forms
.
Button
btnSave
;
private
System
.
Windows
.
Forms
.
Button
btnSave
;
private
System
.
Windows
.
Forms
.
Button
btnLoadData
;
private
System
.
Windows
.
Forms
.
Button
btnLoadData
;
private
System
.
Windows
.
Forms
.
Button
btnClearData
;
private
System
.
Windows
.
Forms
.
Button
btnClearData
;
private
System
.
Windows
.
Forms
.
CheckBox
cbxUseTokenCookie
;
private
System
.
Windows
.
Forms
.
TextBox
tbxToken
;
private
System
.
Windows
.
Forms
.
Label
label7
;
}
}
}
}
\ No newline at end of file
Src/Kivii.Client.Test/Forms/FrmMain.cs
View file @
020f4060
...
@@ -28,13 +28,14 @@ namespace Kivii.Client.Test.Forms
...
@@ -28,13 +28,14 @@ namespace Kivii.Client.Test.Forms
//设置请求超时
//设置请求超时
_client
.
Timeout
=
TimeSpan
.
FromSeconds
(
20
);
_client
.
Timeout
=
TimeSpan
.
FromSeconds
(
20
);
//定义一个身份认证数据包
//定义一个身份认证数据包
var
loginRequest
=
new
Authenticate
{
UserName
=
tbxUserName
.
Text
,
Password
=
tbxPassword
.
Text
,
provider
=
"Kivii"
};
var
loginRequest
=
new
Authenticate
{
UserName
=
tbxUserName
.
Text
,
Password
=
tbxPassword
.
Text
,
provider
=
"Kivii"
,
UseTokenCookie
=
cbxUseTokenCookie
.
Checked
};
//通过异步的方式POST数据到服务器
//通过异步的方式POST数据到服务器
var
tasks
=
_client
.
PostAsync
(
loginRequest
);
var
tasks
=
_client
.
PostAsync
(
loginRequest
);
//当成功获取到数据后,异步执行以下的代码
//当成功获取到数据后,异步执行以下的代码
tasks
.
Success
(
resp
=>
{
tasks
.
Success
(
resp
=>
{
btnLogin
.
Enabled
=
resp
.
DisplayName
.
IsNullOrEmpty
();
btnLogin
.
Enabled
=
resp
.
DisplayName
.
IsNullOrEmpty
();
btnLogout
.
Enabled
=
!
btnLogin
.
Enabled
;
btnLogout
.
Enabled
=
!
btnLogin
.
Enabled
;
tbxToken
.
Text
=
resp
.
BearerToken
;
tbxDisplayName
.
Text
=
resp
.
DisplayName
;
tbxDisplayName
.
Text
=
resp
.
DisplayName
;
});
});
//当执行错误后,执行以下的代码
//当执行错误后,执行以下的代码
...
@@ -56,6 +57,7 @@ namespace Kivii.Client.Test.Forms
...
@@ -56,6 +57,7 @@ namespace Kivii.Client.Test.Forms
tasks
.
Success
(
resp
=>
{
tasks
.
Success
(
resp
=>
{
btnLogin
.
Enabled
=
resp
!=
null
;
btnLogin
.
Enabled
=
resp
!=
null
;
btnLogout
.
Enabled
=
!
btnLogin
.
Enabled
;
btnLogout
.
Enabled
=
!
btnLogin
.
Enabled
;
tbxToken
.
Text
=
""
;
tbxDisplayName
.
Text
=
""
;
tbxDisplayName
.
Text
=
""
;
_client
.
Dispose
();
_client
.
Dispose
();
_client
=
null
;
_client
=
null
;
...
@@ -68,17 +70,19 @@ namespace Kivii.Client.Test.Forms
...
@@ -68,17 +70,19 @@ namespace Kivii.Client.Test.Forms
private
void
btnQueryMember_Click
(
object
sender
,
EventArgs
e
)
private
void
btnQueryMember_Click
(
object
sender
,
EventArgs
e
)
{
{
if
(
_client
==
null
)
return
;
var
newClient
=
new
JsonServiceClient
(
tbxServiceUrl
.
Text
);
newClient
.
BearerToken
=
tbxToken
.
Text
;
//if (_client == null) return;
dgvResults
.
DataSource
=
null
;
dgvResults
.
DataSource
=
null
;
var
queryMember
=
new
MemberQuery
();
var
queryMember
=
new
MemberQuery
();
queryMember
.
FullNameContains
=
tbxFullNameContains
.
Text
;
queryMember
.
FullNameContains
=
tbxFullNameContains
.
Text
;
queryMember
.
FirstNameIn
=
tbxFirstNameIn
.
Text
;
queryMember
.
FirstNameIn
=
tbxFirstNameIn
.
Text
;
var
tasks
=
_c
lient
.
PostAsync
(
queryMember
);
var
tasks
=
newC
lient
.
PostAsync
(
queryMember
);
tasks
.
Success
(
resp
=>
{
tasks
.
Success
(
resp
=>
{
dgvResults
.
DataSource
=
resp
.
Results
;
dgvResults
.
DataSource
=
resp
.
Results
;
});
});
tasks
.
Error
(
ex
=>
{
tasks
.
Error
(
ex
=>
{
var
x
=
""
;
MessageBox
.
Show
(
ex
.
Message
,
"Query Error"
)
;
});
});
}
}
...
...
Src/Kivii.Client.Test/Kivii.Client.Test.V4.5.csproj
View file @
020f4060
...
@@ -33,10 +33,6 @@
...
@@ -33,10 +33,6 @@
<WarningLevel>
4
</WarningLevel>
<WarningLevel>
4
</WarningLevel>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
<Reference
Include=
"Kivii.Common.V4.5, Version=5.4.2019.3160, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\packages\Kivii.Common.5.4.2019.3160\lib\net45\Kivii.Common.V4.5.dll
</HintPath>
<Private>
True
</Private>
</Reference>
<Reference
Include=
"Kivii.Linq.Sqlite.V4.5, Version=5.4.2019.3150, Culture=neutral, processorArchitecture=MSIL"
>
<Reference
Include=
"Kivii.Linq.Sqlite.V4.5, Version=5.4.2019.3150, Culture=neutral, processorArchitecture=MSIL"
>
<HintPath>
..\packages\Kivii.Linq.Sqlite.5.4.2019.3150\lib\net45\Kivii.Linq.Sqlite.V4.5.dll
</HintPath>
<HintPath>
..\packages\Kivii.Linq.Sqlite.5.4.2019.3150\lib\net45\Kivii.Linq.Sqlite.V4.5.dll
</HintPath>
<Private>
True
</Private>
<Private>
True
</Private>
...
@@ -93,5 +89,11 @@
...
@@ -93,5 +89,11 @@
<ItemGroup>
<ItemGroup>
<None
Include=
"App.config"
/>
<None
Include=
"App.config"
/>
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ProjectReference
Include=
"..\..\..\..\K5\Platform-V5.4\Kivii.Common\Src\Kivii.Common.V4.5.csproj"
>
<Project>
{587a47fe-0ae8-4649-9364-686e8f6c044b}
</Project>
<Name>
Kivii.Common.V4.5
</Name>
</ProjectReference>
</ItemGroup>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
</Project>
</Project>
\ No newline at end of file
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