优化更新

This commit is contained in:
GG Z
2025-02-10 20:53:40 +08:00
parent 83b846f15f
commit 9696128f03
62 changed files with 2567 additions and 1608 deletions

View File

@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection;
using Autodesk.Revit.UI;
@@ -37,8 +34,26 @@ namespace Sai.Toolkit.Revit.Helpers
}
dictionary.Add(id, shortcutItem);
List<UIFrameworkServices.ShortcutItem> list = dictionary.Select((KeyValuePair<string, UIFrameworkServices.ShortcutItem> e) => e.Value).ToList<UIFrameworkServices.ShortcutItem>();
this.SaveShortcuts(list);
this.ArmCommands();
/* 项目“Sai.RvKits (net481)”的未合并的更改
在此之前:
this.SaveShortcuts(list);
this.ArmCommands();
在此之后:
SaveShortcuts(list);
this.ArmCommands();
*/
KeyboardShortcutService.SaveShortcuts(list);
/* 项目“Sai.RvKits (net481)”的未合并的更改
在此之前:
this.ArmCommands();
return true;
在此之后:
ArmCommands();
return true;
*/
KeyboardShortcutService.ArmCommands();
return true;
}
return false;
@@ -71,8 +86,26 @@ namespace Sai.Toolkit.Revit.Helpers
}
dictionary.Add(item.Key, shortcutItem);
List<UIFrameworkServices.ShortcutItem> list = dictionary.Select((KeyValuePair<string, UIFrameworkServices.ShortcutItem> e) => e.Value).ToList<UIFrameworkServices.ShortcutItem>();
this.SaveShortcuts(list);
this.ArmCommands();
/* 项目“Sai.RvKits (net481)”的未合并的更改
在此之前:
this.SaveShortcuts(list);
this.ArmCommands();
在此之后:
SaveShortcuts(list);
this.ArmCommands();
*/
KeyboardShortcutService.SaveShortcuts(list);
/* 项目“Sai.RvKits (net481)”的未合并的更改
在此之前:
this.ArmCommands();
return true;
在此之后:
ArmCommands();
return true;
*/
KeyboardShortcutService.ArmCommands();
return true;
}
}
@@ -155,8 +188,26 @@ namespace Sai.Toolkit.Revit.Helpers
{
dictionary.Remove(id);
List<UIFrameworkServices.ShortcutItem> list = dictionary.Select((KeyValuePair<string, UIFrameworkServices.ShortcutItem> e) => e.Value).ToList<UIFrameworkServices.ShortcutItem>();
this.SaveShortcuts(list);
this.ArmCommands();
/* 项目“Sai.RvKits (net481)”的未合并的更改
在此之前:
this.SaveShortcuts(list);
this.ArmCommands();
在此之后:
SaveShortcuts(list);
this.ArmCommands();
*/
KeyboardShortcutService.SaveShortcuts(list);
/* 项目“Sai.RvKits (net481)”的未合并的更改
在此之前:
this.ArmCommands();
return true;
在此之后:
ArmCommands();
return true;
*/
KeyboardShortcutService.ArmCommands();
return true;
}
return false;
@@ -214,7 +265,7 @@ namespace Sai.Toolkit.Revit.Helpers
/// <summary>
/// 加载命令
/// </summary>
public void LoadCommands()
public static void LoadCommands()
{
ShortcutsHelper.LoadCommands();
}
@@ -228,7 +279,7 @@ namespace Sai.Toolkit.Revit.Helpers
/// <summary>
/// 应用更改
/// </summary>
private void ArmCommands()
private static void ArmCommands()
{
ShortcutsHelper.ArmCommands();
}
@@ -244,7 +295,7 @@ namespace Sai.Toolkit.Revit.Helpers
/// 保存ShortcutItems
/// </summary>
/// <param name="shortcutList"></param>
private void SaveShortcuts(ICollection<UIFrameworkServices.ShortcutItem> shortcutList)
private static void SaveShortcuts(ICollection<UIFrameworkServices.ShortcutItem> shortcutList)
{
ShortcutsHelper.SaveShortcuts(shortcutList);
}