清理多余引用
This commit is contained in:
@@ -2,10 +2,6 @@
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
using ShrlAlgoToolkit.RevitAddins.Common.Assists;
|
||||
using ShrlAlgoToolkit;
|
||||
using ShrlAlgoToolkit.RevitAddins;
|
||||
|
||||
namespace ShrlAlgoToolkit.RevitAddins.Common.Assists;
|
||||
|
||||
public static class LogAssist
|
||||
@@ -20,7 +16,7 @@ public static class LogAssist
|
||||
{
|
||||
if (logFolder == default)
|
||||
{
|
||||
var assemblyPath = typeof(Assists.LogAssist).Assembly.Location;
|
||||
var assemblyPath = typeof(LogAssist).Assembly.Location;
|
||||
var directory = Path.GetDirectoryName(assemblyPath);
|
||||
logFolder = Path.Combine(directory, "Logs");
|
||||
}
|
||||
@@ -46,7 +42,7 @@ public static class LogAssist
|
||||
{
|
||||
if (logFolder == default)
|
||||
{
|
||||
var assemblyPath = typeof(Assists.LogAssist).Assembly.Location;
|
||||
var assemblyPath = typeof(LogAssist).Assembly.Location;
|
||||
var directory = Path.GetDirectoryName(assemblyPath);
|
||||
logFolder = $"{directory}\\Logs";
|
||||
}
|
||||
@@ -81,7 +77,7 @@ public static class LogAssist
|
||||
{
|
||||
var filePath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + $"\\{fileName}.txt";
|
||||
File.WriteAllText(filePath, sb.ToString());
|
||||
System.Diagnostics.Process.Start(filePath);
|
||||
Process.Start(filePath);
|
||||
}
|
||||
|
||||
public static void WriteTextFile(this string lineContent, string filePath)
|
||||
@@ -132,10 +128,10 @@ public static class LogAssist
|
||||
}
|
||||
|
||||
var t = ex.GetType();
|
||||
var currentUICulture = System.Threading.Thread.CurrentThread.CurrentUICulture;
|
||||
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("zh-CN");
|
||||
var currentUICulture = Thread.CurrentThread.CurrentUICulture;
|
||||
Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("zh-CN");
|
||||
var o = Activator.CreateInstance(t);
|
||||
System.Threading.Thread.CurrentThread.CurrentUICulture = currentUICulture;
|
||||
Thread.CurrentThread.CurrentUICulture = currentUICulture;
|
||||
|
||||
return ((Exception)o).Message;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user