Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jobily
ClientServerProject
提交
0a7ace0c
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 搜索 >>
提交
0a7ace0c
编写于
10月 11, 2017
作者:
Richard__Hu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
代码调整,重构,v1.6.10
上级
1a85ef85
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
130 addition
and
63 deletion
+130
-63
ClientsLibrary/LogsSupport/FormLogView.Designer.cs
ClientsLibrary/LogsSupport/FormLogView.Designer.cs
+0
-1
ClientsLibrary/LogsSupport/FormLogView.cs
ClientsLibrary/LogsSupport/FormLogView.cs
+16
-12
ClientsLibrary/SoftUpdateSupport/FormUpdateRemote.cs
ClientsLibrary/SoftUpdateSupport/FormUpdateRemote.cs
+28
-7
软件系统客户端Wpf/Views/Controls/Palette.xaml
软件系统客户端Wpf/Views/Controls/Palette.xaml
+1
-1
软件系统客户端Wpf/Views/Controls/Palette.xaml.cs
软件系统客户端Wpf/Views/Controls/Palette.xaml.cs
+1
-1
软件系统客户端Wpf/Views/Controls/UserClientRenderItem.xaml.cs
软件系统客户端Wpf/Views/Controls/UserClientRenderItem.xaml.cs
+32
-11
软件系统客户端Wpf/Views/Controls/UserFileRenderItem.xaml
软件系统客户端Wpf/Views/Controls/UserFileRenderItem.xaml
+1
-1
软件系统客户端Wpf/Views/Controls/UserFileRenderItem.xaml.cs
软件系统客户端Wpf/Views/Controls/UserFileRenderItem.xaml.cs
+1
-1
软件系统客户端Wpf/Views/UIControls/UserChat.xaml
软件系统客户端Wpf/Views/UIControls/UserChat.xaml
+0
-0
软件系统客户端Wpf/Views/UIControls/UserChat.xaml.cs
软件系统客户端Wpf/Views/UIControls/UserChat.xaml.cs
+35
-15
软件系统客户端Wpf/Views/UIControls/UserFileRender.xaml
软件系统客户端Wpf/Views/UIControls/UserFileRender.xaml
+0
-0
软件系统客户端Wpf/Views/UIControls/UserFileRender.xaml.cs
软件系统客户端Wpf/Views/UIControls/UserFileRender.xaml.cs
+1
-0
软件系统客户端Wpf/Views/UIControls/UserHome.xaml
软件系统客户端Wpf/Views/UIControls/UserHome.xaml
+0
-0
软件系统客户端Wpf/Views/UIControls/UserHome.xaml.cs
软件系统客户端Wpf/Views/UIControls/UserHome.xaml.cs
+0
-0
软件系统客户端Wpf/Views/UIControls/UserPaletteSelector.xaml
软件系统客户端Wpf/Views/UIControls/UserPaletteSelector.xaml
+2
-1
软件系统客户端Wpf/Views/UIControls/UserPaletteSelector.xaml.cs
软件系统客户端Wpf/Views/UIControls/UserPaletteSelector.xaml.cs
+0
-0
软件系统客户端Wpf/软件系统客户端Wpf.csproj
软件系统客户端Wpf/软件系统客户端Wpf.csproj
+12
-12
未找到文件。
ClientsLibrary/LogsSupport/FormLogView.Designer.cs
浏览文件 @
0a7ace0c
...
...
@@ -320,7 +320,6 @@
this
.
Controls
.
Add
(
this
.
userButton1
);
this
.
Controls
.
Add
(
this
.
userButton_login
);
this
.
Name
=
"FormLogView"
;
this
.
ShowIcon
=
false
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterParent
;
this
.
Text
=
"日志查看器"
;
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FormLogView_Load
);
...
...
ClientsLibrary/LogsSupport/FormLogView.cs
浏览文件 @
0a7ace0c
...
...
@@ -14,6 +14,8 @@ namespace ClientsLibrary
{
public
partial
class
FormLogView
:
Form
{
#
region
Constructor
public
FormLogView
()
{
InitializeComponent
();
...
...
@@ -23,13 +25,26 @@ namespace ClientsLibrary
net_simplify_client
=
UserClient
.
Net_simplify_client
;
}
#
endregion
#
region
Window
Load
private
void
FormLogView_Load
(
object
sender
,
EventArgs
e
)
{
}
#
endregion
#
region
Private
Member
private
NetSimplifyClient
net_simplify_client
=
null
;
#
endregion
#
region
Button
Click
private
void
ReadFromServer
(
int
head_code
)
{
OperateResultString
result
=
net_simplify_client
.
ReadFromServer
(
head_code
);
...
...
@@ -129,19 +144,8 @@ namespace ClientsLibrary
{
ClearFromServer
(
CommonHeadCode
.
SimplifyHeadCode
.
客户端日志清空
);
}
//private void userButton17_Click(object sender, EventArgs e)
//{
// ReadFromServer(CommonHeadCode.SimplifyHeadCode.头像日志查看);
//}
//private void userButton16_Click(object sender, EventArgs e)
//{
// ClearFromServer(CommonHeadCode.SimplifyHeadCode.头像日志清空);
//}
private
void
logNetAnalysisControl1_Load
(
object
sender
,
EventArgs
e
)
{
#
endregion
}
}
}
ClientsLibrary/SoftUpdateSupport/FormUpdateRemote.cs
浏览文件 @
0a7ace0c
...
...
@@ -14,17 +14,20 @@ using ClientsLibrary.FileSupport;
namespace
ClientsLibrary
{
/
/=====================================================================================
//
//
用途: 本窗口用于实现对本系统的客户端进行全面的远程更新的操作。
//
第一步: 先将新版本的所有客户端传送到服务器端进行覆盖。
//
第二步: 再将版本号传送到服务器进行更新,这样所有的客户端登录后就会自动更新新的版本了
//
//=====================================================================================
/
************************************************************************************************
*
*
用途: 本窗口用于实现对本系统的客户端进行全面的远程更新的操作。
*
第一步: 先将新版本的所有客户端传送到服务器端进行覆盖。
*
第二步: 再将版本号传送到服务器进行更新,这样所有的客户端登录后就会自动更新新的版本了
*
**************************************************************************************************/
public
partial
class
FormUpdateRemote
:
Form
{
#
region
Constructor
public
FormUpdateRemote
()
{
InitializeComponent
();
...
...
@@ -32,6 +35,11 @@ namespace ClientsLibrary
Icon
=
UserClient
.
GetFormWindowIcon
();
}
#
endregion
#
region
Select
File
And
Upload
private
void
userButton_file_Click
(
object
sender
,
EventArgs
e
)
{
using
(
OpenFileDialog
ofd
=
new
OpenFileDialog
())
...
...
@@ -53,6 +61,12 @@ namespace ClientsLibrary
}
}
#
endregion
#
region
Update
Version
private
void
userButton_version_Click
(
object
sender
,
EventArgs
e
)
{
OperateResultString
result
=
UserClient
.
Net_simplify_client
.
ReadFromServer
(
CommonHeadCode
.
SimplifyHeadCode
.
更新版本
,
textBox1
.
Text
);
...
...
@@ -66,9 +80,16 @@ namespace ClientsLibrary
}
}
#
endregion
#
region
Form
Load
private
void
FormUpdateRemote_Load
(
object
sender
,
EventArgs
e
)
{
textBox1
.
Text
=
UserClient
.
CurrentVersion
.
ToString
();
}
#
endregion
}
}
软件系统客户端Wpf/Views/Palette.xaml
→
软件系统客户端Wpf/Views/
Controls/
Palette.xaml
浏览文件 @
0a7ace0c
<UserControl x:Class="软件系统客户端Wpf.Views.Palette"
<UserControl x:Class="软件系统客户端Wpf.Views.
Controls.
Palette"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
...
...
软件系统客户端Wpf/Views/Palette.xaml.cs
→
软件系统客户端Wpf/Views/
Controls/
Palette.xaml.cs
浏览文件 @
0a7ace0c
...
...
@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
using
System.Windows.Navigation
;
using
System.Windows.Shapes
;
namespace
软件系统客户端
Wpf.Views
namespace
软件系统客户端
Wpf.Views
.Controls
{
/// <summary>
/// Palette.xaml 的交互逻辑
...
...
软件系统客户端Wpf/Views/Controls/UserClientRenderItem.xaml.cs
浏览文件 @
0a7ace0c
...
...
@@ -23,12 +23,20 @@ namespace 软件系统客户端Wpf.Views.Controls
/// </summary>
public
partial
class
UserClientRenderItem
:
UserControl
{
#
region
Constructor
public
UserClientRenderItem
()
{
InitializeComponent
();
}
#
endregion
#
region
Public
Property
/// <summary>
/// 当前会话的唯一ID
/// </summary>
public
string
UniqueId
{
get
...
...
@@ -37,6 +45,9 @@ namespace 软件系统客户端Wpf.Views.Controls
}
}
#
endregion
#
region
Show
Client
Information
public
void
SetClientRender
(
NetAccount
account
)
{
...
...
@@ -47,17 +58,18 @@ namespace 软件系统客户端Wpf.Views.Controls
Factory
.
Text
=
$"(
{
account
.
Factory
}
)"
;
Roles
.
Children
.
Clear
();
if
(
account
.
Roles
?.
Length
>
0
)
if
(
account
.
Roles
?.
Length
>
0
)
{
foreach
(
var
m
in
account
.
Roles
)
foreach
(
var
m
in
account
.
Roles
)
{
TextBlock
block
=
new
TextBlock
();
block
.
Background
=
Brushes
.
LightSkyBlue
;
block
.
Foreground
=
Brushes
.
Blue
;
block
.
Margin
=
new
Thickness
(
0
,
0
,
4
,
0
);
block
.
Text
=
m
;
TextBlock
block
=
new
TextBlock
{
Background
=
Brushes
.
LightSkyBlue
,
Foreground
=
Brushes
.
Blue
,
Margin
=
new
Thickness
(
0
,
0
,
4
,
0
),
Text
=
m
};
Roles
.
Children
.
Add
(
block
);
}
}
...
...
@@ -66,11 +78,14 @@ namespace 软件系统客户端Wpf.Views.Controls
Roles
.
Children
.
Add
(
new
TextBlock
());
}
// 启动线程池去显示头像
System
.
Threading
.
ThreadPool
.
QueueUserWorkItem
(
new
System
.
Threading
.
WaitCallback
(
ThreadPoolLoadPortrait
),
account
);
}
}
#
endregion
#
region
Update
Portrait
public
void
UpdatePortrait
(
string
userName
)
{
...
...
@@ -79,6 +94,7 @@ namespace 软件系统客户端Wpf.Views.Controls
System
.
Threading
.
ThreadPool
.
QueueUserWorkItem
(
new
System
.
Threading
.
WaitCallback
(
ThreadPoolLoadPortrait
),
netAccount
);
}
}
private
void
ThreadPoolLoadPortrait
(
object
obj
)
{
// 向服务器请求小头像
...
...
@@ -102,12 +118,17 @@ namespace 软件系统客户端Wpf.Views.Controls
}
catch
(
Exception
ex
)
{
MessageBox
.
Show
(
ex
.
Message
);
UserClient
.
LogNet
?.
WriteException
(
"Thread Download Portrait Failed"
,
ex
);
}
}
}
#
endregion
#
region
Pricvate
Member
private
NetAccount
netAccount
=
null
;
#
endregion
}
}
软件系统客户端Wpf/Views/UserFileRenderItem.xaml
→
软件系统客户端Wpf/Views/
Controls/
UserFileRenderItem.xaml
浏览文件 @
0a7ace0c
<UserControl x:Class="软件系统客户端Wpf.Views.UserFileRenderItem"
<UserControl x:Class="软件系统客户端Wpf.Views.
Controls.
UserFileRenderItem"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
...
...
软件系统客户端Wpf/Views/UserFileRenderItem.xaml.cs
→
软件系统客户端Wpf/Views/
Controls/
UserFileRenderItem.xaml.cs
浏览文件 @
0a7ace0c
...
...
@@ -20,7 +20,7 @@ using System.IO;
using
System.Net
;
using
ClientsLibrary.FileSupport
;
namespace
软件系统客户端
Wpf.Views
namespace
软件系统客户端
Wpf.Views
.Controls
{
/// <summary>
/// UserFileRenderItem.xaml 的交互逻辑
...
...
软件系统客户端Wpf/Views/UserChat.xaml
→
软件系统客户端Wpf/Views/U
IControls/U
serChat.xaml
浏览文件 @
0a7ace0c
文件已移动
软件系统客户端Wpf/Views/UserChat.xaml.cs
→
软件系统客户端Wpf/Views/U
IControls/U
serChat.xaml.cs
浏览文件 @
0a7ace0c
...
...
@@ -21,14 +21,18 @@ namespace 软件系统客户端Wpf.Views
/// </summary>
public
partial
class
UserChat
:
UserControl
{
#
region
Constructor
public
UserChat
(
Action
<
string
>
send
)
{
InitializeComponent
();
SendString
=
send
;
}
#
endregion
#
region
Add
Chat
Show
private
Action
<
string
>
SendString
=
null
;
public
void
DealwithReceive
(
string
str
)
{
...
...
@@ -41,6 +45,7 @@ namespace 软件系统客户端Wpf.Views
}
ScrollToDown
();
}
/// <summary>
/// 新增聊天的历史记录
/// </summary>
...
...
@@ -62,11 +67,31 @@ namespace 软件系统客户端Wpf.Views
ScrollToDown
();
}
#
endregion
#
region
Chat
Focus
Scroll
public
void
InputFocus
()
{
//textBox1.Focus();
}
/// <summary>
/// 光标滚动到最底端
/// </summary>
public
void
ScrollToDown
()
{
TextBox_ChatHistory
.
ScrollToEnd
();
}
#
endregion
#
region
Text
Send
private
void
Button_Click
(
object
sender
,
RoutedEventArgs
e
)
{
if
(!
string
.
IsNullOrEmpty
(
TextBox_Send
.
Text
))
...
...
@@ -76,27 +101,22 @@ namespace 软件系统客户端Wpf.Views
}
}
private
void
TextBox_KeyDown
(
object
sender
,
KeyEventArgs
e
)
{
//按下Enter键后进行发送数据到服务器
if
(!
string
.
IsNullOrEmpty
(
TextBox_Send
.
Text
))
if
(
e
.
Key
==
Key
.
Enter
)
{
if
(
e
.
Key
==
Key
.
Enter
)
{
SendString
?.
Invoke
(
TextBox_Send
.
Text
);
TextBox_Send
.
Text
=
""
;
}
Button_Click
(
sender
,
new
RoutedEventArgs
());
}
}
#
endregion
#
region
Private
Member
/// <summary>
/// 光标滚动到最底端
/// </summary>
public
void
ScrollToDown
()
{
TextBox_ChatHistory
.
ScrollToEnd
();
}
private
Action
<
string
>
SendString
=
null
;
#
endregion
}
}
软件系统客户端Wpf/Views/UserFileRender.xaml
→
软件系统客户端Wpf/Views/U
IControls/U
serFileRender.xaml
浏览文件 @
0a7ace0c
文件已移动
软件系统客户端Wpf/Views/UserFileRender.xaml.cs
→
软件系统客户端Wpf/Views/U
IControls/U
serFileRender.xaml.cs
浏览文件 @
0a7ace0c
...
...
@@ -18,6 +18,7 @@ using System.Windows.Media;
using
System.Windows.Media.Imaging
;
using
System.Windows.Navigation
;
using
System.Windows.Shapes
;
using
软件系统客户端
Wpf.Views.Controls
;
namespace
软件系统客户端
Wpf.Views
{
...
...
软件系统客户端Wpf/Views/UserHome.xaml
→
软件系统客户端Wpf/Views/U
IControls/U
serHome.xaml
浏览文件 @
0a7ace0c
文件已移动
软件系统客户端Wpf/Views/UserHome.xaml.cs
→
软件系统客户端Wpf/Views/U
IControls/U
serHome.xaml.cs
浏览文件 @
0a7ace0c
文件已移动
软件系统客户端Wpf/Views/UserPaletteSelector.xaml
→
软件系统客户端Wpf/Views/U
IControls/U
serPaletteSelector.xaml
浏览文件 @
0a7ace0c
...
...
@@ -6,6 +6,7 @@
xmlns:materialDesignColors="clr-namespace:MaterialDesignColors;assembly=MaterialDesignColors"
xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf;assembly=MaterialDesignThemes.Wpf"
xmlns:local="clr-namespace:软件系统客户端Wpf.Views"
xmlns:local1="clr-namespace:软件系统客户端Wpf.Views.Controls"
mc:Ignorable="d"
d:DesignHeight="700" d:DesignWidth="400" Loaded="UserControl_Loaded">
<UserControl.Resources>
...
...
@@ -84,7 +85,7 @@
<DockPanel>
<wpf:Card DockPanel.Dock="Top" Margin="2,0,2,0">
<DockPanel>
<local:Palette DockPanel.Dock="Left" Width="200" />
<local
1
:Palette DockPanel.Dock="Left" Width="200" />
<TextBlock Margin="16" TextWrapping="Wrap" VerticalAlignment="Center">这是你当前的主题配色,可以在app.xaml中进行配置和初始化,
也可以在运行的时候进行更改。</TextBlock>
</DockPanel>
...
...
软件系统客户端Wpf/Views/UserPaletteSelector.xaml.cs
→
软件系统客户端Wpf/Views/U
IControls/U
serPaletteSelector.xaml.cs
浏览文件 @
0a7ace0c
文件已移动
软件系统客户端Wpf/软件系统客户端Wpf.csproj
浏览文件 @
0a7ace0c
...
...
@@ -78,23 +78,23 @@
<Compile
Include=
"Views\Controls\UserClientRenderItem.xaml.cs"
>
<DependentUpon>
UserClientRenderItem.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"Views\Palette.xaml.cs"
>
<Compile
Include=
"Views\
Controls\
Palette.xaml.cs"
>
<DependentUpon>
Palette.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"Views\PaletteSelectorViewModel.cs"
/>
<Compile
Include=
"Views\UserChat.xaml.cs"
>
<Compile
Include=
"Views\U
IControls\U
serChat.xaml.cs"
>
<DependentUpon>
UserChat.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"Views\UserFileRender.xaml.cs"
>
<Compile
Include=
"Views\U
IControls\U
serFileRender.xaml.cs"
>
<DependentUpon>
UserFileRender.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"Views\UserFileRenderItem.xaml.cs"
>
<Compile
Include=
"Views\
Controls\
UserFileRenderItem.xaml.cs"
>
<DependentUpon>
UserFileRenderItem.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"Views\UserHome.xaml.cs"
>
<Compile
Include=
"Views\U
IControls\U
serHome.xaml.cs"
>
<DependentUpon>
UserHome.xaml
</DependentUpon>
</Compile>
<Compile
Include=
"Views\UserPaletteSelector.xaml.cs"
>
<Compile
Include=
"Views\U
IControls\U
serPaletteSelector.xaml.cs"
>
<DependentUpon>
UserPaletteSelector.xaml
</DependentUpon>
</Compile>
<Page
Include=
"LoginWindow.xaml"
>
...
...
@@ -120,27 +120,27 @@
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
<Page
Include=
"Views\Palette.xaml"
>
<Page
Include=
"Views\
Controls\
Palette.xaml"
>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
<Page
Include=
"Views\UserChat.xaml"
>
<Page
Include=
"Views\U
IControls\U
serChat.xaml"
>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
<Page
Include=
"Views\UserFileRender.xaml"
>
<Page
Include=
"Views\U
IControls\U
serFileRender.xaml"
>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
<Page
Include=
"Views\UserFileRenderItem.xaml"
>
<Page
Include=
"Views\
Controls\
UserFileRenderItem.xaml"
>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
<Page
Include=
"Views\UserHome.xaml"
>
<Page
Include=
"Views\U
IControls\U
serHome.xaml"
>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
<Page
Include=
"Views\UserPaletteSelector.xaml"
>
<Page
Include=
"Views\U
IControls\U
serPaletteSelector.xaml"
>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录