Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jobily
ClientServerProject
提交
e5131d19
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,发现更多精彩内容 >>
提交
e5131d19
编写于
7月 13, 2017
作者:
Richard__Hu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增头像显示,等待头像显示类修正。
上级
9e55d272
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
40 addition
and
7 deletion
+40
-7
软件系统客户端Wpf/MainWindow.xaml
软件系统客户端Wpf/MainWindow.xaml
+7
-5
软件系统客户端Wpf/MainWindow.xaml.cs
软件系统客户端Wpf/MainWindow.xaml.cs
+33
-2
未找到文件。
软件系统客户端Wpf/MainWindow.xaml
浏览文件 @
e5131d19
...
...
@@ -155,11 +155,13 @@
</Grid>
<Grid DockPanel.Dock="Right" Width="180">
<materialDesign:Chip Content="" Margin="0 0 6 4">
<materialDesign:Chip.Icon>
<Image x:Name="AccountPortrait"/>
</materialDesign:Chip.Icon>
</materialDesign:Chip>
<StackPanel>
<materialDesign:Chip x:Name="AccountChip" Content="" Margin="0 0 6 4" Click="AccountChip_Click">
<materialDesign:Chip.Icon>
<Image x:Name="AccountPortrait"/>
</materialDesign:Chip.Icon>
</materialDesign:Chip>
</StackPanel>
</Grid>
<Grid>
...
...
软件系统客户端Wpf/MainWindow.xaml.cs
浏览文件 @
e5131d19
...
...
@@ -121,7 +121,8 @@ namespace 软件系统客户端Wpf
//启动定时器
TimeTickInitilization
();
//显示头像
//DownloadUserPortraint();
SoftUserPortraitInitialization
();
SoftUserPortrait
.
DownloadUserPortraint
();
}
private
void
Window_Initialized
(
object
sender
,
EventArgs
e
)
...
...
@@ -288,7 +289,7 @@ namespace 软件系统客户端Wpf
private
void
MenuItem
头像更改
_Click
(
object
sender
,
RoutedEventArgs
e
)
{
SoftUserPortrait
.
ChangePortrait
();
}
private
void
MenuItem
关于本软件
_Click
(
object
sender
,
RoutedEventArgs
e
)
...
...
@@ -565,6 +566,36 @@ namespace 软件系统客户端Wpf
#
endregion
#
region
头像图片上传下载块
private
UserPortrait
SoftUserPortrait
{
get
;
set
;
}
private
void
SoftUserPortraitInitialization
()
{
SoftUserPortrait
=
new
UserPortrait
(
AppDomain
.
CurrentDomain
.
BaseDirectory
+
@"\Portrait\"
+
UserClient
.
UserAccount
.
UserName
,
m
=>
{
BitmapImage
bi
=
new
BitmapImage
();
bi
.
BeginInit
();
bi
.
UriSource
=
new
Uri
(
m
,
UriKind
.
RelativeOrAbsolute
);
bi
.
EndInit
();
bi
.
Freeze
();
AccountPortrait
.
Source
=
bi
;
});
}
private
void
AccountChip_Click
(
object
sender
,
RoutedEventArgs
e
)
{
//点击了头像,请求下载高清版本头像
using
(
FormMatterRemind
fmr
=
new
FormMatterRemind
(
"正在下载图片"
,
SoftUserPortrait
.
ThreadPoolDownloadSizeLarge
))
{
fmr
.
ShowDialog
();
}
}
#
endregion
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录