Skip to content

Commit f44c0dc

Browse files
committed
修改主界面显示
1 parent f6ded5b commit f44c0dc

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

软件系统客户端Wpf/MainWindow.xaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,12 @@
257257
</Grid.ColumnDefinitions>
258258

259259
<TextBlock Grid.Row="0" Grid.Column="0">共享文件:</TextBlock>
260+
<Border Grid.Row="0" Grid.Column="1" BorderThickness="1" BorderBrush="{DynamicResource PrimaryHueMidBrush}"
261+
CornerRadius="2" MouseLeftButtonDown="Border_MouseLeftButtonDown" Cursor="Hand"
262+
Background="{DynamicResource PrimaryHueLightBrush}">
263+
<TextBlock HorizontalAlignment="Right" x:Name="TextBlock_FileCount" Margin="0,0,5,0" ScrollViewer.VerticalScrollBarVisibility="Disabled"
264+
>0</TextBlock>
265+
</Border>
260266
<TextBlock Grid.Row="1" Grid.Column="0">在线信息:</TextBlock>
261267
<ListBox Grid.Row="2" Grid.ColumnSpan="2" x:Name="ListBox_Onlines" FontSize="10.5"></ListBox>
262268
</Grid>

软件系统客户端Wpf/MainWindow.xaml.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,14 @@ private void Button_Quit_Click(object sender, RoutedEventArgs e)
361361
Close();
362362
}
363363

364+
365+
private void Border_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
366+
{
367+
//点击了文件查看
368+
MessageBox.Show("点击了文件");
369+
}
370+
371+
364372
#endregion
365373

366374

@@ -436,15 +444,15 @@ private void Net_socket_client_AcceptString(AsyncStateOne state, int customer, s
436444
if (IsWindowShow) Dispatcher.Invoke(new Action(() =>
437445
{
438446
TextBlock_ServerTime.Text = UserClient.DateTimeServer.ToString("yyyy-MM-dd HH:mm:ss");
439-
//label_file_count.Text = json["FileCount"].ToObject<int>().ToString();
447+
TextBlock_FileCount.Text = json["FileCount"].ToObject<int>().ToString();
440448
UIControls_Chat.AddChatsHistory(sb.ToString());
441449
}));
442450
}
443451
else if (customer == CommonHeadCode.MultiNetHeadCode.文件总数量)
444452
{
445453
if (IsWindowShow) Dispatcher.Invoke(new Action(() =>
446454
{
447-
//label_file_count.Text = data;
455+
TextBlock_FileCount.Text = data;
448456
}));
449457
}
450458
else if (customer == CommonHeadCode.MultiNetHeadCode.留言版消息)
@@ -733,9 +741,9 @@ private void SetShowRenderControl(Type typeControl)
733741

734742
private void Button_BackMain_Click(object sender, RoutedEventArgs e)
735743
{
744+
//点击了主页
736745
SetShowRenderControl(UIControl_Home);
737746
}
738747

739-
740748
}
741749
}

软件系统客户端Wpf/Views/UserHome.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
</StackPanel>
102102
</Button>
103103
<TextBlock Foreground="{DynamicResource MaterialDesignBodyLight}" TextWrapping="Wrap" Margin="16" VerticalAlignment="Center">
104-
本项目的开源地址请点击右侧按钮。
104+
本项目的开源地址请点击右侧按钮。授权:MIT
105105
</TextBlock>
106106
</DockPanel>
107107
</Border>

0 commit comments

Comments
 (0)