完成显示主界面

This commit is contained in:
2025-07-26 12:19:05 +08:00
parent 2ee17c2560
commit 86dc3b670a
9 changed files with 18 additions and 36 deletions

View File

@@ -42,7 +42,7 @@
<Grid>
<taskbarNotification:TaskbarIcon x:Name="MyNotifyIcon"
ToolTipText="设备管理系统"
IconSource="/AppIcon2.ico"
IconSource="/Assets/AppIcon2.ico"
DoubleClickCommand="{Binding ShowWindowCommand}">
<taskbarNotification:TaskbarIcon.ContextMenu>
<ContextMenu>

View File

@@ -15,14 +15,12 @@ namespace DMS.WPF.Views;
public partial class MainView : Window
{
private readonly DataServices _dataServices;
private MainViewModel _viewModel;
public MainView(DataServices dataServices)
public MainView()
{
InitializeComponent();
_viewModel = App.Current.Services.GetRequiredService<MainViewModel>();
_dataServices = dataServices;
DataContext = _viewModel;
NlogHelper.Info("主界面加载成功");

View File

@@ -10,7 +10,7 @@
<Grid>
<Border CornerRadius="10" Background="#FF333333">
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Image Source="/Assets/AppIcon.png" Width="100" Height="100"/>
<Image Source="/Assets/AppIcon2.ico" Width="100" Height="100"/>
<TextBlock Text="{Binding LoadingMessage}" Foreground="White" FontSize="16" Margin="0,20,0,0"/>
</StackPanel>
</Border>