using Autodesk.Revit.UI;
|
using System;
|
|
namespace HStation.RevitDev.RevitDataExport.Utility
|
{
|
public class DockPaneUtil
|
{
|
public static void HideAllDockablePane(UIControlledApplication uiControlledApp)
|
{
|
foreach (var panelPair in Common.GlobalResource.DockablePanelDict)
|
{
|
var strGuid = panelPair.Value;
|
Guid guid = new Guid(strGuid);
|
DockablePaneId id = new DockablePaneId(guid);
|
DockablePane pane = null;
|
try
|
{
|
pane = uiControlledApp.GetDockablePane(id);
|
}
|
catch (Exception ex)
|
{
|
string message = ex.Message;
|
}
|
if (pane != null && pane.IsShown())
|
{
|
pane.Hide();
|
}
|
}
|
}
|
|
public static void HideAllDockablePane(UIApplication uiApp)
|
{
|
foreach (var panelPair in Common.GlobalResource.DockablePanelDict)
|
{
|
var strGuid = panelPair.Value;
|
Guid guid = new Guid(strGuid);
|
DockablePaneId id = new DockablePaneId(guid);
|
DockablePane pane = null;
|
try
|
{
|
pane = uiApp.GetDockablePane(id);
|
}
|
catch (Exception ex)
|
{
|
string message = ex.Message;
|
}
|
if (pane != null && pane.IsShown())
|
{
|
pane.Hide();
|
}
|
}
|
}
|
}
|
}
|