大量更新

This commit is contained in:
GG Z
2025-12-23 21:37:02 +08:00
parent 3fc465959b
commit b611efeed9
105 changed files with 5814 additions and 371 deletions

View File

@@ -214,7 +214,7 @@ public class UIRibbon : ExternalApplication
{
LargeImage = Resources.MoveModel_32px.ToBitmapSource(),
ToolTip = "在平、立面、剖面视图下移动全部模型",
LongDescription= "部分图元无法移动或移动会错位,需手动处理,如:基于面放置的族实例等,如果发生严重错误,如部分草图楼梯移动发生严重错误,可以尝试剪切粘贴后再使用此命令",
LongDescription = "部分图元无法移动或移动会错位,需手动处理,如:基于面放置的族实例等,如果发生严重错误,如部分草图楼梯移动发生严重错误,可以尝试剪切粘贴后再使用此命令",
AvailabilityClassName = typeof(EnableOnPlanOrSection).FullName
};
PushButtonData getCoordinate =
@@ -351,6 +351,14 @@ public class UIRibbon : ExternalApplication
LargeImage = Resources.WriteFacilityCode_32px.ToBitmapSource(),
ToolTip = "设备编号提取、写入",
};
PushButtonData writeFacilityInfo =
new(nameof(FacilityInfoProcessCmd), "设备信息", AddInPath, typeof(FacilityInfoProcessCmd).FullName)
{
//Image = ConvertFromBitmap(Resources.cmd_16px),
LargeImage = Resources.Facility_Info_Process_32px.ToBitmapSource(),
ToolTip = "给设备构件批量添加信息",
LongDescription = "Excel需要包含设备、设备参数、部署范围三列设备参数列的每个单元格中每行一个参数参数表达例如“品牌日立”"
};
PushButtonData afcaMetroManager =
new(nameof(AFCAMetroCmd), "轨交交付", AddInPath, typeof(AFCAMetroCmd).FullName)
{
@@ -358,7 +366,8 @@ public class UIRibbon : ExternalApplication
ToolTip = "按轨道交通交付标准要求,添加、填写、修改属性",
AvailabilityClassName = typeof(OnActiveProjectDocument).FullName
};
standardPanel.AddSplitButton(new("土建工具", "土建工具"), geologyByLoop, resolveLevelPbd, levelSeparatePbd, splittingPbd, slopeFloorCreator, resolveConnection, addViewFilters);
standardPanel.AddSplitButton(new("房间功能", "房间功能"), room3D, roomNaming, roomNameAssign);
standardPanel.AddSplitButton(new("基点功能", "基点功能"), resetCoordinate, getCoordinate, moveModel);
@@ -370,10 +379,10 @@ public class UIRibbon : ExternalApplication
//standardPanel.AddItem(dwgBlockModelCreator);
//standardPanel.AddItem(trackCreator);
standardPanel.AddSplitButton(new("清理工具", "清理工具"), pureModel, setDisplay);
standardPanel.AddSplitButton(new("参数管理", "参数管理"), parameterManager, eamManager, eamCodeManager, mappingManager, writeFacilityCode);
standardPanel.AddSplitButton(new("参数管理", "参数管理"), parameterManager, afcaMetroManager, eamManager, eamCodeManager, mappingManager, writeFacilityCode, writeFacilityInfo);
standardPanel.AddSplitButton(new("参数修改", "参数修改"), parameterWriter, relacePropValue, removeProps);
//standardPanel.AddSplitButton(new("交付管理", "交付管理"), afcaMetroManager, afcaArchiManager);
standardPanel.AddItem(afcaMetroManager);
//standardPanel.AddItem(afcaMetroManager);
}
private void ComponentManager_UIElementActivated(object sender, UIElementActivatedEventArgs e)
@@ -584,7 +593,14 @@ public class UIRibbon : ExternalApplication
DisplayApp(displayPanel);
var generalPanel = application.CreateRibbonPanel(TabName, "其他");
PushButtonData compareProject =
new(nameof(CompareProjectDiffCmd), "文档比较", AddInPath, typeof(CompareProjectDiffCmd).FullName)
{
Image = Resources.compare_project_16px.ToBitmapSource(),
LargeImage = Resources.compare_project_32px.ToBitmapSource(),
ToolTip = "对比两个文档之间的构件差异",
AvailabilityClassName = typeof(OnActiveProjectDocument).FullName
};
PushButtonData elementsControlPbData =
new(nameof(ElementsControlCmd), "对象控制", AddInPath, typeof(ElementsControlCmd).FullName)
{
@@ -627,6 +643,7 @@ public class UIRibbon : ExternalApplication
//ElementsControlPBData.LargeImage = ConvertFromBitmap(Resources.Control_Panel_32px);
//ZoomRBGroup = CreateViewToggleButton(generalPanel);
CreateToggleButton(tab, "其他");
generalPanel.AddItem(compareProject);
generalPanel.AddSplitButton(new("显示控制", "显示控制"), categoryControlPbData, elementsControlPbData);
//generalPanel.AddItem(categoryControlPbData);
generalPanel.AddItem(autoSave);
@@ -1377,10 +1394,17 @@ public class UIRibbon : ExternalApplication
//if (FAIRTab.Panels.Count == 0) FAIRTab.IsVisible = false;
}
}
private static void CreateLogger()
{
AppDomain.CurrentDomain.UnhandledException += (_, args) =>
{
var e = (Exception)args.ExceptionObject;
LogAssists.WriteLog(e.Message);
};
}
public override void OnStartup()
{
CreateLogger();
UpdateCheck();
zoomElementHandler = new();
saveHandler = new();
@@ -1425,6 +1449,11 @@ public class UIRibbon : ExternalApplication
// Assembly.LoadFrom(services);
//}
}
public override void OnShutdown()
{
Application.ControlledApplication.ApplicationInitialized -= ControlledApplication_ApplicationInitialized;
GlobalVariables.Timer.Stop();
}
/// <summary>
/// 上传使用数据
/// </summary>