Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jobily
ClientServerProject
提交
326b715a
C
ClientServerProject
项目概览
jobily
/
ClientServerProject
2023-09-12 01:32:09同步失败
通知
2
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
ClientServerProject
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
326b715a
编写于
5月 08, 2018
作者:
Richard__Hu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
服务器新增推送网络,移除开发中心功能。
上级
c5ba15a9
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
84 addition
and
92 deletion
+84
-92
CommonLibrary/DataBaseSupport/SqlServerSupport.cs
CommonLibrary/DataBaseSupport/SqlServerSupport.cs
+13
-0
CommonLibrary/UserSystem.cs
CommonLibrary/UserSystem.cs
+12
-1
软件系统客户端Wpf/MainWindow.xaml
软件系统客户端Wpf/MainWindow.xaml
+0
-5
软件系统客户端Wpf/MainWindow.xaml.cs
软件系统客户端Wpf/MainWindow.xaml.cs
+1
-27
软件系统客户端模版/FormMainWindow.Designer.cs
软件系统客户端模版/FormMainWindow.Designer.cs
+0
-0
软件系统客户端模版/FormMainWindow.cs
软件系统客户端模版/FormMainWindow.cs
+1
-27
软件系统服务端模版/FormServerWindow.Designer.cs
软件系统服务端模版/FormServerWindow.Designer.cs
+30
-30
软件系统服务端模版/FormServerWindow.cs
软件系统服务端模版/FormServerWindow.cs
+27
-2
未找到文件。
CommonLibrary/DataBaseSupport/SqlServerSupport.cs
浏览文件 @
326b715a
...
...
@@ -10,6 +10,19 @@ namespace CommonLibrary.DataBaseSupport
/// </summary>
public
class
SqlServerSupport
{
#
region
Constructor
/// <summary>
/// 实例化一个默认的构造函数
/// </summary>
public
SqlServerSupport
(
)
{
}
#
endregion
/// <summary>
/// 数据库的连接字符串,该信息应来源于服务器保存的连接字符串
/// </summary>
...
...
CommonLibrary/UserSystem.cs
浏览文件 @
326b715a
...
...
@@ -40,11 +40,12 @@ namespace CommonLibrary
* 时间:2017年10月1日 16:00:13 版本号:1.5.0
* 时间:2017年10月6日 19:23:09 版本号:1.6.0
* 时间:2017年10月21日 11:55:41 版本号:1.7.0
* 时间:2018年5月8日 11:09:16 版本号:1.8.0
*
**************************************************************************/
SoftBasic
.
FrameworkVersion
=
new
SystemVersion
(
"1.
7.14
"
);
SoftBasic
.
FrameworkVersion
=
new
SystemVersion
(
"1.
8.0
"
);
}
...
...
@@ -53,6 +54,7 @@ namespace CommonLibrary
/************************************************************************************************
*
* 注意:您在准备二次开发时,应该重新生成一个自己的GUID码
* Note: When you are preparing for secondary development, you should regenerate your own GUID code
*
************************************************************************************************/
...
...
@@ -77,27 +79,36 @@ namespace CommonLibrary
/// 主网络端口,此处随机定义了一个数据
/// </summary>
public
static
int
Port_Main_Net
{
get
;
}
=
17652
;
/// <summary>
/// 同步网络访问的端口,此处随机定义了一个数据
/// </summary>
public
static
int
Port_Second_Net
{
get
;
}
=
14568
;
/// <summary>
/// 用于软件系统更新的端口,此处随机定义了一个数据
/// </summary>
public
static
int
Port_Update_Net
{
get
;
}
=
17538
;
/// <summary>
/// 共享文件的端口号
/// </summary>
public
static
int
Port_Ultimate_File_Server
{
get
;
}
=
34261
;
/// <summary>
/// 用于UDP传输的端口号
/// </summary>
public
static
int
Port_Udp_Server
{
get
;
}
=
32566
;
/// <summary>
/// 用于服务器版本更新的端口
/// </summary>
public
static
int
Port_Advanced_File_Server
{
get
;
}
=
24672
;
/// <summary>
/// 用于实时数据推送的消息网络
/// </summary>
public
static
int
Port_Push_Server
{
get
;
}
=
14574
;
/// <summary>
...
...
软件系统客户端Wpf/MainWindow.xaml
浏览文件 @
326b715a
...
...
@@ -82,11 +82,6 @@
<materialDesign:PackIcon Kind="Rotate3d" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="开发中心" x:Name="MenuItem开发中心" Click="MenuItem开发中心_Click">
<MenuItem.Icon>
<materialDesign:PackIcon Kind="Security" />
</MenuItem.Icon>
</MenuItem>
</MenuItem>
<MenuItem Header="_设置">
<MenuItem.Icon>
...
...
软件系统客户端Wpf/MainWindow.xaml.cs
浏览文件 @
326b715a
...
...
@@ -141,7 +141,6 @@ namespace 软件系统客户端Wpf
{
MenuItem
日志查看
.
IsEnabled
=
false
;
MenuItem
远程更新
.
IsEnabled
=
false
;
MenuItem
开发中心
.
IsEnabled
=
false
;
MenuItem
系统配置
.
IsEnabled
=
false
;
}
...
...
@@ -271,32 +270,7 @@ namespace 软件系统客户端Wpf
fiaa
.
ShowDialog
();
}
}
private
void
MenuItem
开发中心
_Click
(
object
sender
,
RoutedEventArgs
e
)
{
using
(
FormSuper
fs
=
new
FormSuper
(()
=>
{
OperateResult
<
byte
[
]>
result
=
UserClient
.
Net_simplify_client
.
ReadFromServer
(
CommonHeadCode
.
SimplifyHeadCode
.
性能计数
,
new
byte
[
0
]);
//解析
if
(
result
.
IsSuccess
)
{
int
[]
data
=
new
int
[
result
.
Content
.
Length
/
4
];
for
(
int
i
=
0
;
i
<
data
.
Length
;
i
++)
{
data
[
i
]
=
BitConverter
.
ToInt32
(
result
.
Content
,
i
*
4
);
}
return
data
;
}
else
{
return
null
;
}
}))
{
fs
.
ShowDialog
();
}
}
private
void
MenuItem
密码更改
_Click
(
object
sender
,
RoutedEventArgs
e
)
{
...
...
软件系统客户端模版/FormMainWindow.Designer.cs
浏览文件 @
326b715a
此差异已折叠。
点击以展开。
软件系统客户端模版/FormMainWindow.cs
浏览文件 @
326b715a
...
...
@@ -305,33 +305,7 @@ namespace 软件系统客户端模版
fiaa
.
ShowDialog
();
}
}
private
void
开发中心
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
{
using
(
FormSuper
fs
=
new
FormSuper
(()
=>
{
OperateResult
<
byte
[
]>
result
=
UserClient
.
Net_simplify_client
.
ReadFromServer
(
CommonHeadCode
.
SimplifyHeadCode
.
性能计数
,
new
byte
[
0
]);
//解析
if
(
result
.
IsSuccess
)
{
int
[]
data
=
new
int
[
result
.
Content
.
Length
/
4
];
for
(
int
i
=
0
;
i
<
data
.
Length
;
i
++)
{
data
[
i
]
=
BitConverter
.
ToInt32
(
result
.
Content
,
i
*
4
);
}
return
data
;
}
else
{
return
null
;
}
}))
{
fs
.
ShowDialog
();
}
}
private
void
我的信息
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
...
...
软件系统服务端模版/FormServerWindow.Designer.cs
浏览文件 @
326b715a
...
...
@@ -61,8 +61,8 @@
this
.
label5
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label6
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label7
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label_
GC_Memer
y
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label_
Pm_Memery
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label_
Count_Simplif
y
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label_
Count_Push
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
statusStrip1
.
SuspendLayout
();
this
.
menuStrip1
.
SuspendLayout
();
this
.
SuspendLayout
();
...
...
@@ -313,30 +313,30 @@
this
.
label7
.
TabIndex
=
15
;
this
.
label7
.
Text
=
"Push:"
;
//
// label_
GC_Memer
y
//
this
.
label_
GC_Memer
y
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
label_
GC_Memer
y
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
FixedSingle
;
this
.
label_
GC_Memer
y
.
Cursor
=
System
.
Windows
.
Forms
.
Cursors
.
Hand
;
this
.
label_
GC_Memer
y
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label_
GC_Memer
y
.
Location
=
new
System
.
Drawing
.
Point
(
648
,
37
);
this
.
label_
GC_Memery
.
Name
=
"label_GC_Memer
y"
;
this
.
label_
GC_Memer
y
.
Size
=
new
System
.
Drawing
.
Size
(
108
,
24
);
this
.
label_
GC_Memer
y
.
TabIndex
=
16
;
this
.
label_
GC_Memer
y
.
Text
=
"0"
;
this
.
label_
GC_Memer
y
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
TopRight
;
//
// label_
Pm_Memery
//
this
.
label_
Pm_Memery
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
label_
Pm_Memery
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
FixedSingle
;
this
.
label_
Pm_Memery
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label_
Pm_Memery
.
Location
=
new
System
.
Drawing
.
Point
(
648
,
67
);
this
.
label_
Pm_Memery
.
Name
=
"label_Pm_Memery
"
;
this
.
label_
Pm_Memery
.
Size
=
new
System
.
Drawing
.
Size
(
108
,
24
);
this
.
label_
Pm_Memery
.
TabIndex
=
17
;
this
.
label_
Pm_Memery
.
Text
=
"0"
;
this
.
label_
Pm_Memery
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
TopRight
;
// label_
Count_Simplif
y
//
this
.
label_
Count_Simplif
y
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
label_
Count_Simplif
y
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
FixedSingle
;
this
.
label_
Count_Simplif
y
.
Cursor
=
System
.
Windows
.
Forms
.
Cursors
.
Hand
;
this
.
label_
Count_Simplif
y
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label_
Count_Simplif
y
.
Location
=
new
System
.
Drawing
.
Point
(
648
,
37
);
this
.
label_
Count_Simplify
.
Name
=
"label_Count_Simplif
y"
;
this
.
label_
Count_Simplif
y
.
Size
=
new
System
.
Drawing
.
Size
(
108
,
24
);
this
.
label_
Count_Simplif
y
.
TabIndex
=
16
;
this
.
label_
Count_Simplif
y
.
Text
=
"0"
;
this
.
label_
Count_Simplif
y
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
TopRight
;
//
// label_
Count_Push
//
this
.
label_
Count_Push
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
label_
Count_Push
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
FixedSingle
;
this
.
label_
Count_Push
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
12F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
label_
Count_Push
.
Location
=
new
System
.
Drawing
.
Point
(
648
,
67
);
this
.
label_
Count_Push
.
Name
=
"label_Count_Push
"
;
this
.
label_
Count_Push
.
Size
=
new
System
.
Drawing
.
Size
(
108
,
24
);
this
.
label_
Count_Push
.
TabIndex
=
17
;
this
.
label_
Count_Push
.
Text
=
"0"
;
this
.
label_
Count_Push
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
TopRight
;
//
// FormServerWindow
//
...
...
@@ -344,8 +344,8 @@
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
AliceBlue
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
764
,
481
);
this
.
Controls
.
Add
(
this
.
label_
Pm_Memery
);
this
.
Controls
.
Add
(
this
.
label_
GC_Memer
y
);
this
.
Controls
.
Add
(
this
.
label_
Count_Push
);
this
.
Controls
.
Add
(
this
.
label_
Count_Simplif
y
);
this
.
Controls
.
Add
(
this
.
label7
);
this
.
Controls
.
Add
(
this
.
label6
);
this
.
Controls
.
Add
(
this
.
label5
);
...
...
@@ -404,8 +404,8 @@
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
日志查看
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
Label
label6
;
private
System
.
Windows
.
Forms
.
Label
label7
;
private
System
.
Windows
.
Forms
.
Label
label_
GC_Memer
y
;
private
System
.
Windows
.
Forms
.
Label
label_
Pm_Memery
;
private
System
.
Windows
.
Forms
.
Label
label_
Count_Simplif
y
;
private
System
.
Windows
.
Forms
.
Label
label_
Count_Push
;
}
}
软件系统服务端模版/FormServerWindow.cs
浏览文件 @
326b715a
...
...
@@ -229,6 +229,7 @@ namespace 软件系统服务端模版
Ultimate_File_Initiaization
();
// 共享文件引擎初始化
Net_File_Portrait_Initialization
();
// 头像文件管理服务
Net_Udp_Server_Initialization
();
// UDP引擎服务初始化
Net_Push_Server_Initialization
(
);
// 推送网络引擎初始化
启动服务器
ToolStripMenuItem
.
Text
=
"已启动"
;
启动服务器
ToolStripMenuItem
.
BackColor
=
Color
.
LimeGreen
;
IsSystemStart
=
true
;
...
...
@@ -1075,6 +1076,28 @@ namespace 软件系统服务端模版
#
endregion
#
region
Push
Net
[
推送网络
]
private
NetPushServer
pushServer
;
private
void
Net_Push_Server_Initialization
(
)
{
try
{
pushServer
=
new
NetPushServer
(
);
pushServer
.
Token
=
UserSystem
.
KeyToken
;
pushServer
.
LogNet
=
RuntimeLogHelper
;
pushServer
.
ServerStart
(
UserSystem
.
Port_Push_Server
);
}
catch
(
Exception
ex
)
{
SoftBasic
.
ShowExceptionMessage
(
ex
);
}
}
#
endregion
#
region
Time
Tick
Thread
/*********************************************************************************************
...
...
@@ -1092,7 +1115,7 @@ namespace 软件系统服务端模版
{
toolStripStatusLabel_time
.
Alignment
=
ToolStripItemAlignment
.
Right
;
statusStrip1
.
LayoutStyle
=
ToolStripLayoutStyle
.
StackWithOverflow
;
toolStripStatusLabel_time
.
ForeColor
=
Color
.
Purple
;
//
紫色
toolStripStatusLabel_time
.
ForeColor
=
Color
.
Purple
;
//
紫色
Thread
thread
=
new
Thread
(
new
ThreadStart
(
ThreadTimeTick
));
...
...
@@ -1106,12 +1129,14 @@ namespace 软件系统服务端模版
{
toolStripStatusLabel_time
.
Text
=
DateTime
.
Now
.
ToString
(
);
RenderOnlineAccount
(
);
if
(
net_simplify_server
!=
null
)
label_Count_Simplify
.
Text
=
net_simplify_server
.
ClientCount
.
ToString
(
);
if
(
pushServer
!=
null
)
label_Count_Push
.
Text
=
pushServer
.
OnlineCount
.
ToString
(
);
}
public
void
ThreadTimeTick
()
{
Thread
.
Sleep
(
300
);
//
加一个微小的延时
Thread
.
Sleep
(
300
);
//
加一个微小的延时
int
second
=
DateTime
.
Now
.
Second
-
1
;
int
minute
=
-
1
;
int
hour
=
-
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录