添加项目文件。
This commit is contained in:
52
Szmedi.RvKits/InfoManager/Delivery/ParamManagerCmd.cs
Normal file
52
Szmedi.RvKits/InfoManager/Delivery/ParamManagerCmd.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Interop;
|
||||
|
||||
using Autodesk.Revit.Attributes;
|
||||
using Autodesk.Revit.DB;
|
||||
|
||||
using Nice3point.Revit.Toolkit.External;
|
||||
|
||||
using Szmedi.RvKits.Assists;
|
||||
|
||||
|
||||
namespace Szmedi.RvKits.InfoManager
|
||||
{
|
||||
[Transaction(TransactionMode.Manual)]
|
||||
|
||||
public class ParamManagerCmd : ExternalCommand
|
||||
{
|
||||
|
||||
public override void Execute()
|
||||
{
|
||||
if (WinIntPtr.IsVisible("深圳市交付标准"))
|
||||
{
|
||||
WinIntPtr.ShowAndActive("深圳市交付标准");
|
||||
}
|
||||
else
|
||||
{
|
||||
//AssemblyLoaderHelpers loader = new(GlobalVariables.DirAssembly);
|
||||
//loader.HookAssemblyResolve();
|
||||
try
|
||||
{
|
||||
ParamManagerWin win =
|
||||
new(UiApplication);
|
||||
|
||||
new WindowInteropHelper(win) { Owner = System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle };
|
||||
win.Show();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show(e.Message);
|
||||
LogAssists.WriteLog(e.StackTrace);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
//loader.UnhookAssemblyResolve();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user