添加项目
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Collections;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Windows;
|
||||
|
||||
using Autodesk.Revit.DB;
|
||||
@@ -151,9 +154,14 @@ public class FamilyApp
|
||||
gallery.RowsInWindowMode = 1;
|
||||
gallery.ShowImage = true;
|
||||
gallery.MinWidth = 400;
|
||||
var resourceLocator = new Uri("ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml", UriKind.Relative);
|
||||
var dictionary = (ResourceDictionary)Application.LoadComponent(resourceLocator);
|
||||
|
||||
// 1. 获取当前程序集的短名称 (例如 "ShrlAlgoToolkit.RevitAddins")
|
||||
string assemblyName = Assembly.GetExecutingAssembly().GetName().Name;
|
||||
// 2. 拼接 Pack URI
|
||||
// 注意:格式通常是 "/{程序集名称};component/{路径}"
|
||||
var resourceLocator = new Uri($"/{assemblyName};component/WPFUI.xaml", UriKind.Relative);
|
||||
|
||||
var dictionary = (ResourceDictionary)Application.LoadComponent(resourceLocator);
|
||||
gallery.ItemTemplate = (DataTemplate)dictionary["FamilyGalleryItemTemplate"];
|
||||
//绑定数据
|
||||
gallery.ItemsBinding = new System.Windows.Data.Binding
|
||||
@@ -165,11 +173,9 @@ public class FamilyApp
|
||||
};
|
||||
//绑定样式
|
||||
}
|
||||
|
||||
public void CreateFamilyUI(UIControlledApplication application)
|
||||
{
|
||||
//AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
|
||||
|
||||
//application.CreateRibbonTab(TabName);
|
||||
|
||||
//UserPanel.AddAwItem(_loginPBData);
|
||||
|
||||
@@ -541,7 +541,7 @@ public class ModifyTabApp
|
||||
IsCheckable = true,
|
||||
Orientation = Orientation.Vertical,
|
||||
CommandHandler = new RelayCommand(
|
||||
() => WinDialogHelper.ShowModeless<DetailSelectFiltersView>(new DetailSelectFiltersViewModel(uiapp, handler)),
|
||||
() => WinDialogAssist.ShowModeless<DetailSelectFiltersView>(new DetailSelectFiltersViewModel(uiapp, handler)),
|
||||
() =>
|
||||
UIDocument?.Selection
|
||||
.GetElementIds()
|
||||
@@ -594,7 +594,7 @@ public class ModifyTabApp
|
||||
IsCheckable = true,
|
||||
Orientation = Orientation.Vertical,
|
||||
CommandHandler = new RelayCommand(
|
||||
() => WinDialogHelper.ShowModeless<DetailSelectFiltersView>(new DetailSelectFiltersViewModel(uiapp, handler)),
|
||||
() => WinDialogAssist.ShowModeless<DetailSelectFiltersView>(new DetailSelectFiltersViewModel(uiapp, handler)),
|
||||
() =>
|
||||
UIDocument?.Selection
|
||||
.GetElementIds()
|
||||
|
||||
@@ -223,7 +223,6 @@ public class RvApp : ExternalApplication
|
||||
Resources.clash_resolve_32px,
|
||||
Resources.clash_resolve_16px
|
||||
);
|
||||
|
||||
var headroomCheck = UIAssist.NewPushButtonData<HeadroomCheckCmd>(
|
||||
"净高检查",
|
||||
Resources.head_room_32px,
|
||||
@@ -292,7 +291,6 @@ public class RvApp : ExternalApplication
|
||||
Resources.template_16px,
|
||||
"对项目样板进行批量处理"
|
||||
);
|
||||
|
||||
var autoSavePbd = UIAssist.NewPushButtonData<AutoSaveCmd>("定时保存", Resources.save_32px, Resources.save_16px);
|
||||
var purgeBtn = UIAssist.NewPushButtonData<PureModelCmd>(
|
||||
"清理模型",
|
||||
|
||||
Reference in New Issue
Block a user