Created
July 20, 2020 06:18
-
-
Save chuongmep/42a461e5143911d71c73cf1d39f95ee8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Transaction(TransactionMode.Manual)] | |
[Regeneration(RegenerationOption.Manual)] | |
class Command : IExternalCommand | |
{ | |
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) | |
{ | |
UIApplication uiapp = commandData.Application; | |
if (DockablePane.PaneIsRegistered(App.PaneId)) | |
{ | |
DockablePane docpanel = uiapp.GetDockablePane(App.PaneId); | |
if (docpanel.IsShown()) | |
docpanel.Hide(); | |
else | |
docpanel.Show(); | |
} | |
else | |
{ | |
return Result.Failed; | |
} | |
return Result.Succeeded; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment