更新整理
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
using Autodesk.Revit.UI;
|
||||
using Autodesk.Windows;
|
||||
|
||||
using ShrlAlgoToolkit.RevitAddins.Properties;
|
||||
|
||||
namespace ShrlAlgo.RvKits.UIRibbon;
|
||||
namespace ShrlAlgoToolkit.RevitAddins.UIRibbon;
|
||||
|
||||
public class TabManagerApp
|
||||
{
|
||||
public TabManagerApp(UIControlledApplication application)
|
||||
{
|
||||
var tab = RibbonControl.Tabs.First(t => t.Name == Properties.Settings.Default.TabName);
|
||||
var tab = RibbonControl.Tabs.First(t => t.Name == RevitAddins.Properties.Settings.Default.TabName);
|
||||
|
||||
SetTabControl(tab);
|
||||
application.ViewActivating += Application_ViewActivating;
|
||||
@@ -20,7 +21,7 @@ public class TabManagerApp
|
||||
|
||||
private void InsertQuickAccessAndHidePanel()
|
||||
{
|
||||
var tab = RibbonControl.FindTab(Properties.Settings.Default.TabName);
|
||||
var tab = RibbonControl.FindTab(RevitAddins.Properties.Settings.Default.TabName);
|
||||
|
||||
if (tab != null && addInManagerPanel != null)
|
||||
{
|
||||
@@ -46,8 +47,8 @@ public class TabManagerApp
|
||||
Text = "插件管理",
|
||||
Name = "插件管理",
|
||||
Description = "控制插件在Revit界面上的显示",
|
||||
Image = Properties.Resources.addin_16px.ToBitmapSource(),
|
||||
LargeImage = Properties.Resources.addin_32px.ToBitmapSource(),
|
||||
Image = Resources.addin_16px.ToBitmapSource(),
|
||||
LargeImage = Resources.addin_32px.ToBitmapSource(),
|
||||
ShowText = true,
|
||||
ShowImage = true,
|
||||
ToolTip = "控制插件在Revit界面上的显示",
|
||||
@@ -63,7 +64,7 @@ public class TabManagerApp
|
||||
var ribbon = ComponentManager.Ribbon;
|
||||
foreach (var tab in ribbon.Tabs)
|
||||
{
|
||||
if (tab.GetType() == typeof(RibbonTab) && tab.Title != Properties.Settings.Default.TabName)
|
||||
if (tab.GetType() == typeof(RibbonTab) && tab.Title != RevitAddins.Properties.Settings.Default.TabName)
|
||||
{
|
||||
RibbonToggleButton ribbonToggleButton =
|
||||
new()
|
||||
@@ -132,7 +133,7 @@ public class TabManagerApp
|
||||
//如果是族文档,在激活视图时,隐藏面板
|
||||
private void Application_ViewActivating(object sender, Autodesk.Revit.UI.Events.ViewActivatingEventArgs e)
|
||||
{
|
||||
SetTabEnabled(Properties.Settings.Default.TabName, !e.NewActiveView.Document.IsFamilyDocument);
|
||||
SetTabEnabled(RevitAddins.Properties.Settings.Default.TabName, !e.NewActiveView.Document.IsFamilyDocument);
|
||||
}
|
||||
|
||||
private void ControlledApplication_ApplicationInitialized(object sender, Autodesk.Revit.DB.Events.ApplicationInitializedEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user