清理多余引用

This commit is contained in:
2026-02-24 11:34:18 +08:00
parent 4961914919
commit 0ba966cef2
163 changed files with 279 additions and 840 deletions

View File

@@ -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;
}