清理多余引用
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
using Autodesk.Revit.DB;
|
||||
|
||||
using ShrlAlgoToolkit.RevitAddins.RvCommon;
|
||||
using ShrlAlgoToolkit;
|
||||
using ShrlAlgoToolkit.RevitAddins;
|
||||
|
||||
namespace ShrlAlgoToolkit.RevitAddins.General;
|
||||
|
||||
internal class AlignModelElement
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
using ShrlAlgoToolkit.RevitAddins.RvCommon;
|
||||
using ShrlAlgoToolkit;
|
||||
using ShrlAlgoToolkit.RevitAddins;
|
||||
|
||||
namespace ShrlAlgoToolkit.RevitAddins.General;
|
||||
|
||||
public enum AlignType
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
using Nice3point.Revit.Toolkit.External;
|
||||
|
||||
using ShrlAlgoToolkit.RevitAddins.RvCommon;
|
||||
using ShrlAlgoToolkit;
|
||||
using ShrlAlgoToolkit.RevitAddins;
|
||||
|
||||
namespace ShrlAlgoToolkit.RevitAddins.General;
|
||||
|
||||
@@ -20,18 +18,18 @@ public class AutoSaveCmd : ExternalCommand
|
||||
return;
|
||||
}
|
||||
AutoSaveViewModel viewModel = new();
|
||||
General.AutoSaveView view = new()
|
||||
AutoSaveView view = new()
|
||||
{
|
||||
DataContext = viewModel
|
||||
};
|
||||
view.ShowDialog();
|
||||
|
||||
if (RevitAddins.Properties.Settings.Default.IsActiveAutoSave)
|
||||
if (Properties.Settings.Default.IsActiveAutoSave)
|
||||
{
|
||||
if (RevitAddins.Properties.Settings.Default.AutoSaveIntervalTime >= 1)
|
||||
if (Properties.Settings.Default.AutoSaveIntervalTime >= 1)
|
||||
{
|
||||
timer.Interval = RevitAddins.Properties.Settings.Default.AutoSaveIntervalTime * 60 * 1000;
|
||||
RevitAddins.Properties.Settings.Default.Save();
|
||||
timer.Interval = Properties.Settings.Default.AutoSaveIntervalTime * 60 * 1000;
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
//timer.Enabled = Properties.Settings.Default.AutoSave;
|
||||
timer.Start();
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
using Melskin.Controls;
|
||||
|
||||
using ShrlAlgoToolkit.RevitAddins.RvCommon;
|
||||
using ShrlAlgoToolkit;
|
||||
using ShrlAlgoToolkit.RevitAddins;
|
||||
|
||||
namespace ShrlAlgoToolkit.RevitAddins.General;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -9,8 +9,8 @@ public partial class AutoSaveViewModel : ObservableValidator
|
||||
{
|
||||
public AutoSaveViewModel()
|
||||
{
|
||||
IsActiveAutoSave = RevitAddins.Properties.Settings.Default.IsActiveAutoSave;
|
||||
IntervalTime = RevitAddins.Properties.Settings.Default.AutoSaveIntervalTime;
|
||||
IsActiveAutoSave = Properties.Settings.Default.IsActiveAutoSave;
|
||||
IntervalTime = Properties.Settings.Default.AutoSaveIntervalTime;
|
||||
}
|
||||
[ObservableProperty]
|
||||
public partial bool IsActiveAutoSave { get; set; }
|
||||
@@ -30,9 +30,9 @@ public partial class AutoSaveViewModel : ObservableValidator
|
||||
[RelayCommand]
|
||||
private void Closing()
|
||||
{
|
||||
RevitAddins.Properties.Settings.Default.IsActiveAutoSave = IsActiveAutoSave;
|
||||
RevitAddins.Properties.Settings.Default.AutoSaveIntervalTime = IntervalTime;
|
||||
RevitAddins.Properties.Settings.Default.Save();
|
||||
Properties.Settings.Default.IsActiveAutoSave = IsActiveAutoSave;
|
||||
Properties.Settings.Default.AutoSaveIntervalTime = IntervalTime;
|
||||
Properties.Settings.Default.Save();
|
||||
Variables.AutoSaveTimer.Interval = IntervalTime * 60 * 1000;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,5 @@
|
||||
using Melskin.Controls;
|
||||
|
||||
using ShrlAlgoToolkit.RevitAddins.RvCommon;
|
||||
using ShrlAlgoToolkit;
|
||||
using ShrlAlgoToolkit.RevitAddins;
|
||||
|
||||
namespace ShrlAlgoToolkit.RevitAddins.General
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -5,10 +5,6 @@ using Autodesk.Revit.DB;
|
||||
using eTransmitForRevitDB;
|
||||
using Nice3point.Revit.Toolkit.External;
|
||||
|
||||
using ShrlAlgoToolkit.RevitAddins.RvCommon;
|
||||
using ShrlAlgoToolkit;
|
||||
using ShrlAlgoToolkit.RevitAddins;
|
||||
|
||||
namespace ShrlAlgoToolkit.RevitAddins.General;
|
||||
|
||||
/// <summary>
|
||||
@@ -21,7 +17,7 @@ public class PureModelCmd : ExternalCommand
|
||||
{
|
||||
if (string.IsNullOrEmpty(Document.PathName))
|
||||
{
|
||||
System.Windows.MessageBox.Show("请先保存文件");
|
||||
MessageBox.Show("请先保存文件");
|
||||
return;
|
||||
}
|
||||
var result = MessageBox.Show("是否清理项目中的所有未使用项", "询问", MessageBoxButton.YesNo, MessageBoxImage.Question);
|
||||
@@ -39,7 +35,7 @@ public class PureModelCmd : ExternalCommand
|
||||
{
|
||||
Purge(Document);
|
||||
Document.SaveAs(Document.PathName, options);
|
||||
System.Windows.MessageBox.Show("清理完成", "提示");
|
||||
MessageBox.Show("清理完成", "提示");
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
using Autodesk.Revit.Attributes;
|
||||
using Nice3point.Revit.Toolkit.External;
|
||||
using ShrlAlgoToolkit.RevitAddins.Common.Assists;
|
||||
using ShrlAlgoToolkit.RevitAddins.ModelManager;
|
||||
using ShrlAlgoToolkit;
|
||||
using ShrlAlgoToolkit.RevitAddins;
|
||||
|
||||
namespace ShrlAlgoToolkit.RevitAddins.General;
|
||||
[Transaction(TransactionMode.Manual)]
|
||||
@@ -13,6 +10,6 @@ public class SeparateModelCmd : ExternalCommand
|
||||
{
|
||||
//var win = new SeparateModelWin();
|
||||
//win.Show();
|
||||
Common.Assists.WinDialogAssist.ShowOrActivate<General.SeparateModelWin, General.SeparateModelViewModel>();
|
||||
WinDialogAssist.ShowOrActivate<SeparateModelWin, SeparateModelViewModel>();
|
||||
}
|
||||
}
|
||||
@@ -6,10 +6,6 @@ using CommunityToolkit.Mvvm.Input;
|
||||
using Nice3point.Revit.Toolkit.External.Handlers;
|
||||
using UIFrameworkServices;
|
||||
|
||||
using ShrlAlgoToolkit.RevitAddins.ModelManager;
|
||||
using ShrlAlgoToolkit;
|
||||
using ShrlAlgoToolkit.RevitAddins;
|
||||
|
||||
namespace ShrlAlgoToolkit.RevitAddins.General
|
||||
{
|
||||
public partial class SeparateModelViewModel : ObservableObject
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
using Melskin.Controls;
|
||||
|
||||
using ShrlAlgoToolkit.RevitAddins.ModelManager;
|
||||
using ShrlAlgoToolkit;
|
||||
using ShrlAlgoToolkit.RevitAddins;
|
||||
|
||||
namespace ShrlAlgoToolkit.RevitAddins.General;
|
||||
/// <summary>
|
||||
/// SeparateModelWin.xaml 的交互逻辑
|
||||
|
||||
Reference in New Issue
Block a user