public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
        {
            Document doc = commandData.Application.ActiveUIDocument.Document;

            if (monitor == null)
            {
                monitor = new PostCommandRevisionMonitor(doc);
                monitor.Activate();
                commandButton.ItemText = "点击取消修订号监视器";
            }
            else
            {
                monitor.Deactivate();
                monitor = null;
                commandButton.ItemText = "点击设置修订号监视器";
            }

            return(Result.Succeeded);
        }
Exemple #2
0
 public PostCommandRevisionMonitorEventHandler(PostCommandRevisionMonitor monitor)
 {
     this.monitor = monitor;
 }