|
6 | 6 | using System.Linq; |
7 | 7 | using System.Windows; |
8 | 8 | using System.Windows.Documents; |
| 9 | +using Flow.Launcher.Helper; |
9 | 10 | using Flow.Launcher.Infrastructure; |
10 | 11 | using Flow.Launcher.Infrastructure.Logger; |
11 | 12 | using Flow.Launcher.Plugin.SharedCommands; |
12 | | -using Flow.Launcher.Infrastructure.Exception; |
13 | 13 |
|
14 | 14 | namespace Flow.Launcher |
15 | 15 | { |
@@ -55,12 +55,11 @@ private void SetException(Exception exception) |
55 | 55 | ErrorTextbox.Document.Blocks.Add(paragraph); |
56 | 56 |
|
57 | 57 | StringBuilder content = new StringBuilder(); |
58 | | - content.AppendLine(RuntimeInfo()); |
| 58 | + content.AppendLine(ErrorReporting.RuntimeInfo()); |
| 59 | + content.AppendLine(ErrorReporting.DependenciesInfo()); |
59 | 60 | content.AppendLine(); |
60 | | - content.AppendLine(DependenciesInfo()); |
61 | | - content.AppendLine(); |
62 | | - content.AppendLine(string.Format(App.API.GetTranslation("reportWindow_date"), DateTime.Now.ToString(CultureInfo.InvariantCulture))); |
63 | | - content.AppendLine(App.API.GetTranslation("reportWindow_exception")); |
| 61 | + content.AppendLine($"Date: {DateTime.Now.ToString(CultureInfo.InvariantCulture)}"); |
| 62 | + content.AppendLine("Exception:"); |
64 | 63 | content.AppendLine(exception.ToString()); |
65 | 64 | paragraph = new Paragraph(); |
66 | 65 | paragraph.Inlines.Add(content.ToString()); |
@@ -94,27 +93,5 @@ private void BtnCancel_OnClick(object sender, RoutedEventArgs e) |
94 | 93 | { |
95 | 94 | Close(); |
96 | 95 | } |
97 | | - |
98 | | - private static string RuntimeInfo() |
99 | | - { |
100 | | - var info = |
101 | | - $""" |
102 | | - Flow Launcher {App.API.GetTranslation("reportWindow_version")}: {Constant.Version} |
103 | | - OS {App.API.GetTranslation("reportWindow_version")}: {ExceptionFormatter.GetWindowsFullVersionFromRegistry()} |
104 | | - IntPtr {App.API.GetTranslation("reportWindow_length")}: {IntPtr.Size} |
105 | | - x64: {Environment.Is64BitOperatingSystem} |
106 | | - """; |
107 | | - return info; |
108 | | - } |
109 | | - |
110 | | - private static string DependenciesInfo() |
111 | | - { |
112 | | - var info = |
113 | | - $""" |
114 | | - {App.API.GetTranslation("pythonFilePath")}: {Constant.PythonPath} |
115 | | - {App.API.GetTranslation("nodeFilePath")}: {Constant.NodePath} |
116 | | - """; |
117 | | - return info; |
118 | | - } |
119 | 96 | } |
120 | 97 | } |
0 commit comments