Exemple #1
0
        public override void OnConnect()
        {
            CommandManager.AddCommandGroup(new CommandGroupSpec(99)
            {
                Title    = "Group 1",
                Commands = new CommandSpec[]
                {
                    new CommandSpec(1)
                    {
                        Title              = "Cmd1",
                        HasMenu            = true,
                        HasToolbar         = true,
                        HasTabBox          = true,
                        TabBoxStyle        = RibbonTabTextDisplay_e.TextBelow,
                        SupportedWorkspace = WorkspaceTypes_e.All
                    },
                    new CommandSpec(4)
                    {
                        Title              = "Cmd2",
                        HasMenu            = true,
                        HasToolbar         = true,
                        HasTabBox          = true,
                        TabBoxStyle        = RibbonTabTextDisplay_e.TextBelow,
                        SupportedWorkspace = WorkspaceTypes_e.All
                    },
                    new CommandSpec(5)
                    {
                        Title              = "Cmd3",
                        HasMenu            = true,
                        HasToolbar         = true,
                        HasTabBox          = true,
                        TabBoxStyle        = RibbonTabTextDisplay_e.TextBelow,
                        SupportedWorkspace = WorkspaceTypes_e.All
                    }
                }
            });

            CommandManager.AddCommandGroup <Commands_e>().CommandClick += OnCommandClick;
            CommandManager.AddContextMenu <ContextMenuCommands_e>(Xarial.XCad.Base.Enums.SelectType_e.Faces).CommandClick += OnContextMenuCommandClick;

            Application.Documents.RegisterHandler <SwDocHandler>();

            m_Page         = this.CreatePage <PmpData>(OnCreateDynamicControls);
            m_Page.Closed += OnPage1Closed;

            m_ToggleGroupPage         = this.CreatePage <ToggleGroupPmpData>();
            m_ToggleGroupPage.Closed += OnToggleGroupPageClosed;

            m_MacroFeatPage         = this.CreatePage <PmpMacroFeatData>();
            m_MacroFeatPage.Closed += OnClosed;
        }