示例#1
0
 public void RegisterPanel(UIApplication uiApp)
 {
     if (!_isRegistered) // if (!_isRegistered)
     {
         uiApp.RegisterDockablePane(DockablePaneId_FaceWall, "面层参数", this);
         _isRegistered = true;
     }
 }
示例#2
0
        /// <summary>
        /// Method that is executed when Command is fired
        /// </summary>
        /// <param name="uiapp"></param>
        /// <returns></returns>
        public Result Execute(UIApplication uiapp)
        {
            this.MainDockableWindow = new MainPage();
            DockablePaneProviderData data = new DockablePaneProviderData();

            dpid = new DockablePaneId(new Guid("{D7C963CE-B7CA-426A-8D51-6E8254D21157}"));

            MainDockableWindow.SetupDockablePane(data);
            uiapp.RegisterDockablePane(dpid, "SampleTool-Revisions", this.MainDockableWindow as IDockablePaneProvider);

            Registered = true;
            return(Result.Succeeded);
        }
示例#3
0
        // view activated event
        //public void Application_ViewActivated(object sender, ViewActivatedEventArgs e)
        //{
        //    // provide ExternalCommandData object to dockable page
        //    dockableWindow.CustomInitiator(edata);

        //}

        //// document opened event
        //private void Application_DocumentOpened(object sender, Autodesk.Revit.DB.Events.DocumentOpenedEventArgs e)
        //{
        //    // provide ExternalCommandData object to dockable page
        //    dockableWindow.CustomInitiator(edata);
        //}

        public Result Execute(UIApplication app)
        {
            var data   = new DockablePaneProviderData();
            var Viewer = new UI.Viewer();

            data.FrameworkElement = Viewer as FrameworkElement;

            // Setup initial state.
            var state = new DockablePaneState
            {
                DockPosition = DockPosition.Right,
            };

            var dpid = new DockablePaneId(new Guid("{ecea6d2f-533c-4e9d-a439-1c025aa0faee}"));

            app.RegisterDockablePane(dpid, "Crash Viewer", Viewer as IDockablePaneProvider);
            return(Result.Succeeded);
        }
示例#4
0
        public Result Register(UIApplication application)
        {
            try
            {
                var data = new DockablePaneProviderData();
                var pane = new DockablePaneView();
                data.FrameworkElement = pane as FrameworkElement;

                var dpid = new DockablePaneId(DockablePaneIdentifierManager.GetPanelIdentifier());
                application.RegisterDockablePane(dpid, "Pane", pane as IDockablePaneProvider);
                return(Result.Succeeded);
            }

            catch (Exception ex)
            {
                Debug.WriteLine(ex);
                return(Result.Failed);
            }
        }
示例#5
0
        ///// <summary>
        ///// Executes the specified command data.
        ///// </summary>
        ///// <param name="commandData">The command data.</param>
        ///// <param name="message">The message.</param>
        ///// <param name="elements">The elements.</param>
        ///// <returns></returns>
        //public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
        //{
        //    return Execute(commandData.Application);
        //}

        /// <summary>
        /// Register dockable pane.
        /// </summary>
        /// <param name="uIApplication">The u i application.</param>
        /// <returns></returns>
        public Result Execute(UIApplication uIApplication)
        {
            var data        = new DockablePaneProviderData();
            var managerPage = new FamilyManagerMainPage();

            data.FrameworkElement = managerPage as FrameworkElement;

            // Setup initial state.
            var state = new DockablePaneState
            {
                DockPosition = DockPosition.Right,
            };

            // Use unique guid identifier for this dockable pane.
            var dpid = new DockablePaneId(PaneIdentifiers.GetManagerPaneIdentifier());

            // Register pane.
            uIApplication.RegisterDockablePane(dpid, "Family Manager", managerPage as IDockablePaneProvider);

            return(Result.Succeeded);
        }
示例#6
0
 /// <summary>
 /// Register a dockable Window
 /// </summary>
 public void RegisterDockableWindow(UIApplication application, Guid mainPageGuid)
 {
     Globals.sm_UserDockablePaneId = new DockablePaneId(mainPageGuid);
     application.RegisterDockablePane(Globals.sm_UserDockablePaneId, Globals.ApplicationName, ThisApplication.thisApp.GetMainWindow() as IDockablePaneProvider);
 }
示例#7
0
 public void RegisterDockableWindow(UIApplication uiApplication)
 {
     uiApplication.RegisterDockablePane(userDockablePaneId, "资源浏览器", ThisApplication.thisApp.GetUserDockablePane() as IDockablePaneProvider);
 }