- 创建 .NET 8 WPF 项目 PersonalToolBox - 引入 NuGet 包: CommunityToolkit.Mvvm, System.Text.Json, Microsoft.Extensions.DependencyInjection - 建立 MVVM 目录结构: Models/ ViewModels/ Views/ Services/ Helpers/ - 实现 LogEntry 模型 (时间/日志级别/内容) - 实现 ILogService 接口与 LogService (线程安全, 通过 Dispatcher 推送到 UI) - 配置 DI 容器 (App.xaml.cs) 注册日志服务和主窗口 - 添加 .gitignore 文件
14 lines
559 B
XML
14 lines
559 B
XML
<Window x:Class="PersonalToolBox.Views.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:local="clr-namespace:PersonalToolBox.Views"
|
|
mc:Ignorable="d"
|
|
Title="个人工具箱" Height="600" Width="900"
|
|
WindowStartupLocation="CenterScreen">
|
|
<Grid>
|
|
|
|
</Grid>
|
|
</Window>
|