Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
bugfix: 修复报告导出功能 修复信息弹窗没有换行
Browse files Browse the repository at this point in the history
  • Loading branch information
Forgot-Dream committed Feb 27, 2024
1 parent 886b8f8 commit 65f0dca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
10 changes: 7 additions & 3 deletions SduNetCheckTool.GUI/Views/Dialogs/InfoDialog.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
xmlns:ui="http://schemas.modernwpf.com/2019"
d:DesignHeight="450"
d:DesignWidth="800"
DefaultButton="Close"
CloseButtonText="我知道了"
DefaultButton="Close"
mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
Expand All @@ -18,9 +18,13 @@
</Grid.RowDefinitions>
<TextBlock
FontSize="20"
Text="提示"
FontWeight="Bold"
Text="提示"
TextAlignment="Left" />
<TextBlock Grid.Row="1" Margin="4,8" x:Name="Description" />
<TextBlock
x:Name="Description"
Grid.Row="1"
Margin="4,8"
TextWrapping="Wrap" />
</Grid>
</ui:ContentDialog>
8 changes: 4 additions & 4 deletions SduNetCheckTool.Mvvm/Utils/FileUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ namespace SduNetCheckTool.Mvvm.Utils
{
public static class FileUtil
{
public static string ExportPath = Directory.GetCurrentDirectory() + "\\报告";
public static string ExportPath = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
public static string ExportReport(ObservableCollection<DetectionTask> tasks)
{
var exportFilePath = ExportPath + "\\" + System.DateTime.Now.ToString("yyyy-MM-dd-hh-mm-ss") + ".txt";
var exportFilePath = ExportPath + "\\报告-" + DateTime.Now.ToString("yyyy-MM-dd-hh-mm-ss") + ".txt";

if (tasks.Any(i => i.TaskStatusEnum == TaskStatusEnum.Waiting))
return null;
Expand All @@ -28,7 +28,7 @@ public static string ExportReport(ObservableCollection<DetectionTask> tasks)
return exportFilePath;
}

public static string ReadFile(string filePath)
/*public static string ReadFile(string filePath)
{
if (!File.Exists(filePath)) return "FileNotExists";
Expand All @@ -49,6 +49,6 @@ public static string ReadFile(string filePath)
//
}
return "-1";
}
}*/
}
}

0 comments on commit 65f0dca

Please sign in to comment.