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
6efdc3db
Commit
6efdc3db
authored
Jun 14, 2020
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改全部字体为 Arial
parent
3d8e7538
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
33 deletions
+43
-33
TextStyle.xaml
...Y.ControlLibrary/FLY.ControlLibrary/Themes/TextStyle.xaml
+4
-4
WdFullKeyboard.xaml
...trolLibrary/FLY.ControlLibrary/UI.OSK/WdFullKeyboard.xaml
+1
-1
WdNumKeyboard.xaml
...ntrolLibrary/FLY.ControlLibrary/UI.OSK/WdNumKeyboard.xaml
+1
-1
TCPConn.cs
Project.FLY.FObjSys/FObjSys/TCPConn.cs
+37
-27
No files found.
Project.FLY.ControlLibrary/FLY.ControlLibrary/Themes/TextStyle.xaml
View file @
6efdc3db
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
<Setter Property="Foreground" Value="#FF3B3B3B" />
<Setter Property="Foreground" Value="#FF3B3B3B" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="36" />
<Setter Property="FontSize" Value="36" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="FontFamily" Value="
Arial
" />
<Setter Property="TextAlignment" Value="Left" />
<Setter Property="TextAlignment" Value="Left" />
</Style>
</Style>
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
<Setter Property="Foreground" Value="#FF3B3B3B" />
<Setter Property="Foreground" Value="#FF3B3B3B" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="36" />
<Setter Property="FontSize" Value="36" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="FontFamily" Value="
Arial
" />
<Setter Property="TextAlignment" Value="Left" />
<Setter Property="TextAlignment" Value="Left" />
<Setter Property="MinWidth" Value="30" />
<Setter Property="MinWidth" Value="30" />
</Style>
</Style>
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
<Style TargetType="TextBlock" x:Key="TextBlockStyle_FieldContent_mm_interval">
<Style TargetType="TextBlock" x:Key="TextBlockStyle_FieldContent_mm_interval">
<Setter Property="Foreground" Value="#FF888888" />
<Setter Property="Foreground" Value="#FF888888" />
<Setter Property="FontSize" Value="36" />
<Setter Property="FontSize" Value="36" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="FontFamily" Value="
Arial
" />
<Setter Property="TextAlignment" Value="Left" />
<Setter Property="TextAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Bottom" />
<Setter Property="VerticalAlignment" Value="Bottom" />
</Style>
</Style>
...
@@ -89,7 +89,7 @@
...
@@ -89,7 +89,7 @@
<Style TargetType="TextBlock" x:Key="TextBlockStyle_FieldContent_mm">
<Style TargetType="TextBlock" x:Key="TextBlockStyle_FieldContent_mm">
<Setter Property="Foreground" Value="#FF888888" />
<Setter Property="Foreground" Value="#FF888888" />
<Setter Property="FontSize" Value="22" />
<Setter Property="FontSize" Value="22" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="FontFamily" Value="
Arial
" />
<Setter Property="TextAlignment" Value="Left" />
<Setter Property="TextAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Bottom" />
<Setter Property="VerticalAlignment" Value="Bottom" />
</Style>
</Style>
...
...
Project.FLY.ControlLibrary/FLY.ControlLibrary/UI.OSK/WdFullKeyboard.xaml
View file @
6efdc3db
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<SolidColorBrush x:Key="Color_dark" Color="#8e9aa8"/>
<SolidColorBrush x:Key="Color_dark" Color="#8e9aa8"/>
<Style TargetType="TextBlock" x:Key="TextBlockStyle_abc">
<Style TargetType="TextBlock" x:Key="TextBlockStyle_abc">
<Setter Property="FontSize" Value="20" />
<Setter Property="FontSize" Value="20" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="FontFamily" Value="
Arial
" />
</Style>
</Style>
<Style TargetType="Button" x:Key="ButtonStyle_key">
<Style TargetType="Button" x:Key="ButtonStyle_key">
<Setter Property="Margin" Value="3"/>
<Setter Property="Margin" Value="3"/>
...
...
Project.FLY.ControlLibrary/FLY.ControlLibrary/UI.OSK/WdNumKeyboard.xaml
View file @
6efdc3db
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<SolidColorBrush x:Key="Color_dark" Color="#8e9aa8"/>
<SolidColorBrush x:Key="Color_dark" Color="#8e9aa8"/>
<Style TargetType="TextBlock" x:Key="TextBlockStyle_abc">
<Style TargetType="TextBlock" x:Key="TextBlockStyle_abc">
<Setter Property="FontSize" Value="20" />
<Setter Property="FontSize" Value="20" />
<Setter Property="FontFamily" Value="
Microsoft Sans Serif
" />
<Setter Property="FontFamily" Value="
Arial
" />
</Style>
</Style>
<Style TargetType="Button" x:Key="ButtonStyle_key">
<Style TargetType="Button" x:Key="ButtonStyle_key">
<Setter Property="Margin" Value="3"/>
<Setter Property="Margin" Value="3"/>
...
...
Project.FLY.FObjSys/FObjSys/TCPConn.cs
View file @
6efdc3db
...
@@ -39,9 +39,14 @@ namespace FObjBase
...
@@ -39,9 +39,14 @@ namespace FObjBase
public
virtual
int
SendPacket
(
byte
[]
buffer
)
public
virtual
int
SendPacket
(
byte
[]
buffer
)
{
{
int
len
=
buffer
.
Length
;
lock
(
out_buffer
)
out_buffer
.
AddRange
(
buffer
);
{
return
len
;
int
len
=
buffer
.
Length
;
out_buffer
.
AddRange
(
buffer
);
return
len
;
}
}
}
protected
virtual
int
GetRecvInfoPacket
()
// return length of the packet
protected
virtual
int
GetRecvInfoPacket
()
// return length of the packet
...
@@ -123,35 +128,37 @@ namespace FObjBase
...
@@ -123,35 +128,37 @@ namespace FObjBase
}
}
int
Send_Poll
()
int
Send_Poll
()
{
{
int
cnt_total
=
0
;
if
(
out_buffer
.
Count
()
==
0
)
//没数据,直接返回
if
(
out_buffer
.
Count
()
==
0
)
//没数据,直接返回
return
0
;
return
0
;
lock
(
out_buffer
)
{
while
(
out_buffer
.
Count
()
>
0
)
//只有有数据发送,且能发送,没有 block, 就会一直循环
int
cnt_total
=
0
;
{
while
(
out_buffer
.
Count
()
>
0
)
//只有有数据发送,且能发送,没有 block, 就会一直循环
int
cnt
;
try
{
{
cnt
=
sock
.
Send
(
out_buffer
.
ToArray
());
int
cnt
;
}
try
catch
(
System
.
Net
.
Sockets
.
SocketException
e
)
{
{
cnt
=
sock
.
Send
(
out_buffer
.
ToArray
());
if
(
e
.
SocketErrorCode
==
SocketError
.
WouldBlock
)
//当前发不了,退出循环,等下次!!!!
}
break
;
catch
(
System
.
Net
.
Sockets
.
SocketException
e
)
return
-
1
;
//异常,断开连接!!!
{
}
if
(
e
.
SocketErrorCode
==
SocketError
.
WouldBlock
)
//当前发不了,退出循环,等下次!!!!
break
;
return
-
1
;
//异常,断开连接!!!
}
if
(
cnt
>
0
)
if
(
cnt
>
0
)
{
{
out_buffer
.
RemoveRange
(
0
,
cnt
);
//发送成功,删除!!!
out_buffer
.
RemoveRange
(
0
,
cnt
);
//发送成功,删除!!!
cnt_total
+=
cnt
;
cnt_total
+=
cnt
;
}
}
else
else
{
{
break
;
break
;
}
}
}
return
cnt_total
;
//返回总发送量
}
}
return
cnt_total
;
//返回总发送量
}
}
int
Receive_Poll
()
int
Receive_Poll
()
...
@@ -269,7 +276,10 @@ namespace FObjBase
...
@@ -269,7 +276,10 @@ namespace FObjBase
logger
.
Error
(
"TCPConn OnPoll 连接断开,清空接收缓存区"
);
logger
.
Error
(
"TCPConn OnPoll 连接断开,清空接收缓存区"
);
in_buffer
.
Clear
();
in_buffer
.
Clear
();
out_buffer
.
Clear
();
lock
(
out_buffer
)
{
out_buffer
.
Clear
();
}
Enable
=
false
;
Enable
=
false
;
}
}
return
ret
;
return
ret
;
...
...
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