A:添加日志类

This commit is contained in:
jimmy committed 2025-05-26 23:10:26 +08:00
1 parent eaaedd48cf
commit efcdf01436
14 files changed
+666 -4

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
<Application x:Class="UI.Shared.Wpf.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:UI.Shared.Wpf"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>
+12
View File
@@ -0,0 +1,12 @@
using System.Configuration;
using System.Data;
using System.Windows;
namespace UI.Shared.Wpf;
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
+10
View File
@@ -0,0 +1,10 @@
using System.Windows;
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]
+12
View File
@@ -0,0 +1,12 @@
<Window x:Class="UI.Shared.Wpf.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:UI.Shared.Wpf"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
</Grid>
</Window>
+23
View File
@@ -0,0 +1,23 @@
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace UI.Shared.Wpf;
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
+9
View File
@@ -0,0 +1,9 @@
| 模块 | 说明 |
| ---------- | ------------------------------------------------------------------------------------- |
| 🔥 全局异常处理 | `App.xaml.cs` 注册的 `DispatcherUnhandledException`、`AppDomain.UnhandledException` 等逻辑封装 |
| 🔧 异常日志捕捉器 | 异常信息收集、弹窗提示、自动日志写入 |
| 🧠 通用行为类 | 拖拽移动窗口、全屏控制、窗口热键等 |
| 🎨 通用控件 | Loading 动画、消息弹窗、状态提示组件 |
| 💡 通用转换器 | `BoolToVisibilityConverter`, `EnumToDescriptionConverter` |
| 🌈 样式资源 | `Generic.xaml`, Theme, 通用 `DataTemplate` |
| 🛠 辅助类 | `UIHelper`, `WindowHelper`, `DialogManager` |
+11
View File
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UseWPF>true</UseWPF>
</PropertyGroup>
</Project>